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