org.ws4d.java.types
Class XAddressInfoSet

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

public class XAddressInfoSet
extends java.lang.Object


Constructor Summary
XAddressInfoSet()
          Constructor.
XAddressInfoSet(int initialCapacity)
          Constructor.
XAddressInfoSet(XAddressInfo xAdrInfo)
          Constructor, adds an XAddressInfo element to this set.
XAddressInfoSet(XAddressInfoSet set)
          Copy Constructor.
 
Method Summary
 void add(XAddressInfo xAdrInfo)
          Adds a XAddressInfo to this set.
 void addAll(XAddressInfoSet xAdrInfoSet)
          Adds all EprInfo contained within eprinfos to this instance.
 boolean contains(XAddressInfo xAdrInfo)
          Checks whether given XAddressInfo is already present within this set.
 boolean containsAll(XAddressInfoSet otherInfoSet)
          Checks whether all items within the given XAddressInfoSet are present within this set.
 boolean equals(java.lang.Object obj)
           
 boolean equals(XAddressInfoSet infosets2)
          A specific implementation of Object.equals(Object) for this kind of set.
 XAddressInfo get(XAddressInfo xAdrInfo)
          Get the xAdrInfo from this XAddressInfoSet that is equal to the given xAdrInfo.
 int hashCode()
           
 boolean isReadOnly()
          Returns whether this set is read-only or not.
 Iterator iterator()
           
 void mergeProtocolInfo(ProtocolInfo protocolInfo)
           
 boolean remove(XAddressInfo xAdrInfo)
          Removes a URI from this URISet.
 void setReadOnly()
          Sets this set to read-only.
 int size()
          Returns the current size of this set.
 XAddressInfo[] toArray()
          Returns an array containing the XAddressInfo objects from this set.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XAddressInfoSet

public XAddressInfoSet()
Constructor.


XAddressInfoSet

public XAddressInfoSet(int initialCapacity)
Constructor.


XAddressInfoSet

public XAddressInfoSet(XAddressInfo xAdrInfo)
Constructor, adds an XAddressInfo element to this set.

Parameters:
xAdrInfo - XAddressInfo element to be added to the new set.

XAddressInfoSet

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

Method Detail

iterator

public Iterator iterator()

toArray

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

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

contains

public boolean contains(XAddressInfo xAdrInfo)
Checks whether given XAddressInfo is already present within this set.

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

containsAll

public boolean containsAll(XAddressInfoSet otherInfoSet)
Checks whether all items within the given XAddressInfoSet 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(XAddressInfoSet infosets2)
A specific implementation of Object.equals(Object) for this kind of set.

Parameters:
otherInfoSet - the other XAddressInfoSet 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.


add

public void add(XAddressInfo xAdrInfo)
Adds a XAddressInfo to this set.

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

Parameters:
xAdrInfo - The XAddressInfo to be added.
See Also:
DataStructure.add(Object)

get

public XAddressInfo get(XAddressInfo xAdrInfo)
Get the xAdrInfo from this XAddressInfoSet that is equal to the given xAdrInfo.

Parameters:
xAdrInfo -
Returns:
the equal xAdrInfo from this XAddressInfoSet or null if it does not contained an equal xAdrInfo

addAll

public void addAll(XAddressInfoSet xAdrInfoSet)
Adds all EprInfo contained within eprinfos to this instance.

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

Parameters:
xAdrInfoSet - the set of EprInfo to add.

remove

public boolean remove(XAddressInfo xAdrInfo)
Removes a URI from this URISet. A UnsupportedOperationException is thrown if this QN data structure is readOnly.

Parameters:
xAdrInfo - The URI to be removed.
Returns:
true if the argument was a component of this UniformResourceIdentifierList; false otherwise.
See Also:
DataStructure.remove(Object)

mergeProtocolInfo

public void mergeProtocolInfo(ProtocolInfo protocolInfo)