Modifier and Type | Class and Description |
---|---|
static class |
StateMachine.Builder<S extends Enum<S>> |
Modifier and Type | Method and Description |
---|---|
boolean |
checkState(T... expected)
Verify expected state.
|
boolean |
setState(T nextState)
Set the new state.
|
String |
toString() |
@SafeVarargs public final boolean checkState(@NonNull T... expected)
expected
- expected states.public final boolean setState(@NonNull T nextState)
nextState
- the requested new state