T - The listener type.public class ListenerSet<T> extends Object
| Constructor and Description |
|---|
ListenerSet() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T listener)
Adds a listener to this set.
|
void |
forEach(java.util.function.Consumer<T> consumer)
Runs a
Consumer with each listener in this set. |
public void add(T listener)
listener - The listener.public void forEach(java.util.function.Consumer<T> consumer)
Consumer with each listener in this set.consumer - The consumer.Copyright © 2016. All rights reserved.