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, variableProperty
Fields 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 AdaptiveIntProperty
adapt
(int value) Converts an integer into an adaptive property.static AdaptiveIntProperty
adapt
(AdaptiveIntProperty property) static AdaptiveIntProperty
adapt
(VariableProperty<Integer> property) Converts any integer property into an adaptive property.int
getValue()
Methods inherited from class dev.prozilla.pine.common.property.adaptive.AdaptivePropertyBase
isAnimated, isDynamic, restartAnimation, updateAnimation
-
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
- Specified by:
getValue
in 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
-