|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractSet org.openide.util.WeakSet
Set which holds its members by using of WeakReferences. MT level: unsafe.
Constructor Summary | |
WeakSet()
Constructs a new set. |
|
WeakSet(Collection c)
Constructs a new set containing the elements in the specified collection. |
|
WeakSet(int initialCapacity)
Constructs a new, empty set; |
|
WeakSet(int initialCapacity,
float loadFactor)
Constructs a new, empty set; |
Method Summary | |
boolean |
add(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. |
Object |
clone()
Returns a shallow copy of this WeakSet instance: the elements themselves are not cloned. |
boolean |
contains(Object o)
Returns true if this set contains the specified element. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
Iterator |
iterator()
Returns an iterator over the elements in this set. |
boolean |
remove(Object o)
Removes the given element from this set if it is present. |
int |
size()
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] array)
|
String |
toString()
|
Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
addAll, containsAll, retainAll |
Constructor Detail |
public WeakSet()
public WeakSet(Collection c)
c
- a collection to addpublic WeakSet(int initialCapacity)
initialCapacity
- initial capacitypublic WeakSet(int initialCapacity, float loadFactor)
initialCapacity
- initial capacityloadFactor
- load factorMethod Detail |
public boolean add(Object o)
o
- an Object to addpublic void clear()
public Object clone()
public boolean contains(Object o)
o
- an Object to examinepublic boolean isEmpty()
public Iterator iterator()
public boolean remove(Object o)
o
- an Object to remove
public int size()
public Object[] toArray(Object[] array)
public Object[] toArray()
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |