Class AdaptiveIntProperty
java.lang.Object
dev.prozilla.pine.common.property.VariableProperty<Integer>
dev.prozilla.pine.common.property.adaptive.AdaptivePropertyBase<Integer>
dev.prozilla.pine.common.property.adaptive.AdaptiveIntProperty
- All Implemented Interfaces:
Animatable
An optimized adaptive property, that uses a primitive int value.
-
Field Summary
Fields inherited from class dev.prozilla.pine.common.property.adaptive.AdaptivePropertyBase
animatedProperty, variablePropertyFields inherited from class dev.prozilla.pine.common.property.VariableProperty
random -
Constructor Summary
ConstructorsConstructorDescriptionAdaptiveIntProperty(int fixedValue) Creates a new property with a fixed value.AdaptiveIntProperty(VariableProperty<Integer> variableProperty) 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(VariableProperty<Integer> property) Converts any integer property into an adaptive property.intgetValue()Returns the value of this property.Methods inherited from class dev.prozilla.pine.common.property.adaptive.AdaptivePropertyBase
isAnimated, isDynamic, restartAnimation, updateAnimationMethods inherited from class dev.prozilla.pine.common.property.VariableProperty
exists, hasValue
-
Constructor Details
-
AdaptiveIntProperty
Creates a new property with a dynamic value.- Parameters:
variableProperty- Variable property that determines the value of this property
-
AdaptiveIntProperty
public AdaptiveIntProperty(int fixedValue) Creates a new property with a fixed value.
-
-
Method Details
-
getValue
Description copied from class:VariablePropertyReturns the value of this property.- Specified by:
getValuein classVariableProperty<Integer>- Returns:
- The value of this property.
-
getPrimitiveValue
public int getPrimitiveValue() -
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
-