Interface MutableFloatProperty
- All Superinterfaces:
FloatProperty,Functor<Float>,MutableProperty<Float>,NonNullProperty<Float>,Property<Float>
- All Known Subinterfaces:
ObservableFloatProperty
- All Known Implementing Classes:
DeserializedFloatProperty,FloatConfigOption,SimpleMutableFloatProperty,SimpleObservableFloatProperty,StoredFloatProperty
A property with a float value that can be changed.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanmodify(FloatMapper mapper) Applies a mapper to the value of this property.booleanset(float value) Sets the value of this property.default booleanSets the value of this property.default floatswap(float value) Replaces the value with a new value and returns its previous value.default FloatPropertyMethods inherited from interface dev.prozilla.pine.common.property.FloatProperty
get, getValue, getValueOr, has, hasProperty, isZeroProperty, map, replaceNull, requireValueMethods 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
-
Method Details
-
setValue
Description copied from interface:MutablePropertySets the value of this property.- Specified by:
setValuein interfaceMutableProperty<Float>- Parameters:
value- The new value- Returns:
trueif the value was changed.
-
swap
default float swap(float value) Replaces the value with a new value and returns its previous value.- Parameters:
value- The new value- Returns:
- The previous value.
-
modify
Applies a mapper to the value of this property.- Parameters:
mapper- The mapper to apply- Returns:
trueif the value was changed.
-
set
boolean set(float value) Sets the value of this property.- Parameters:
value- The new value- Returns:
trueif the value was changed.
-
viewProperty
- Specified by:
viewPropertyin interfaceMutableProperty<Float>
-