S - Type of the state object@API(status=MAINTAINED,
     since="1.0")
public interface Action<S>
S.
 At runtime the execution of an action is regulated by a precondition.| Modifier and Type | Method and Description | 
|---|---|
default boolean | 
precondition(S state)
If this method returns false, the action will not be performed. 
 | 
S | 
run(S state)
Perform an action on state  
S and return the same state (if it has state)
 or a new one representing the new state. | 
default boolean precondition(S state)
state - the current state