checkTransition
public boolean checkTransition(IState<StateId,Event> fromState,
IState<StateId,Event> toState,
Event event)
Description copied from interface: IGuard
Called when the guard is needed to be executed.
- Specified by:
checkTransition
in interface IGuard<StateId,Event>
- Parameters:
fromState
- The initial state of the transition. In case of an
internal transition, it is the state in which the transition happens.toState
- The final state of the transition. In case of an
internal transition, its value is null.event
- The event triggering the transition.
- Returns:
- The result of the transition.