Record Class TweenInterpolator
java.lang.Object
java.lang.Record
cromveil.combatnumbers.animation.TweenInterpolator
- All Implemented Interfaces:
Interpolator
public record TweenInterpolator(float from, Interpolator toInterpolator, float toValue, Easing easing, ComposeMode compose)
extends Record
implements Interpolator
-
Constructor Summary
ConstructorsConstructorDescriptionTweenInterpolator(float from, Interpolator toInterpolator, float toValue, Easing easing, ComposeMode compose) Creates an instance of aTweenInterpolatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncompose()Returns the value of thecomposerecord component.easing()Returns the value of theeasingrecord component.floatendValue()final booleanIndicates whether some other object is "equal to" this one.floatfrom()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.booleanfloatReturns the value of thetoInterpolatorrecord component.static TweenInterpolatortoInterpolator(float from, Interpolator target, Easing easing) static TweenInterpolatortoInterpolator(float from, Interpolator target, Easing easing, ComposeMode compose) final StringtoString()Returns a string representation of this record class.floattoValue()Returns the value of thetoValuerecord component.static TweenInterpolatortoValue(float from, float to) static TweenInterpolatorstatic TweenInterpolatortoValue(float from, float to, Easing easing, ComposeMode compose)
-
Constructor Details
-
TweenInterpolator
public TweenInterpolator(float from, Interpolator toInterpolator, float toValue, Easing easing, ComposeMode compose) Creates an instance of aTweenInterpolatorrecord class.- Parameters:
from- the value for thefromrecord componenttoInterpolator- the value for thetoInterpolatorrecord componenttoValue- the value for thetoValuerecord componenteasing- the value for theeasingrecord componentcompose- the value for thecomposerecord component
-
-
Method Details
-
toValue
-
toValue
-
toValue
-
toInterpolator
public static TweenInterpolator toInterpolator(float from, Interpolator target, Easing easing, ComposeMode compose) -
toInterpolator
-
hasNestedInterpolator
public boolean hasNestedInterpolator() -
startValue
public float startValue()- Specified by:
startValuein interfaceInterpolator
-
endValue
public float endValue()- Specified by:
endValuein interfaceInterpolator
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
from
public float from()Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
toInterpolator
Returns the value of thetoInterpolatorrecord component.- Returns:
- the value of the
toInterpolatorrecord component
-
toValue
public float toValue()Returns the value of thetoValuerecord component.- Returns:
- the value of the
toValuerecord component
-
easing
Returns the value of theeasingrecord component.- Returns:
- the value of the
easingrecord component
-
compose
Returns the value of thecomposerecord component.- Specified by:
composein interfaceInterpolator- Returns:
- the value of the
composerecord component
-