arch-android

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

changeState

[android]
fun changeState(stateKey: Int, forceChange: Boolean = false, onChangeState: (Int) -> Unit? = config.onChangeState)

Changes the current state of the machine.

Parameters

android

   
stateKey The key of the state to become active.
forceChange If true, transitions even if stateKey is the current state.
onChangeState Optional callback to be invoked before the state change.

Throws

   
IllegalStateException If the machine is not started or the state key is not found.