Methods Summary |
---|
public boolean | add(E object)Adds the specified object to this set. The set is not modified if it
already contains the object.
|
public boolean | addAll(java.util.Collection collection)Adds the objects in the specified collection which do not exist yet in
this set.
|
public void | clear()Removes all elements from this set, leaving it empty.
|
public boolean | contains(java.lang.Object object)Searches this set for the specified object.
|
public boolean | containsAll(java.util.Collection collection)Searches this set for all objects in the specified collection.
|
public boolean | equals(java.lang.Object object)Compares the specified object to this set, and returns true if they
represent the same object using a class specific comparison.
Equality for a set means that both sets have the same size and the same
elements.
|
public int | hashCode()Returns the hash code for this set. Two set which are equal must return
the same value.
|
public boolean | isEmpty()Returns true if this set has no elements.
|
public java.util.Iterator | iterator()Returns an iterator on the elements of this set. The elements are
unordered.
|
public boolean | remove(java.lang.Object object)Removes the specified object from this set.
|
public boolean | removeAll(java.util.Collection collection)Removes all objects in the specified collection from this set.
|
public boolean | retainAll(java.util.Collection collection)Removes all objects from this set that are not contained in the specified
collection.
|
public int | size()Returns the number of elements in this set.
|
public java.lang.Object[] | toArray()Returns an array containing all elements contained in this set.
|
public T[] | toArray(T[] array)Returns an array containing all elements contained in this set. If the
specified array is large enough to hold the elements, the specified array
is used, otherwise an array of the same type is created. If the specified
array is used and is larger than this set, the array element following
the collection elements is set to null.
|