Interface EventListenerSupport<T>
- All Known Implementing Classes:
DefaultEventListenerSupport
public interface EventListenerSupport<T>
An interface to provide support for
EventListener
s.- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEventListener
(EventListener<? super T> l) Adds anEventListener
.List
<EventListener<? super T>> Gets the list of listeners.boolean
Checks whether there are anyEventListener
s.void
Notify the listeners of an event.void
removeEventListener
(EventListener<? super T> l) Removes anEventListener
.
-
Method Details
-
addEventListener
Adds anEventListener
.- Parameters:
l
- the listener to add
-
removeEventListener
Removes anEventListener
.- Parameters:
l
- the listener to remove
-
hasEventListeners
boolean hasEventListeners()Checks whether there are anyEventListener
s.- Returns:
true
if there are any listeners
-
getEventListeners
List<EventListener<? super T>> getEventListeners()Gets the list of listeners.- Returns:
- the list of listeners
-
notify
-