T - the generic typepublic class EventSubject<T> extends Object implements EventSource<T>
| Constructor and Description |
|---|
EventSubject()
Instantiates a new event subject.
|
EventSubject(T source)
Instantiates a new event subject.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(EventListener<T> eventListener)
Adds the given event listener to the eventListeners list.
|
void |
addAll(Collection<EventListener<T>> eventListeners)
Adds the all given event listeners to the eventListeners list.
|
void |
fireEvent(T source)
Fire the given event.
|
void |
remove(EventListener<T> eventListener)
Removes the given event listener from the eventListeners list.
|
void |
removeAll(Collection<EventListener<T>> eventListeners)
Removes the all given event listeners from the eventListeners list.
|
public EventSubject()
public EventSubject(T source)
source - the sourcepublic void add(EventListener<T> eventListener)
add in interface EventSource<T>eventListener - the event listenerpublic void addAll(Collection<EventListener<T>> eventListeners)
addAll in interface EventSource<T>eventListeners - the event listenerspublic void fireEvent(T source)
fireEvent in interface EventSource<T>source - the sourcepublic void remove(EventListener<T> eventListener)
remove in interface EventSource<T>eventListener - the event listenerpublic void removeAll(Collection<EventListener<T>> eventListeners)
removeAll in interface EventSource<T>eventListeners - the event listenersCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.