public class StateTool
extends Object
Utility methods for state machines based on enums.
-
Method Summary
static <T extends Enum<?>>
void
check(T currentState,
T... expectedStates)
Verifies currentState
is in one of expectedStates
, throws an
IllegalArgumentException if it isn't.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
check
public static <T extends Enum<?>> void check(T currentState,
T... expectedStates)
Verifies currentState
is in one of expectedStates
, throws an
IllegalArgumentException if it isn't.