|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deduced.utilities.WeakList<E>
E
- the type of element contained in the listpublic class WeakList<E>
WeakList this list holds a weak reference to all the elements it contains. The iterator will never return a null value. The weak list matches object by object identity. Not by the equal method.
Nested Class Summary | |
---|---|
static class |
WeakList.WeakIterator<E>
Class representing an iterator on a weak list. |
Field Summary | |
---|---|
private java.util.List<java.lang.ref.WeakReference<E>> |
listenerList
The list of Listener in weak references |
Constructor Summary | |
---|---|
WeakList()
constructor |
Method Summary | ||
---|---|---|
void |
add(E l)
add an object to the list |
|
private void |
cleanList()
clean the List of expired weak pointers |
|
void |
clear()
clear the list |
|
boolean |
contains(java.lang.Object o)
test if an object is contained in this list |
|
protected java.util.List<java.lang.ref.WeakReference<E>> |
getListenerList()
get Listener List |
|
boolean |
isEmpty()
|
|
java.util.Iterator<E> |
iterator()
fetch an iterator to browse the list |
|
java.lang.Object |
remove(java.lang.Object l)
remove an object from the list |
|
int |
size()
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(java.lang.Class<T> arrayClass)
convert the list to an array of the type specified in the input type. |
|
|
toArray(T[] input)
convert the list to an array of the type specified in the input type. |
|
|
toArray(T[] input,
java.lang.Class<T> arrayClass)
convert the list to an array of the type specified in the input type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private transient java.util.List<java.lang.ref.WeakReference<E>> listenerList
Constructor Detail |
---|
public WeakList()
Method Detail |
---|
protected java.util.List<java.lang.ref.WeakReference<E>> getListenerList()
public boolean isEmpty()
private void cleanList()
public boolean contains(java.lang.Object o)
o
- the object that might be in the list
public int size()
public void add(E l)
l
- the object to addpublic java.lang.Object remove(java.lang.Object l)
l
- the object to remove
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] input)
T
- the type of array to useinput
- the array to fill. If the array is too small, a different
array of the right size will be returned.
public <T> T[] toArray(java.lang.Class<T> arrayClass)
T
- the type of array to usearrayClass
- the class of the array container
public <T> T[] toArray(T[] input, java.lang.Class<T> arrayClass)
T
- the type of array to useinput
- the array to fill. If the array is too small, a different
array of the right size will be returned.arrayClass
- the class of the array container
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |