| Constructor and Description |
|---|
Listeners() |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
accept(T event)
Applies an event to all listeners.
|
Listener<T> |
add(Consumer<T> listener)
Adds a listener to the set of listeners.
|
Iterator<Listener<T>> |
iterator() |
int |
size()
Returns the number of registered listeners.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic int size()
public Listener<T> add(Consumer<T> listener)
listener - The listener to add.NullPointerException - if listener is nullpublic CompletableFuture<Void> accept(T event)
event - The event to apply.Copyright © 2013–2016. All rights reserved.