|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface is intended to parallel the JDK 1.2 Set interface. A set is a collection that does not contain redundant elements. Please see the JDK 1.2 documenation for further details.
| Method Summary | |
boolean |
add(java.lang.Object o)
Add the specified element to the set (optional operation). |
boolean |
addAll(Collection c)
Adds all of the elements from the specified collection to this set (optional operation). |
void |
clear()
Removes all of the elements from this set (optional operation). |
boolean |
contains(java.lang.Object object)
Returns true if the set contains the specified object. |
boolean |
containsAll(Collection c)
Returns true is this set contains all the elements of the specified set. |
boolean |
equals(java.lang.Object o)
Returns true if the specified argument is equal to this set. |
int |
hashCode()
Returns a hash code for this set. |
boolean |
isEmpty()
Returns true if the set is empty. |
Iterator |
iterator()
Returns an iterator for the set. |
boolean |
remove(java.lang.Object o)
Removes an element from the set (optional operation). |
boolean |
removeAll(Collection c)
Removes all the elements of the specified collection from this set (optional operation). |
boolean |
retainAll(Collection c)
Retains only the elements from the specified collection (optional operation). |
int |
size()
Returns the size of the set. |
java.lang.Object[] |
toArray()
Returns a new array of elements from the set. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Returns an array of all the elements from the set. |
| Method Detail |
public int size()
size in interface Collectionpublic boolean isEmpty()
isEmpty in interface Collectionpublic boolean contains(java.lang.Object object)
contains in interface Collectionobject - the object to be tested for containment
public Iterator iterator()
iterator in interface Collectionpublic java.lang.Object[] toArray()
toArray in interface Collectionpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface Collectiona - the array in to which the elements will be stored (if big
enough)
public boolean add(java.lang.Object o)
add in interface Collectiono - the element to add to the set
public boolean remove(java.lang.Object o)
remove in interface Collectiono - the element to remove from the set
public boolean containsAll(Collection c)
containsAll in interface Collectionc - the collection to be checked
public boolean addAll(Collection c)
addAll in interface Collectionc - the collection from which elements are added
public boolean removeAll(Collection c)
removeAll in interface Collectionc - the elements to be removed from this set
public boolean retainAll(Collection c)
retainAll in interface Collectionc - the elements to be retained for this set
public void clear()
clear in interface Collectionpublic boolean equals(java.lang.Object o)
equals in interface Collectionequals in class java.lang.Objecto - the object to be compared for equality
public int hashCode()
hashCode in interface CollectionhashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||