public final class ListenerSupport<T extends EventListener> extends Object implements Iterable<T>
Base class for a collection of listeners
Constructor and Description |
---|
ListenerSupport() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(T theListener)
Adds the specified listener to the list
|
static <T extends EventListener> |
create()
Create a new ListenerSupport
|
protected Collection<T> |
getListeners()
Return the registered listeners.
|
Iterator<T> |
iterator() |
void |
removeListener(T theListener)
Removes the specified listener from the list
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public void addListener(T theListener)
theListener
- the listener to addpublic void removeListener(T theListener)
theListener
- the listener to removeprotected Collection<T> getListeners()
public Iterator<T> iterator()
iterator
in interface Iterable<T extends EventListener>
public static <T extends EventListener> ListenerSupport<T> create()
T
- the listener typeCopyright © 2010-2016 Stardog Union. All Rights Reserved.