Interface Trigger
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface for representing a trigger function that can be activated lazily in context were code
reuse is desired and enforced.
Usually used as a callback for when a certain condition is met or when a piece of logic; for
instance a logging message, must be repeated multiple times in the same method. It resembles a
Runnable but its intent differs from it.
- Author:
- Yoham Gabriel B.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activates the trigger function without passing arguments or by using variables in the same scope.
-
Method Details
-
activate
void activate()Activates the trigger function without passing arguments or by using variables in the same scope. If you need to pass arguments to the trigger function, use theTypedTriggerinterface.
-