org.ws4d.java.types
Class EprInfoSet

java.lang.Object
  extended by org.ws4d.java.types.EprInfoSet

public class EprInfoSet
extends java.lang.Object


Constructor Summary
EprInfoSet()
          Constructor.
EprInfoSet(EprInfo epr)
          Constructor, adds an EprInfo element to this set.
EprInfoSet(EprInfoSet set)
          Copy Constructor.
EprInfoSet(int initialCapacity)
          Constructor.
 
Method Summary
 void add(EprInfo eprinfo)
          Adds a EprInfo to this set.
 void addAll(EprInfoSet eprInfoSet)
          Adds all EprInfo contained within eprinfos to this instance.
 boolean contains(EprInfo infoSet)
          Checks whether given EprInfo is already present within this set.
 boolean containsAll(EprInfoSet otherInfoSet)
          Checks whether all items within the given EprInfoSet are present within this set.
 boolean containsEprAddress(AttributedURI address)
           
 boolean equals(EprInfoSet otherInfoSet)
          A specific implementation of Object.equals(Object) for this kind of set.
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 boolean isReadOnly()
          Returns whether this set is read-only or not.
 Iterator iterator()
           
 boolean remove(EprInfo eprInfo)
          Removes a EprInfo from this set.
 void setReadOnly()
          Sets this set to read-only.
 int size()
          Returns the current size of this set.
 EprInfo[] toArray()
          Returns an array containing the EprInfo objects from this set.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EprInfoSet

public EprInfoSet()
Constructor.


EprInfoSet

public EprInfoSet(int initialCapacity)
Constructor.


EprInfoSet

public EprInfoSet(EprInfo epr)
Constructor, adds an EprInfo element to this set.

Parameters:
epr - EprInfo element to be added to the new set.

EprInfoSet

public EprInfoSet(EprInfoSet set)
Copy Constructor. Copies the elements within the given set to the new one.

Method Detail

iterator

public Iterator iterator()

toArray

public EprInfo[] toArray()
Returns an array containing the EprInfo objects from this set.

Returns:
an array containing all EprInfo objects from this set.

contains

public boolean contains(EprInfo infoSet)
Checks whether given EprInfo is already present within this set.

Parameters:
infoSet - the EprInfo to check.
Returns:
true if EprInfo is contained by this set, false if not

containsAll

public boolean containsAll(EprInfoSet otherInfoSet)
Checks whether all items within the given EprInfoSet are present within this set.

Parameters:
otherInfoSet - the items to check the presence of
Returns:
true if all objects within otherInfoSet are contained by this set, false if at least one of them is not

size

public int size()
Returns the current size of this set.

Returns:
the size of this set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(EprInfoSet otherInfoSet)
A specific implementation of Object.equals(Object) for this kind of set.

Parameters:
otherInfoSet - the other EprInfoSet to compare.
Returns:
true if both sets are equals, false otherwise.
See Also:
Object.equals(Object)

isReadOnly

public boolean isReadOnly()
Returns whether this set is read-only or not.

A read-only set will not allow any modification.

Returns:
true if the set is read-only, false otherwise.

setReadOnly

public void setReadOnly()
Sets this set to read-only. No further operation will be able to change this set.

A read-only set will not allow any modification.


containsEprAddress

public boolean containsEprAddress(AttributedURI address)

add

public void add(EprInfo eprinfo)
Adds a EprInfo to this set.

A UnsupportedOperationException is thrown if this set is read-only.

Parameters:
eprinfo - The EprInfo to be added.
See Also:
DataStructure.add(Object)

addAll

public void addAll(EprInfoSet eprInfoSet)
Adds all EprInfo contained within eprinfos to this instance.

A UnsupportedOperationException is thrown if this set is read-only.

Parameters:
eprInfoSet - the set of EprInfo to add.

remove

public boolean remove(EprInfo eprInfo)
Removes a EprInfo from this set.

A UnsupportedOperationException is thrown if this set is read-only.

Parameters:
eprInfo - The EprInfo to be removed.
Returns:
true if the argument was a component of this set and was removed, false otherwise.
See Also:
DataStructure.remove(Object)