interface IStateMachine<S, T : Any>
State machine interface that requires the ability to transition finite states. |
|
open class StateMachine<S, T : Any> : IStateMachine<S, T>
A basic state machine that is not thread safe. |
|
interface TransitionBuilder<out S, out T : Any>
Base definition for a partially defined transition. |
|
interface TransitionCallback<S, T : Any> |
|
data class TransitionDef<S, T : Any> |
infix fun <S, T : Any> S.onTransition(event: KClass<out T>): TransitionBuilder<S, T>
Create a transition builder for a given state and transition event. |
|
infix fun <S, T : Any> TransitionBuilder<S, T>.resultsIn(newState: S): TransitionDef<S, out T>
Define how a transition builder should end completing a fully defined transition definition. |