public class WeakHashSet
extends java.util.HashSet
| Constructor and Description |
|---|
WeakHashSet() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object o)
Adds the specified element to this set if it is not already
present.
|
boolean |
contains(java.lang.Object o)
Returns
true if this set contains the specified element. |
java.util.Iterator |
iterator()
Returns an iterator over the elements in this set.
|
boolean |
remove(java.lang.Object o)
Removes the given element from this set if it is present.
|
addAll, containsAll, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.HashSetpublic boolean contains(java.lang.Object o)
true if this set contains the specified element.contains in interface java.util.Collectioncontains in interface java.util.Setcontains in class java.util.HashSeto - element whose presence in this set is to be tested.true if this set contains the specified element.public boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.HashSeto - element to be added to this set.true if the set did not already contain the specified element.public boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Setremove in class java.util.HashSeto - object to be removed from this set, if present.true if the set contained the specified element.