Class SimpleMutableFloatProperty
java.lang.Object
dev.prozilla.pine.common.property.mutable.SimpleMutableFloatProperty
- All Implemented Interfaces:
FloatProperty,MutableFloatProperty,MutableProperty<Float>,NonNullProperty<Float>,Property<Float>,Functor<Float>
- Direct Known Subclasses:
SimpleObservableFloatProperty
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleMutableFloatProperty(float initialValue) Creates a mutable property with an initial value. -
Method Summary
Modifier and TypeMethodDescriptionfloatget()Returns the primitive value of this property.protected voidonValueChange(float oldValue, float newValue) This method is called whenever the value of this property changes.booleanset(float 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.FloatProperty
getValue, getValueOr, has, hasProperty, isZeroProperty, map, replaceNull, requireValueMethods inherited from interface dev.prozilla.pine.common.property.mutable.MutableFloatProperty
modify, setValue, swap, 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
-
SimpleMutableFloatProperty
public SimpleMutableFloatProperty(float initialValue) Creates a mutable property with an initial value.- Parameters:
initialValue- The initial value
-
-
Method Details
-
set
public boolean set(float value) Description copied from interface:MutableFloatPropertySets the value of this property.- Specified by:
setin interfaceMutableFloatProperty- Parameters:
value- The new value- Returns:
trueif the value was changed.
-
onValueChange
protected void onValueChange(float oldValue, float 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 float get()Description copied from interface:FloatPropertyReturns the primitive value of this property.- Specified by:
getin interfaceFloatProperty- Returns:
- The primitive value of this property.
-