Package event
Class StateChangeEvent
java.lang.Object
event.StateChangeEvent
Describes an event that denotes a change of state.
It contains references to the old state, the new state,
and the FSM (source) that facilitated the transition.
-
Constructor Summary
ConstructorsConstructorDescriptionStateChangeEvent(FSM source, State oldState, State newState) Representation of a state change, -
Method Summary
Modifier and TypeMethodDescriptionThe new state that the FSM transitioned into.The state the FSM transitioned out of.Returns the FSM (source) that experienced the state change
-
Constructor Details
-
StateChangeEvent
Representation of a state change,- Parameters:
source- The FSM involvedoldState- The state transitioned out of.newState- The state transitioned into.
-
-
Method Details
-
getSource
Returns the FSM (source) that experienced the state change- Returns:
- the source
-
getOldState
The state the FSM transitioned out of.- Returns:
- the oldState
-
getNewState
The new state that the FSM transitioned into.- Returns:
- the newState
-