public static final class Instruction.TransitionTo<S extends Enum<S>> extends Object implements Instruction, Event<S>
Instruction for a FiniteStateMachine to Instruction.TransitionTo another state. (immediately on the thread that created the Instruction).Instruction.ProcessEvent<S extends Enum<S>>, Instruction.TransitionTo<S extends Enum<S>>NOTHING, STOP| Constructor and Description |
|---|
TransitionTo(S desiredState)
Constructs a
Instruction.TransitionTo. |
| Modifier and Type | Method and Description |
|---|---|
S |
getDesiredState(S currentState, ExecutionContext context)
Determines the desired state of the
FiniteStateMachine for the Event given the current state of the FiniteStateMachine. |
String |
toString() |
public TransitionTo(S desiredState)
Instruction.TransitionTo.desiredState - the desired state to which to transitionpublic S getDesiredState(S currentState, ExecutionContext context)
FiniteStateMachine for the Event given the current state of the FiniteStateMachine.getDesiredState in interface Event<S extends Enum<S>>currentState - the current state of the FiniteStateMachinecontext - the ExecutionContext for the EventFiniteStateMachine or null if no transition is required