Interface MultiEventListenerSupport
- All Known Implementing Classes:
DefaultMultiEventListenerSupport
public interface MultiEventListenerSupport
An interface to provide support for
EventListener
s.- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Method Summary
Modifier and TypeMethodDescription<T> void
addEventListener
(Class<T> c, EventListener<? super T> l) Adds anEventListener
.<T> List
<EventListener<? super T>> getEventListeners
(Class<T> c) Gets the list of listeners.boolean
hasEventListeners
(Class<?> c) Checks whether there are anyEventListener
s.void
Notify the listeners of an event.<T> void
removeEventListener
(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 anyEventListener
s.- Parameters:
c
- the class to check- Returns:
true
if there are any listeners for the given class
-
getEventListeners
Gets the list of listeners.- Parameters:
c
- the class to check- Returns:
- the list of listeners for the given class
-
notify
-