T - the type of elements returned by the iteratorpublic class ListenerList<T extends EventListener> extends Object implements Serializable, Iterable<T>
| Constructor and Description |
|---|
ListenerList()
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(T listener)
Adds the given listener to the end of this list.
|
int |
getListenerCount()
Gets the number of elements in this list.
|
boolean |
isEmpty()
Tests whether if this listener list is empty.
|
Iterator<T> |
iterator()
Return an
Iterator for the EventListener instances. |
void |
removeListener(T listener)
Removes the first occurrence of the specified listener from this list, if it is present.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic void addListener(T listener)
listener - A listener.public int getListenerCount()
public boolean isEmpty()
public Iterator<T> iterator()
Iterator for the EventListener instances.iterator in interface Iterable<T extends EventListener>Iterator for the EventListener instancespublic void removeListener(T listener)
listener - listener to be removed from this list, if present.