org.npsnet.xrti
Class XRTIFederateHandleSet

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

public class XRTIFederateHandleSet
extends java.util.HashSet
implements FederateHandleSet

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

Author:
Andrzej Kapolka
See Also:
Serialized Form

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

XRTIFederateHandleSet

protected XRTIFederateHandleSet()
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 FederateHandle

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 FederateHandle

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 FederateHandleSet

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 FederateHandleSet

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 FederateHandleSet