//Android/br.com.arch.toolkit.android.statemachine/StateMachine/addState
[android]
fun addState(key: Int, state: STATE): StateMachine<STATE>
Adds a new state to the machine.
The state machine instance for chaining.
android
| Â | Â |
|---|---|
| key | The unique key for the state. Must be >= 0. |
| state | The state configuration. |
| Â | Â |
|---|---|
| IllegalStateException | If the machine is already started or the key is negative. |