toggle menu
lib
0.0.266
jvm
switch theme
search in API
lib
/
com.prettybyte.klerk.statemachine
/
StateMachine
State
Machine
class
StateMachine
<
T
:
Any
,
ModelStates
:
Enum
<
*
>
,
C
:
KlerkContext
,
V
>
(
type
:
KClass
<
T
>
)
Members
Constructors
State
Machine
Link copied to clipboard
constructor
(
type
:
KClass
<
T
>
)
Functions
event
Link copied to clipboard
fun
event
(
event
:
InstanceEventNoParameters
<
T
>
,
init
:
InstanceEventRulesNoParameters
<
T
,
C
,
V
>
.
(
)
->
Unit
)
fun
<
P
:
Any
>
event
(
event
:
InstanceEventWithParameters
<
T
,
P
>
,
init
:
InstanceEventRulesWithParameters
<
T
,
P
,
C
,
V
>
.
(
)
->
Unit
)
fun
event
(
event
:
VoidEventNoParameters
<
T
>
,
init
:
VoidEventRulesNoParameters
<
T
,
C
,
V
>
.
(
)
->
Unit
)
fun
<
P
:
Any
>
event
(
event
:
VoidEventWithParameters
<
T
,
P
>
,
init
:
VoidEventRulesWithParameters
<
T
,
P
,
C
,
V
>
.
(
)
->
Unit
)
state
Link copied to clipboard
fun
state
(
modelState
:
ModelStates
,
init
:
InstanceState
<
T
,
ModelStates
,
C
,
V
>
.
(
)
->
Unit
)
void
State
Link copied to clipboard
fun
voidState
(
init
:
VoidState
<
T
,
ModelStates
,
C
,
V
>
.
(
)
->
Unit
)