public static class FiniteStateMachine.Builder<T> extends Object
FiniteStateMachine instance.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
FiniteStateMachine.Builder<T> |
addTransition(T startState,
T endState)
Add a legal transition to the
FiniteStateMachine. |
FiniteStateMachine.Builder<T> |
addUniversalEnd(T state)
Specify that a state is a valid end state for a transition starting from any state.
|
FiniteStateMachine<T> |
build(T initialState)
Build a
FiniteStateMachine starting at the given initial state. |
FiniteStateMachine.Builder<T> |
errorState(T state)
Specify the error state to which this machine can transition if nothing else is possible.
|
public FiniteStateMachine.Builder<T> addTransition(T startState, T endState)
FiniteStateMachine.public FiniteStateMachine.Builder<T> addUniversalEnd(T state)
public FiniteStateMachine.Builder<T> errorState(T state)
public FiniteStateMachine<T> build(T initialState)
FiniteStateMachine starting at the given initial state.