org.npsnet.xrti
Class XRTIAttributeHandleSet

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

public class XRTIAttributeHandleSet
extends java.util.HashSet
implements AttributeHandleSet

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

Author:
Andrzej Kapolka
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.HashSet
 
Constructor Summary
protected XRTIAttributeHandleSet()
          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

XRTIAttributeHandleSet

protected XRTIAttributeHandleSet()
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 an AttributeHandle

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 an AttributeHandle

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 an AttributeHandleSet

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 an AttributeHandleSet

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 an AttributeHandleSet