|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractSet | +--org.openorb.util.WeakHashSet
A weak set. This does not prevent it's members being reclaimed by the garbage collector.
Constructor Summary | |
WeakHashSet()
Constructs a new, empty set; the backing WeakHashMap instance has default capacity and load factor, which is 0.75. |
|
WeakHashSet(java.util.Collection c)
Constructs a new set containing the elements in the specified collection. |
|
WeakHashSet(int initialCapacity)
Constructs a new, empty set; the backing WeakHashMap instance has the specified initial capacity and default load factor, which is 0.75. |
|
WeakHashSet(int initialCapacity,
float loadFactor)
Constructs a new, empty set; the backing WeakHashMap instance has the specified initial capacity and the specified load factor. |
Method Summary | |
boolean |
add(java.lang.Object o)
Adds the specified element to this set if it is not already present. |
void |
clear()
Removes all of the elements from this set. |
boolean |
contains(java.lang.Object o)
Returns true if this set contains the specified element. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
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. |
int |
size()
Returns the number of elements 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 |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
Constructor Detail |
public WeakHashSet()
public WeakHashSet(java.util.Collection c)
c
- the collection whose elements are to be placed into this set.public WeakHashSet(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity of the hash map.loadFactor
- the load factor of the hash map.public WeakHashSet(int initialCapacity)
initialCapacity
- the initial capacity of the hash table.Method Detail |
public java.util.Iterator iterator()
iterator
in interface java.util.Set
iterator
in class java.util.AbstractCollection
public int size()
size
in interface java.util.Set
size
in class java.util.AbstractCollection
public boolean isEmpty()
isEmpty
in interface java.util.Set
isEmpty
in class java.util.AbstractCollection
public boolean contains(java.lang.Object o)
contains
in interface java.util.Set
contains
in class java.util.AbstractCollection
o
- element whose presence in this set is to be tested.public boolean add(java.lang.Object o)
add
in interface java.util.Set
add
in class java.util.AbstractCollection
o
- element to be added to this set.public boolean remove(java.lang.Object o)
remove
in interface java.util.Set
remove
in class java.util.AbstractCollection
o
- object to be removed from this set, if present.public void clear()
clear
in interface java.util.Set
clear
in class java.util.AbstractCollection
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |