Package org.linkki.util.handler
Interface Handler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface to proceed any operation. May be used to provide click handler or any
other runnable action.
Handlers can be composed using the andThen(Handler) method.
-
Field Details
-
NOP_HANDLER
A handler that does nothing.
-
-
Method Details
-
apply
void apply()Called when the handler should be applied. -
andThen
Returns a composed handler that first executes this handler'sapply()method and then theapply()method of the given handler.- See Also:
-
compose
Returns a composed handler that first applies thebeforehandler, and then applies this handler. If evaluation of either handler throws an exception, it is relayed to the caller of the composed handler.- Parameters:
before- the handler to apply before this handler is applied- Returns:
- a composed handler that first applies the
beforehandler and then applies this handler - Throws:
NullPointerException- if before is null- See Also:
-