Class StateHolder
-
- All Implemented Interfaces:
public final class StateHolder<S extends Enum<S>>Holds the current state of a state machine execution. Mutable to allow state transitions during tool execution.
-
-
Field Summary
Fields Modifier and Type Field Description private final volatile ScurrentState
-
Constructor Summary
Constructors Constructor Description StateHolder(S initialState)
-
Method Summary
Modifier and Type Method Description final SgetCurrentState()final UnittransitionTo(S newState)-
-
Constructor Detail
-
StateHolder
StateHolder(S initialState)
-
-
Method Detail
-
getCurrentState
final S getCurrentState()
-
transitionTo
final Unit transitionTo(S newState)
-
-
-
-