|
||||||||||
| 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<T>
net.spy.util.WeakHashSet<T>
public class WeakHashSet<T>
HashSet backed by a WeakHashMap.
| Constructor Summary | |
|---|---|
WeakHashSet()
Get an instance of WeakHashSet. |
|
WeakHashSet(Collection<T> 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(T o)
Add this object to this Set if it's not already present. |
void |
clear()
Remove all entries from this Set. |
boolean |
contains(Object o)
True if this Set contains the given Object. |
boolean |
isEmpty()
True if this set contains no elements. |
Iterator<T> |
iterator()
Get the Iterator for the backing Map. |
boolean |
remove(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(Collection<T> c)
c - the collection| Method Detail |
|---|
public Iterator<T> iterator()
iterator in interface Iterable<T>iterator in interface Collection<T>iterator in interface Set<T>iterator in class AbstractCollection<T>public int size()
size in interface Collection<T>size in interface Set<T>size in class AbstractCollection<T>public boolean isEmpty()
isEmpty in interface Collection<T>isEmpty in interface Set<T>isEmpty in class AbstractCollection<T>public boolean contains(Object o)
contains in interface Collection<T>contains in interface Set<T>contains in class AbstractCollection<T>public boolean add(T o)
add in interface Collection<T>add in interface Set<T>add in class AbstractCollection<T>o - the object to add
public boolean remove(Object o)
remove in interface Collection<T>remove in interface Set<T>remove in class AbstractCollection<T>o - Object to be removed
public void clear()
clear in interface Collection<T>clear in interface Set<T>clear in class AbstractCollection<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||