| Constructor and Description |
|---|
Builder(Class<S> klass,
S initialState,
S errorState)
State machine builder.
|
| Modifier and Type | Method and Description |
|---|---|
StateMachine.Builder<S> |
addTransition(S source,
S target1,
S... targets)
Add arcs to the DAG.
|
StateMachine<S> |
build()
Create the state machine.
|
public Builder(@NonNull
Class<S> klass,
@NonNull
S initialState,
@Nullable
S errorState)
klass - The class of the enum of states.initialState - The start state for the machine.errorState - The machine error state.@NonNull @SafeVarargs public final StateMachine.Builder<S> addTransition(@NonNull S source, @NonNull S target1, @NonNull S... targets)
source - of the arcs.target1 - the end of the first arctargets - the ends of other arcs@NonNull public StateMachine<S> build()