Record Class CompositeInterpolation
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.interpolation.CompositeInterpolation
- All Implemented Interfaces:
Interpolation, CustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Interpolation>, CustomRegistryValue<io.netty.buffer.ByteBuf, Interpolation>, RefOptimizer<Interpolation>, WithKey
public record CompositeInterpolation(Ref<Interpolation> in, Ref<Interpolation> out, @Nullable UnitType<io.netty.buffer.ByteBuf, Interpolation> unitType)
extends Record
implements Interpolation
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final List<UnitType<io.netty.buffer.ByteBuf, Interpolation>> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static final UnitType<io.netty.buffer.ByteBuf, Interpolation> static 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
ConstructorsConstructorDescriptionCompositeInterpolation(Ref<Interpolation> in, Ref<Interpolation> out, @Nullable UnitType<io.netty.buffer.ByteBuf, Interpolation> unitType) Creates an instance of aCompositeInterpolationrecord 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.in()Returns the value of theinrecord component.doubleinterpolate(double t) floatinterpolate(float t) static CompositeInterpolationof(Ref<Interpolation> inRef, Ref<Interpolation> outRef) optimize()out()Returns the value of theoutrecord component.@NotNull StringtoString()Returns a string representation of this record class.CustomRegistryType<io.netty.buffer.ByteBuf, Interpolation> type()@Nullable UnitType<io.netty.buffer.ByteBuf, Interpolation> unitType()Returns the value of theunitTyperecord component.Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface Interpolation
getRegistry, interpolate, interpolate, interpolate, interpolate, interpolateClamped, interpolateClamped, interpolateMirrored, interpolateMirrored, isLinear, toEasingType
-
Field Details
-
SINE
-
QUAD
-
CUBIC
-
QUART
-
QUINT
-
EXPO
-
CIRC
-
BACK
-
ELASTIC
-
BOUNCE
-
EASING
-
TYPE
-
-
Constructor Details
-
CompositeInterpolation
public CompositeInterpolation(Ref<Interpolation> in, Ref<Interpolation> out, @Nullable @Nullable UnitType<io.netty.buffer.ByteBuf, Interpolation> unitType) Creates an instance of aCompositeInterpolationrecord class.- Parameters:
in- the value for theinrecord componentout- the value for theoutrecord componentunitType- the value for theunitTyperecord component
-
-
Method Details
-
of
-
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
-
optimize
- Specified by:
optimizein interfaceRefOptimizer<Interpolation>
-
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). -
in
Returns the value of theinrecord component.- Returns:
- the value of the
inrecord component
-
out
Returns the value of theoutrecord component.- Returns:
- the value of the
outrecord component
-
unitType
Returns the value of theunitTyperecord component.- Returns:
- the value of the
unitTyperecord component
-