org.npsnet.xrti
Class XRTIDimensionHandleSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.HashSet
              extended byorg.npsnet.xrti.XRTIDimensionHandleSet
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, DimensionHandleSet, java.io.Serializable, java.util.Set

public class XRTIDimensionHandleSet
extends java.util.HashSet
implements DimensionHandleSet

All Set operations are required, none are optional. Methods add and remove should throw IllegalArgumentException if the argument is not a DimensionHandle. Methods addAll, removeAll and retainAll should throw IllegalArgumentException if the argument is not a DimensionHandleSet.

Author:
Andrzej Kapolka
See Also:
Serialized Form

Constructor Summary
protected XRTIDimensionHandleSet()
          Constructor.
 
Method Summary
 boolean add(java.lang.Object o)
          Adds the specified object to this set.
 boolean addAll(java.util.Collection c)
          Adds all of the objects in the specified collection to this set.
 boolean remove(java.lang.Object o)
          Removes the specified object from this set.
 boolean removeAll(java.util.Collection c)
          Removes all of the objects in the specified collection from this set.
 boolean retainAll(java.util.Collection c)
          Removes all of the objects in this set except for those present in the specified collection.
 
Methods inherited from class java.util.HashSet
clear, clone, contains, isEmpty, iterator, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArray
 

Constructor Detail

XRTIDimensionHandleSet

protected XRTIDimensionHandleSet()
Constructor.

Method Detail

add

public boolean add(java.lang.Object o)
Adds the specified object to this set.

Specified by:
add in interface java.util.Set
Parameters:
o - the object to add
Returns:
true if the set changed as a result of this method call, false otherwise
Throws:
java.lang.IllegalArgumentException - if the object is not a DimensionHandle

remove

public boolean remove(java.lang.Object o)
Removes the specified object from this set.

Specified by:
remove in interface java.util.Set
Parameters:
o - the object to remove
Returns:
true if the set changed as a result of this method call, false otherwise
Throws:
java.lang.IllegalArgumentException - if the object is not a DimensionHandle

addAll

public boolean addAll(java.util.Collection c)
Adds all of the objects in the specified collection to this set.

Specified by:
addAll in interface java.util.Set
Parameters:
c - the collection containing the objects to add
Returns:
true if the set changed as a result of this method call, false otherwise
Throws:
java.lang.IllegalArgumentException - if the collection is not a DimensionHandleSet

removeAll

public boolean removeAll(java.util.Collection c)
Removes all of the objects in the specified collection from this set.

Specified by:
removeAll in interface java.util.Set
Parameters:
c - the collection containing the objects to remove
Returns:
true if the set changed as a result of this method call, false otherwise
Throws:
java.lang.IllegalArgumentException - if the collection is not a DimensionHandleSet

retainAll

public boolean retainAll(java.util.Collection c)
Removes all of the objects in this set except for those present in the specified collection.

Specified by:
retainAll in interface java.util.Set
Parameters:
c - the collection containing the objects to retain
Returns:
true if the set changed as a result of this method call, false otherwise
Throws:
java.lang.IllegalArgumentException - if the collection is not a DimensionHandleSet