Interface MutableIntProperty
- All Superinterfaces:
Functor<Integer>,IntProperty,MutableProperty<Integer>,NonNullProperty<Integer>,Property<Integer>
- All Known Subinterfaces:
ObservableIntProperty
- All Known Implementing Classes:
DeserializedIntProperty,IntConfigOption,RangedMutableIntProperty,SimpleMutableIntProperty,SimpleObservableIntProperty,StoredIntProperty
A property with an integer value that can be changed.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanApplies a mapper to the value of this property.booleanset(int value) Sets the value of this property.default booleanSets the value of this property.default intswap(int value) Replaces the value with a new value and returns its previous value.default IntPropertyMethods inherited from interface dev.prozilla.pine.common.property.IntProperty
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<Integer>- Parameters:
value- The new value- Returns:
trueif the value was changed.
-
swap
default int swap(int 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(int value) Sets the value of this property.- Parameters:
value- The new value- Returns:
trueif the value was changed.
-
viewProperty
- Specified by:
viewPropertyin interfaceMutableProperty<Integer>
-