Class AdaptiveIntProperty
java.lang.Object
dev.prozilla.pine.common.property.adaptive.AdaptiveProperty<Integer,IntProperty>
dev.prozilla.pine.common.property.adaptive.AdaptiveIntProperty
- All Implemented Interfaces:
Animatable,IntProperty,NonNullProperty<Integer>,Property<Integer>,Functor<Integer>
public final class AdaptiveIntProperty
extends AdaptiveProperty<Integer,IntProperty>
implements IntProperty
An optimized adaptive property, that uses a primitive int value.
-
Field Summary
Fields inherited from class dev.prozilla.pine.common.property.adaptive.AdaptiveProperty
animatedProperty, property -
Constructor Summary
ConstructorsConstructorDescriptionAdaptiveIntProperty(int fixedValue) Creates a new property with a fixed value.AdaptiveIntProperty(IntProperty property) Creates a new property with a dynamic value. -
Method Summary
Modifier and TypeMethodDescriptionstatic AdaptiveIntPropertyadapt(int value) Converts an integer into an adaptive property.static AdaptiveIntPropertyadapt(AdaptiveIntProperty property) static AdaptiveIntPropertyadapt(IntProperty property) Converts any integer property into an adaptive property.intget()Returns the primitive value of this property.Methods inherited from class dev.prozilla.pine.common.property.adaptive.AdaptiveProperty
isAnimated, isDynamic, restartAnimation, updateAnimationMethods 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.IntProperty
getValue, getValueOr, has, hasProperty, isZeroProperty, map, replaceNull, requireValueMethods 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
-
AdaptiveIntProperty
Creates a new property with a dynamic value.- Parameters:
property- Variable property that determines the value of this property
-
AdaptiveIntProperty
public AdaptiveIntProperty(int fixedValue) Creates a new property with a fixed value.
-
-
Method Details
-
get
public int get()Description copied from interface:IntPropertyReturns the primitive value of this property.- Specified by:
getin interfaceIntProperty- Returns:
- The primitive value of this property.
-
adapt
Converts an integer into an adaptive property.- Parameters:
value- The value of the property
-
adapt
-
adapt
Converts any integer property into an adaptive property.- Parameters:
property- The property to adapt
-