StateId
- The type used for referencing states.Event
- The type used for referencing events.public interface IGuard<StateId,Event>
Logical functions of more than one guards can be created by instantiating
the GuardAnd
, GuardOr
and GuardNot
classes.
boolean checkTransition(IState<StateId,Event> fromState, IState<StateId,Event> toState, Event event)
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.