InstanceState

class InstanceState<T : Any, ModelStates : Enum<*>, C : KlerkContext, V>(name: String, modelName: String) : State<T, ModelStates, C, V>

Constructors

Link copied to clipboard
constructor(name: String, modelName: String)

Properties

Link copied to clipboard
val id: StateId

Functions

Link copied to clipboard
fun after(duration: Duration, init: Block.InstanceNonEventBlock<T, ModelStates, C, V>.() -> Unit)

Tries to execute a block after a certain duration, counting from when the model entered this state.

Link copied to clipboard
fun atTime(f: (args: ArgForInstanceNonEvent<T, C, V>) -> Instant, init: Block.InstanceNonEventBlock<T, ModelStates, C, V>.() -> Unit)

Tries to execute a block at a certain time.

Link copied to clipboard
Link copied to clipboard
fun <P> onEvent(event: InstanceEvent<T, P>, init: Block.InstanceEventBlock<T, P, ModelStates, C, V>.() -> Unit)
Link copied to clipboard