public class EventListenerMap extends Object
EventListenerList
.EventListenerList
Modifier and Type | Field and Description |
---|---|
private Map<Class<? extends EventListener>,List<? extends EventListener>> |
listenerList |
Constructor and Description |
---|
EventListenerMap() |
Modifier and Type | Method and Description |
---|---|
<T extends EventListener> |
add(Class<T> clazz,
T listener)
Adds the listener as a listener of the specified type.
|
int |
getListenerCount()
Returns the total number of listeners of the supplied type
for this listener list.
|
<T extends EventListener> |
getListenerCount(Class<T> clazz)
Returns the total number of listeners for this listener type.
|
List<EventListener> |
getListeners()
Returns a list containing all of the listeners managed by this
EventListenerMap . |
<T extends EventListener> |
getListeners(Class<T> clazz)
Return a list of all the listeners of the given type.
|
<T extends EventListener> |
remove(Class<T> clazz,
T listener)
Removes the listener as a listener of the specified type.
|
private final Map<Class<? extends EventListener>,List<? extends EventListener>> listenerList
public EventListenerMap()
public List<EventListener> getListeners()
EventListenerMap
.public <T extends EventListener> List<T> getListeners(Class<T> clazz)
public int getListenerCount()
public <T extends EventListener> int getListenerCount(Class<T> clazz)
public <T extends EventListener> void add(Class<T> clazz, T listener)
T
- the type of the listener to be addedclazz
- the class type to addl
- the listener to be addedpublic <T extends EventListener> void remove(Class<T> clazz, T listener)
T
- the type of the listener to removeclazz
- the class type to removel
- the listener to removeWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses