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.getObserver();

 observer.addDataListener(this::onStateChange);

 state.set(true);
 state.set(false);
 state.set(null); //translates to false
 
A factory class for State objects.