FiniteStateMachine
class FiniteStateMachine<S : Any, E : Any>(initialState: S, stateFunctions: Map<KClass<out S>, Map<KClass<out E>, StateFunction<S, E>>>, defaultEventHandler: (S, E) -> S)
This class represents a Finite State Machine. It can be only in one possible state at a time out of the set of possible states S. It can handle events from the set E.
Parameters
initialState
The initial state.