Interface State

All Superinterfaces:
Consumer<Boolean>, EventObserver<Boolean>, StateObserver, Supplier<Boolean>, Value<Boolean>, ValueObserver<Boolean>

public interface State extends StateObserver, Value<Boolean>
A class encapsulating a boolean state, non-nullable with null values translated to false.
 State state = State.state();

 StateObserver observer = state.observer();

 observer.addConsumer(this::onStateChange);

 state.set(true);
 state.set(false);
 state.clear(); //translates to false
 
A factory for State instances.
See Also: