public class State<T> extends AbstractState<T,RuntimeException>
AbstractState subtype with the error type set as RuntimeException.| Constructor and Description |
|---|
State(T initialState)
Constructor for State.
|
| Modifier and Type | Method and Description |
|---|---|
T |
attemptSetState(Set<T> prerequisiteState,
T newState)
attemptSetState.
|
protected void |
clearError()
clearError.
|
void |
setError(RuntimeException error)
setError.
|
boolean |
setState(T state)
setState.
|
T |
setState(T state,
Executor listenerExecutor,
Set<T> prerequisiteStates)
Set state.
|
void |
throwIfError()
assertNoError.
|
addStateListener, addStateNotifiable, getError, getState, hasError, isStateTransitionAllowed, onListenerException, onStateTransition, removeStateListener, removeStateNotifiable, waitForState, waitForState, waitForStateUninterruptiblypublic State(T initialState)
Constructor for State.
initialState - a StateType object.public T attemptSetState(Set<T> prerequisiteState, T newState)
attemptSetState.
attemptSetState in class AbstractState<T,RuntimeException>prerequisiteState - a Set object.newState - a StateType object.public void setError(RuntimeException error)
setError.
setError in class AbstractState<T,RuntimeException>error - a RuntimeException object.public boolean setState(T state)
setState.
setState in class AbstractState<T,RuntimeException>state - a StateType object.public T setState(T state, Executor listenerExecutor, Set<T> prerequisiteStates)
AbstractStatesetState in class AbstractState<T,RuntimeException>state - a StateType object.listenerExecutor - executor for post listener handling or null for immediateprerequisiteStates - old state prerequisite or nullpublic void throwIfError()
throws RuntimeException
AbstractStateassertNoError.
throwIfError in class AbstractState<T,RuntimeException>RuntimeExceptionprotected void clearError()
AbstractStateclearError.
clearError in class AbstractState<T,RuntimeException>Copyright © 2026. All rights reserved.