|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.util.listener.ListenerCollection<T>
T - type of listenerspublic abstract class ListenerCollection<T>
Represents a collection of listeners. Facilitates invocation of events on each listener.
NOTE: Ordering of listeners is not guaranteed and should not be relied upon
| Nested Class Summary | |
|---|---|
protected static interface |
ListenerCollection.INotifier<T>
Used to notify a listener. |
| Constructor Summary | |
|---|---|
ListenerCollection()
|
|
| Method Summary | |
|---|---|
boolean |
add(T listener)
Adds a listener to this set of listeners. |
protected boolean |
isAllowingDuplicates()
Whether or not added listeners should be checked for duplicates. |
protected boolean |
isAllowingNulls()
Whether or not to allow nulls in listener collection. |
Iterator<T> |
iterator()
Returns an iterator that can iterate the listeners. |
protected void |
notify(ListenerCollection.INotifier<T> notifier)
Notifies each listener in this |
protected void |
notifyIgnoringExceptions(ListenerCollection.INotifier<T> notifier)
Notifies each listener in this set ignoring exceptions. |
void |
remove(T listener)
Removes a listener from this set. |
protected void |
reversedNotify(ListenerCollection.INotifier<T> notifier)
Notifies each listener in this in reversed order |
protected void |
reversedNotifyIgnoringExceptions(ListenerCollection.INotifier<T> notifier)
Notifies each listener in this set in reverse order ignoring exceptions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListenerCollection()
| Method Detail |
|---|
public boolean add(T listener)
listener - The listener to add
true if the listener was addedprotected void notify(ListenerCollection.INotifier<T> notifier)
notifier - notifier used to notify each listenerprotected void notifyIgnoringExceptions(ListenerCollection.INotifier<T> notifier)
notifier - notifier used to notify each listenerprotected void reversedNotifyIgnoringExceptions(ListenerCollection.INotifier<T> notifier)
notifier - notifier used to notify each listenerprotected void reversedNotify(ListenerCollection.INotifier<T> notifier)
notifier - notifier used to notify each listenerpublic void remove(T listener)
listener - The listener to removeprotected boolean isAllowingDuplicates()
true to ignore duplicatesprotected boolean isAllowingNulls()
nulls in listener collection.
true to allow nulls to be added to the collectionpublic Iterator<T> iterator()
iterator in interface Iterable<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||