Record Class JoinedInterpolation
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.interpolation.JoinedInterpolation
- All Implemented Interfaces:
Interpolation, CustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Interpolation>, CustomRegistryValue<io.netty.buffer.ByteBuf, Interpolation>, RefOptimizer<Interpolation>, WithKey
public record JoinedInterpolation(Ref<Interpolation> left, Ref<Interpolation> right)
extends Record
implements Interpolation
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DynamicType<io.netty.buffer.ByteBuf, Interpolation> Fields inherited from interface Interpolation
CODEC, DATA_TYPE, REGISTRY, STREAM_CODECFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionJoinedInterpolation(Ref<Interpolation> left, Ref<Interpolation> right) Creates an instance of aJoinedInterpolationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleinterpolate(double t) floatinterpolate(float t) left()Returns the value of theleftrecord component.right()Returns the value of therightrecord component.@NotNull StringtoString()Returns a string representation of this record class.CustomRegistryType<io.netty.buffer.ByteBuf, Interpolation> type()Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface Interpolation
getRegistry, interpolate, interpolate, interpolate, interpolate, interpolateClamped, interpolateClamped, interpolateMirrored, interpolateMirrored, isLinear, toEasingTypeMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
JoinedInterpolation
Creates an instance of aJoinedInterpolationrecord class.- Parameters:
left- the value for theleftrecord componentright- the value for therightrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Interpolation>
-
interpolate
public double interpolate(double t) - Specified by:
interpolatein interfaceInterpolation
-
interpolate
public float interpolate(float t) - Specified by:
interpolatein interfaceInterpolation
-
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). -
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-