Interface State

All Superinterfaces:
Consumer<Boolean>, Observer<Boolean>, StateObserver, 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.set(null); //translates to false
 
 
A factory for State instances.
See Also: