Interface FunctionalHandlerList<T,R>
- Type Parameters:
T- the handled typeR- the resultant subscription type
- All Known Subinterfaces:
MergedHandlerList<T>,SingleHandlerList<T>
public interface FunctionalHandlerList<T,R>
A functional builder which accumulates event handlers
-
Method Summary
Modifier and TypeMethodDescription@NotNull FunctionalHandlerList<T,R> biConsumer(@NotNull BiConsumer<R, ? super T> handler) Add aBiConsumerhandler.@NotNull FunctionalHandlerList<T,R> Add aConsumerhandler.register()Builds and registers the Handler.
-
Method Details
-
consumer
@NotNull @NotNull FunctionalHandlerList<T,R> consumer(@NotNull @NotNull Consumer<? super T> handler) Add aConsumerhandler.- Parameters:
handler- the handler- Returns:
- this handler list
-
biConsumer
@NotNull @NotNull FunctionalHandlerList<T,R> biConsumer(@NotNull @NotNull BiConsumer<R, ? super T> handler) Add aBiConsumerhandler.- Parameters:
handler- the handler- Returns:
- this handler list
-
register
Builds and registers the Handler.- Returns:
- a registered
FunctionalHandlerListinstance. - Throws:
IllegalStateException- if no handlers have been registered
-