Package-level declarations
Types
Link copied to clipboard
Wrapper for "watching changes" syntax.
Link copied to clipboard
class EventTransitionBuilder<S, E : StateEvent, T : E>(scope: StateConversationalScope<S, E>, eventClass: KClass<T>)
Builder for event transitions with conversational syntax. Not an inner class to avoid type parameter shadowing.
Link copied to clipboard
Wrapper class to enable "starting at State" syntax.
Link copied to clipboard
Configuration scope for a specific state, providing conversational DSL.
Link copied to clipboard
Wrapper to add side effects after transition definition.
Properties
Functions
Link copied to clipboard
inline fun <S : Any, E : StateEvent> StateMachineBuilder<S, E>.during(state: S, configuration: StateConversationalScope<S, E>.() -> Unit)
Configures a state with conversational syntax: "during State { ... }"
Link copied to clipboard
Alternative syntax for setting initial state: "initially State"
Link copied to clipboard
fun <S, E : StateEvent> StateMachineBuilder<S, E>.onEveryTransition(effect: (oldState: S, newState: S) -> Unit)
Adds a global side effect that runs on every transition.
Link copied to clipboard
Sets the state validator directly.
Link copied to clipboard
infix fun <S, E : StateEvent> StateMachineBuilder<S, E>.validating(with: String): (StateValidator<S>) -> Unit
Sets the state validator with conversational syntax.