public interface State extends StateObserver
State state = States.state(); StateObserver observer = state.getObserver(); observer.getChangeObserver().addDataListener(this::handleStateChange); state.set(true);
Modifier and Type | Interface and Description |
---|---|
static interface |
State.AggregateState
A state which behaves according to a set of states, either ANDing or ORing those together
when determining its own state.
|
static interface |
State.Group
A State.Group deactivates all other states when a state in the group is activated.
|
Modifier and Type | Method and Description |
---|---|
StateObserver |
getObserver() |
void |
set(boolean value) |
get, getReversedObserver
addDataListener, addListener, removeDataListener, removeListener
void set(boolean value)
value
- the new active state of this State instanceStateObserver getObserver()