faa.tg.util
Class AbstractMultiHandlerListenerRegistrar<L extends java.util.EventListener>
java.lang.Object
faa.tg.util.AbstractMultiHandlerListenerRegistrar<L>
- Direct Known Subclasses:
- Scenario.GateStateListeners
public abstract class AbstractMultiHandlerListenerRegistrar<L extends java.util.EventListener>
- extends java.lang.Object
This class allows easy implementation of registrar for an EventListener with multiple event types.
The listeners are stored centrally in the child of AbstractMultiHandlerListenenRegistrar and views
of ListenerRegistrars that correspond to the different handle method are created by inner classes that
implement RegistrarTemplate.
See the source: AbstractMultiHandlerListenerRegistrar.java
- Version:
- $Id: AbstractMultiHandlerListenerRegistrar.java,v 3.2 2008/05/07 16:00:45 lykensj Exp $
- Author:
- Jonathan Lykens, Engility, Apr 24, 2008 9:54:19 AM
- See Also:
ListenerRegistrar
|
Field Summary |
private java.util.List<L> |
listeners
All of the listeners for all views |
|
Method Summary |
boolean |
addListener(L listener)
Add this listener to the registrar. |
boolean |
removeListener(L listener)
Removes a given listener from the registrar. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listeners
private final java.util.List<L extends java.util.EventListener> listeners
- All of the listeners for all views
AbstractMultiHandlerListenerRegistrar
public AbstractMultiHandlerListenerRegistrar()
addListener
public final boolean addListener(L listener)
- Add this listener to the registrar.
- Parameters:
listener - the listener to add.
removeListener
public final boolean removeListener(L listener)
- Removes a given listener from the registrar.
- Parameters:
listener - the listener to remove.