|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet
net.spy.util.WeakHashSet
public class WeakHashSet
HashSet backed by a WeakHashMap.
| Constructor Summary | |
|---|---|
WeakHashSet()
Get an instance of WeakHashSet. |
|
WeakHashSet(java.util.Collection c)
Get a WeakHashSet with the contents from the given Collection. |
|
WeakHashSet(int n)
Create a WeakHashSet with the given capacity. |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object o)
Add this object to this Set if it's not already present. |
void |
clear()
Remove all entries from this Set. |
boolean |
contains(java.lang.Object o)
True if this Set contains the given Object. |
boolean |
isEmpty()
True if this set contains no elements. |
java.util.Iterator |
iterator()
Get the Iterator for the backing Map. |
boolean |
remove(java.lang.Object o)
Remove the given object from this Set. |
int |
size()
Get the number of keys currently contained in this Set. |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, containsAll, 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 |
|---|
addAll, containsAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public WeakHashSet()
public WeakHashSet(int n)
n - the capacitypublic WeakHashSet(java.util.Collection c)
c - the collection| Method Detail |
|---|
public java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.AbstractCollectionpublic int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.AbstractCollectionpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.SetisEmpty in class java.util.AbstractCollectionpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Setcontains in class java.util.AbstractCollectionpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.AbstractCollectiono - the object to add
public boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Setremove in class java.util.AbstractCollectiono - Object to be removed
public void clear()
clear in interface java.util.Collectionclear in interface java.util.Setclear in class java.util.AbstractCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||