|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.util.ListenerList<T>
public abstract class ListenerList<T>
Abstract base class for listener lists.
NOTE This class is not inherently thread safe. Subclasses that require thread-safe access should synchronize method access appropriately. Callers must manually synchronize on the listener list instance to ensure thread safety during iteration.
| Constructor Summary | |
|---|---|
ListenerList()
|
|
| Method Summary | |
|---|---|
void |
add(T listener)
Adds a listener to the list, if it has not previously been added. |
boolean |
contains(T listener)
Tests the existence of a listener in the list. |
T |
get(int index)
Get the indexed element in the list. |
int |
getLength()
Get the number of elements in the list. |
boolean |
isEmpty()
Tests the emptiness of the list. |
Iterator<T> |
iterator()
|
void |
remove(T listener)
Removes a listener from the list, if it has previously been added. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ListenerList()
| Method Detail |
|---|
public void add(T listener)
listener - public void remove(T listener)
listener - public boolean contains(T listener)
listener -
public boolean isEmpty()
public int getLength()
public T get(int index)
public Iterator<T> iterator()
iterator in interface Iterable<T>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||