StateMachine<STATE, EVENT, SIDE_EFFECT> class
Finite State Machine implementation.
It can be in one of states defined by STATE
. State transitions
are triggered by events of type EVENT
.
Base on the definition each transition can trigger side effect
of type SIDE_EFFECT
.
Constructors
-
StateMachine.create(BuildGraph<
STATE, EVENT, SIDE_EFFECT> buildGraph) -
factory
Properties
- currentState → STATE
-
Returns current state.
read-only
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
state
→ Stream<
STATE> -
Returns Stream of states.
read-only
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transition(
EVENT event) → Transition< STATE, EVENT, SIDE_EFFECT> -
Perform transition by emitting
event
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited