StateMachine
class StateMachine<ID, V : Value<ID, V, S>, S : State<ID, V, S>> @Inject constructor(transitions: Set<Transition<ID, V, S>>, transitioner: Transitioner<ID, Transition<ID, V, S>, V, S>)
A Guice-managed wrapper around KFSM's Transitioner that provides convenient access to discovered transitions.
This class is responsible for:
Managing the set of available transitions
Providing type-safe access to specific transitions
Executing transitions using the underlying Transitioner
Parameters
V
The type of value being managed by the state machine
S
The type of state, must extend State
Constructors
Link copied to clipboard
@Inject
Functions
Link copied to clipboard
Returns all transitions that are valid for the given state.
Link copied to clipboard
Gets a specific transition by its type.
Gets a specific transition by its KClass.
Link copied to clipboard
Attempts to transition the given value to the specified state.