PseudoState
Pseudo state is a state that machine passes automatically without explicit event. It cannot be active.
Inheritors
Properties
Functions
Set of states that the state is currently in. Including state itself if selfIncluding is true. Internal states of nested machines are not included.
Helper method for adding final states. This is exactly the same as simply call IState.addState but makes code more self expressive.
A shortcut for IState.addState and IState.setInitialState calls
Creates type safe argument transition to DataState.
Shortcut function for type safe argument transition. Data transition can be target-less (self-targeted), it is useful to update DataState data Note that transition must be TransitionType.EXTERNAL to update data.
Data transition, otherwise same as transitionOn
Find state by type. Search by type is suitable when using own state subclasses that usually do not have a name. Only on state should match the type or exception will be thrown.
Get state by name. This might be used to start listening to state after state machine setup.
For internal use. Workaround that Kotlin does not support recursive inline functions.
Find transition by Event type. This might be used to start listening to transition after state machine setup.
Find transition by name. This might be used to start listening to transition after state machine setup.
A shortcut for state and IState.setInitialState calls
Require transition by Event type
Initial child state is required if child mode is ChildMode.EXCLUSIVE and a state has children
Creates transition. You can specify guard function. Such guarded transition is triggered only when guard function returns true.
Shortcut overload for transition with an optional target state
Creates conditional transition. Caller should specify lambda which calculates TransitionDirection. For example target state may be different depending on some condition.
This is more powerful version of transition function. Here target state is a lambda which returns desired State. This allows to use lateinit state variables for recursively depending states and choose target state depending on application business logic.