T
- Listener type.public final class ListenerSupport<T> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ListenerSupport.HandlingInformer<K>
Adapter interface for use with
apply(net.grinder.util.ListenerSupport.HandlingInformer) . |
static interface |
ListenerSupport.Informer<K>
Adapter interface for use with
apply(net.grinder.util.ListenerSupport.Informer) . |
Constructor and Description |
---|
ListenerSupport() |
Modifier and Type | Method and Description |
---|---|
void |
add(T listener)
Add a listener.
|
boolean |
apply(ListenerSupport.HandlingInformer<? super T> handler)
Notify the listeners of an event.
|
void |
apply(ListenerSupport.Informer<? super T> informer)
Notify the listeners of an event.
|
void |
remove(T listener)
Remove all instances of the given listener.
|
public void add(T listener)
listener
- The listener.public void remove(T listener)
listener
- The listener.public void apply(ListenerSupport.Informer<? super T> informer)
informer
- An adapter to be applied to each listener.public boolean apply(ListenerSupport.HandlingInformer<? super T> handler)
handler
- An adapter to be applied to each listener.true
=> a listener handled the event.Copyright © 2000-2014. All Rights Reserved.