default

fun default(currentState: S, action: DefaultAsyncStateAction<C, S, E, A, R>)

This function defines an action to be invoked when no transitions are found matching the given state and on.

Parameters

currentState

The provided state

action

This action will be invoked


fun default(event: EventState<E, S>, action: AsyncStateAction<C, A, R>?)

This function defines an action to be invoked when no transitions match the event. The currentState will be changed to second parameter of the Pair.

Parameters

event

The Pair holds the event and targetState and can be written as event to state

action

The option action will be executed when this default transition occurs.


fun default(event: E, action: AsyncStateAction<C, A, R>?)

This function defines an action to be invoked when no transitions are found for given event.

Parameters

event

The event to match this transition.

action

The option action will be executed when this default transition occurs.