arch-android

//Android/br.com.arch.toolkit.android.statemachine/StateMachine/state

state

[android]
inline fun state(key: Int, stateConfig: STATE.() -> Unit): StateMachine<STATE>

Adds a new state to the StateMachine using a DSL-like syntax.

Parameters

android

   
key The unique key for the state.
stateConfig A lambda to configure the new state instance.

See also

 
StateMachine.addState

Throws

   
IllegalStateException If the machine is already started or the key is negative.