arch-android

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

addState

[android]
fun addState(key: Int, state: STATE): StateMachine<STATE>

Adds a new state to the machine.

Return

The state machine instance for chaining.

Parameters

android

   
key The unique key for the state. Must be >= 0.
state The state configuration.

Throws

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