Package VASSAL.tools.concurrent.listener
Interface MultiEventListenerSupport
- All Known Implementing Classes:
DefaultMultiEventListenerSupport
public interface MultiEventListenerSupport
An interface to provide support for
EventListeners.- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Method Summary
Modifier and Type Method Description <T> voidaddEventListener(Class<T> c, EventListener<? super T> l)Adds anEventListener.<T> List<EventListener<? super T>>getEventListeners(Class<T> c)Gets the list of listerners.booleanhasEventListeners(Class<?> c)Checks whether there are anyEventListeners.voidnotify(Object event)Notify the listeners of an event.<T> voidremoveEventListener(Class<T> c, EventListener<? super T> l)Removes anEventListener.
-
Method Details
-
addEventListener
Adds anEventListener.- Parameters:
c- the class to listen forl- the listener to add
-
removeEventListener
Removes anEventListener.- Parameters:
c- the class to checkl- the listener to remove
-
hasEventListeners
Checks whether there are anyEventListeners.- Parameters:
c- the class to check- Returns:
trueif there are any listeners for the given class
-
getEventListeners
Gets the list of listerners.- Parameters:
c- the class to check- Returns:
- the list of listeners for the given class
-
notify
Notify the listeners of an event.- Parameters:
event- the event to send
-