T - supertype of states in the FSM.public interface StateWithCallbacks<T>
FiniteStateMachine which supports callbacks when entering and leaving the state.| Modifier and Type | Method and Description |
|---|---|
default void |
onEnterState(T previousState)
Called when an FSM reaches this state.
|
default void |
onLeaveState(T nextState)
Called when an FSM leaves this state.
|
default void onEnterState(@Nullable T previousState)
previousState - the previous state of the machine.default void onLeaveState(T nextState)
nextState - the next state of the machine.