|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractSet
java.util.IdentityHashMap.KeySet
| Constructor Summary | |
private |
IdentityHashMap.KeySet()
|
| Method Summary | |
void |
clear()
Removes all of the elements from this set (optional operation). |
boolean |
contains(Object o)
Returns true if this set contains the specified element. |
int |
hashCode()
Returns the hash code value for this set. |
Iterator |
iterator()
Returns an iterator over the elements in this set. |
boolean |
remove(Object o)
Removes the specified element from this set if it is present (optional operation). |
boolean |
removeAll(Collection c)
Removes from this set all of its elements that are contained in the specified collection (optional operation). |
int |
size()
Returns the number of elements in this set (its cardinality). |
| Methods inherited from class java.util.AbstractSet |
equals |
| Methods inherited from class java.util.AbstractCollection |
add, addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
add, addAll, containsAll, isEmpty, retainAll, toArray, toArray |
| Constructor Detail |
private IdentityHashMap.KeySet()
| Method Detail |
public Iterator iterator()
Set
iterator in interface Setiterator in class AbstractCollectionpublic int size()
Set
size in interface Setsize in class AbstractCollectionpublic boolean contains(Object o)
Sete such that (o==null ? e==null :
o.equals(e)).
contains in interface Setcontains in class AbstractCollectiono - object to be checked for containment in this collection.
public boolean remove(Object o)
Sete such that
(o==null ? e==null : o.equals(e)), if the set contains
such an element. Returns true if the set contained the
specified element (or equivalently, if the set changed as a result of
the call). (The set will not contain the specified element once the
call returns.)
remove in interface Setremove in class AbstractCollectiono - element to be removed from this collection, if present.
public boolean removeAll(Collection c)
AbstractSetThis implementation determines which is the smaller of this set and the specified collection, by invoking the size method on each. If this set has fewer elements, then the implementation iterates over this set, checking each element returned by the iterator in turn to see if it is contained in the specified collection. If it is so contained, it is removed from this set with the iterator's remove method. If the specified collection has fewer elements, then the implementation iterates over the specified collection, removing from this set each element returned by the iterator, using this set's remove method.
Note that this implementation will throw an UnsupportedOperationException if the iterator returned by the iterator method does not implement the remove method.
removeAll in interface SetremoveAll in class AbstractSetc - elements to be removed from this set.
AbstractCollection.remove(Object),
AbstractCollection.contains(Object)public void clear()
Set
clear in interface Setclear in class AbstractCollectionpublic int hashCode()
AbstractSetThis implementation enumerates over the set, calling the hashCode method on each element in the collection, and adding up the results.
hashCode in interface SethashCode in class AbstractSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||