Interface IntProperty
- All Known Subinterfaces:
MutableIntProperty,ObservableIntProperty
- All Known Implementing Classes:
AdaptiveIntProperty,AnimatedIntProperty,DeserializedIntProperty,FixedIntProperty,IntConfigOption,LocalRandomIntProperty,RandomIntProperty,RangedMutableIntProperty,SimpleMutableIntProperty,SimpleObservableIntProperty,StoredIntProperty,StyledIntProperty,TransitionedIntProperty
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A property with an integer value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntPropertyfromProperty(IntProperty property) static IntPropertyfromProperty(Property<Integer> property) intget()Returns the primitive value of this property.default IntegergetValue()Returns the value of this property.static intgetValueOf(IntProperty property, int defaultValue) Returns the value of a given property, or a default value if the property isnull.default IntegergetValueOr(Integer defaultValue) Returns the value of this property, ordefaultValueif the value isnull.default booleanhas(int value) default BooleanPropertyhasProperty(int value) Returns a boolean property whose value istrueif the value of this property is equal tovalue.default BooleanPropertyReturns a boolean property whose value istrueif the value of this property is0.default IntPropertydefault IntPropertyreplaceNull(Integer defaultValue) Returns this property, whose value is nevernull.default @NotNull IntegerReturns the value of this property, if it is notnull, otherwise throws an exception.Methods 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
-
getValueOr
Description copied from interface:PropertyReturns the value of this property, ordefaultValueif the value isnull.- Specified by:
getValueOrin interfaceProperty<Integer>- Parameters:
defaultValue- The default value to use- Returns:
- The value of this property, or
defaultValueif the value isnull.
-
requireValue
Description copied from interface:PropertyReturns the value of this property, if it is notnull, otherwise throws an exception.- Specified by:
requireValuein interfaceProperty<Integer>- Returns:
- The value of this property
-
getValue
Description copied from interface:PropertyReturns the value of this property. -
get
int get()Returns the primitive value of this property.- Returns:
- The primitive value of this property.
-
has
default boolean has(int value) -
replaceNull
Description copied from interface:NonNullPropertyReturns this property, whose value is nevernull.- Specified by:
replaceNullin interfaceNonNullProperty<Integer>- Specified by:
replaceNullin interfaceProperty<Integer>- Returns:
- This property.
-
map
-
isZeroProperty
Returns a boolean property whose value istrueif the value of this property is0.- Returns:
- A boolean property based on whether the value of this property is
0. - See Also:
-
hasProperty
Returns a boolean property whose value istrueif the value of this property is equal tovalue.- Returns:
- A boolean property whose value is
trueif the value of this property is equal tovalue. - See Also:
-
fromProperty
-
fromProperty
-
getValueOf
Returns the value of a given property, or a default value if the property isnull.- Parameters:
property- The property ornulldefaultValue- The value to use in case the property isnull.- Returns:
- The value
-