Record Class ConstantInterpolator
java.lang.Object
java.lang.Record
cromveil.combatnumbers.animation.ConstantInterpolator
- All Implemented Interfaces:
Interpolator
public record ConstantInterpolator(ConstantInterpolator.RandomSource source, ComposeMode compose)
extends Record
implements Interpolator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic interfacestatic final record -
Constructor Summary
ConstructorsConstructorDescriptionConstantInterpolator(ConstantInterpolator.RandomSource source, ComposeMode compose) Creates an instance of aConstantInterpolatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncompose()Returns the value of thecomposerecord component.floatendValue()final booleanIndicates whether some other object is "equal to" this one.static ConstantInterpolatorfixed(float value) static ConstantInterpolatorfixed(float value, ComposeMode compose) final inthashCode()Returns a hash code value for this object.static ConstantInterpolatorrange(float min, float max) static ConstantInterpolatorrange(float min, float max, boolean signed) static ConstantInterpolatorrange(float min, float max, boolean signed, ComposeMode compose) static ConstantInterpolatorrange(float min, float max, ComposeMode compose) source()Returns the value of thesourcerecord component.floatfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConstantInterpolator
Creates an instance of aConstantInterpolatorrecord class.- Parameters:
source- the value for thesourcerecord componentcompose- the value for thecomposerecord component
-
-
Method Details
-
fixed
-
fixed
-
range
-
range
-
range
-
range
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
compose
Returns the value of thecomposerecord component.- Specified by:
composein interfaceInterpolator- Returns:
- the value of the
composerecord component
-