Package com.storedobject.common
Interface Action
- All Superinterfaces:
Runnable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a functional interface that encapsulates a single action to be performed.
This interface extends
Runnable, allowing implementations to be used in
contexts where a Runnable is expected.
This interface provides a single abstract method act() that must be
implemented to define the specific action. Additionally, default implementations
of run() and execute() are provided, both of which delegate
their behavior to the act() method.- Author:
- Syam
-
Method Summary
-
Method Details
-
act
void act()Performs the specific action encapsulated by this method. This is the primary abstract method of the functional interface, and concrete implementations must provide its definition to specify the desired behavior. -
run
-
execute
default void execute()Executes the action defined by theact()method. This default implementation directly delegates its behavior to theact()method, ensuring that the action is executed consistently wherever this method is invoked.
-