Method Summary |
|
public boolean | add(Object element) Ensures that this collection contains the specified element.
Adding an element to this set will remove it from any mutually
exclusive set.
Parameters: element - Element whose presence in this set is to be ensured. |
public boolean | addAll(Collection c) Adds all of the elements in the specified collection to this set.
All of the elements will be removed from mutually exclusive sets.
Parameters: c - collection whose elements are to be added to this set. |
public void | clear() Removes all of the elements from this set. |
public boolean | contains(Object element) Returns
true if this set contains the specified element.
Parameters: element - Object to be checked for containment in this set. |
public boolean | containsAll(Collection c) Returns
true if this set contains
all of the elements in the specified collection.
Parameters: c - collection to be checked for containment in this collection. |
public boolean | equals(Object set) Compare this set with the specified object for equality. |
public Set | getTrash() Returns the trash set, or
null if there is none. |
public int | hashCode() Returns an hash value for this set. |
public Iterator | iterator() Returns an iterator over the elements in this collection. |
public boolean | remove(Object element) Removes a single instance of the specified element from this set,
if it is present. |
public boolean | removeAll(Collection c) Removes from this set all of its elements that are contained in
the specified collection. |
public boolean | retainAll(Collection c) Retains only the elements in this set that are contained in the specified
collection. |
public int | size() Returns the number of elements in this set. |
public Object[] | toArray() Returns an array containing all of the elements in this collection. |
public Object[] | toArray(Object[] a) Returns an array containing all of the elements in this collection.
Parameters: a - The array into which the elements of the set are to bestored, if it is big enough; otherwise, a new array ofthe same runtime type is allocated for this purpose. |
public String | toString() Returns a string representation of this set. |