public static class EventHandlers.Builder extends Object
EventHandlers.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
<E extends JibEvent> |
add(Class<E> eventType,
Consumer<? super E> eventConsumer)
|
EventHandlers |
build() |
public <E extends JibEvent> EventHandlers.Builder add(Class<E> eventType, Consumer<? super E> eventConsumer)
eventConsumer to handle the JibEvent with class eventClass.
The order in which handlers are added is the order in which they are called when the event is
dispatched.
Note: Implementations of eventConsumer must be thread-safe.
E - the type of eventClasseventType - the event type that eventConsumer should handleeventConsumer - the event handlerpublic EventHandlers build()
Copyright © 2019. All rights reserved.