StateMachine

Every StateMachine has a UNIQUE parent State ENUM among it's Peers

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class StateMachineBuilder<TContext : Any, TState : Enum<TState>, TEvent : Any>(possibleStates: Array<TState>, stateType: KClass<TState>, eventType: KClass<TEvent>, validParentState: Enum<*>, context: TContext)
Link copied to clipboard

Functions

Link copied to clipboard
fun <T : Enum<in T>> transition(currentState: State<in T>, event: Any): State<*>

A machine can have following scenarios :