Class SimpleMutableBooleanProperty
java.lang.Object
dev.prozilla.pine.common.property.mutable.SimpleMutableBooleanProperty
- All Implemented Interfaces:
BooleanProperty,MutableBooleanProperty,MutableProperty<Boolean>,NonNullProperty<Boolean>,Property<Boolean>,Functor<Boolean>
- Direct Known Subclasses:
SimpleObservableBooleanProperty
-
Field Summary
Fields inherited from interface dev.prozilla.pine.common.property.BooleanProperty
FALSE, TRUE -
Constructor Summary
ConstructorsConstructorDescriptionSimpleMutableBooleanProperty(boolean initialValue) Creates a mutable property with an initial value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanget()Returns the primitive value of this property.protected voidonValueChange(boolean oldValue, boolean newValue) This method is called whenever the value of this property changes.booleanset(boolean value) Sets the value of this property.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.prozilla.pine.common.property.BooleanProperty
and, and, getValue, getValueOr, has, hasProperty, ifElse, map, not, or, or, replaceNull, requireValue, xor, xorMethods inherited from interface dev.prozilla.pine.common.property.mutable.MutableBooleanProperty
modify, setValue, swap, toggle, viewPropertyMethods inherited from interface dev.prozilla.pine.common.property.mutable.MutableProperty
modifyValue, swapValueMethods inherited from interface dev.prozilla.pine.common.property.NonNullProperty
isNotNull, isNotNullPropertyMethods inherited from interface dev.prozilla.pine.common.property.Property
hasValue, hasValueProperty, isNull, map, snapshot, toStringProperty
-
Constructor Details
-
SimpleMutableBooleanProperty
public SimpleMutableBooleanProperty(boolean initialValue) Creates a mutable property with an initial value.- Parameters:
initialValue- The initial value
-
-
Method Details
-
set
public boolean set(boolean value) Description copied from interface:MutableBooleanPropertySets the value of this property.- Specified by:
setin interfaceMutableBooleanProperty- Parameters:
value- The new value- Returns:
trueif the value was changed.
-
onValueChange
protected void onValueChange(boolean oldValue, boolean newValue) This method is called whenever the value of this property changes.The default implementation does nothing.
- Parameters:
oldValue- The previous valuenewValue- The new value
-
get
public boolean get()Description copied from interface:BooleanPropertyReturns the primitive value of this property.- Specified by:
getin interfaceBooleanProperty- Returns:
- The primitive value of this property.
-