Package net.minecraft.util
Record Class CubicSpline.Multipoint<C,I extends ToFloatFunction<C>>
java.lang.Object
java.lang.Record
net.minecraft.util.CubicSpline.Multipoint<C,I>
- All Implemented Interfaces:
CubicSpline<C,,I> ToFloatFunction<C>
- Enclosing interface:
- CubicSpline<C,
I extends ToFloatFunction<C>>
public static record CubicSpline.Multipoint<C,I extends ToFloatFunction<C>> (I extends ToFloatFunction<C> coordinate, float[] locations, List<CubicSpline<C,I extends ToFloatFunction<C>>> values, float[] derivatives, float minValue, float maxValue)
extends Record
implements CubicSpline<C,I>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.util.CubicSpline
CubicSpline.Builder<C,I extends ToFloatFunction<C>>, CubicSpline.Constant<C, I extends ToFloatFunction<C>>, CubicSpline.CoordinateVisitor<I>, CubicSpline.Multipoint<C, I extends ToFloatFunction<C>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IThe field for thecoordinaterecord component.private final float[]The field for thederivativesrecord component.private final float[]The field for thelocationsrecord component.private final floatThe field for themaxValuerecord component.private final floatThe field for theminValuerecord component.private final List<CubicSpline<C,I>> The field for thevaluesrecord component.Fields inherited from interface net.minecraft.util.ToFloatFunction
IDENTITY -
Constructor Summary
ConstructorsConstructorDescriptionMultipoint(I coordinate, float[] locations, List<CubicSpline<C, I>> values, float[] derivatives, float minValue, float maxValue) Creates an instance of aMultipointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thecoordinaterecord component.(package private) static <C,I extends ToFloatFunction<C>>
CubicSpline.Multipoint<C,I> create(I p_216144_, float[] p_216145_, List<CubicSpline<C, I>> p_216146_, float[] p_216147_) float[]Returns the value of thederivativesrecord component.final booleanIndicates whether some other object is "equal to" this one.private static intfindIntervalStart(float[] p_216149_, float p_216150_) final inthashCode()Returns a hash code value for this object.private static floatlinearExtend(float p_216134_, float[] p_216135_, float p_216136_, float[] p_216137_, int p_216138_) float[]Returns the value of thelocationsrecord component.mapAll(CubicSpline.CoordinateVisitor<I> p_211585_) floatmaxValue()Returns the value of themaxValuerecord component.floatminValue()Returns the value of theminValuerecord component.final StringtoString()Returns a string representation of this record class.private StringtoString(float[] p_184335_) private static <C,I extends ToFloatFunction<C>>
voidvalidateSizes(float[] p_216152_, List<CubicSpline<C, I>> p_216153_, float[] p_216154_) List<CubicSpline<C,I>> values()Returns the value of thevaluesrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.ToFloatFunction
comap
-
Field Details
-
coordinate
The field for thecoordinaterecord component. -
locations
private final float[] locationsThe field for thelocationsrecord component. -
values
The field for thevaluesrecord component. -
derivatives
private final float[] derivativesThe field for thederivativesrecord component. -
minValue
private final float minValueThe field for theminValuerecord component. -
maxValue
private final float maxValueThe field for themaxValuerecord component.
-
-
Constructor Details
-
Multipoint
public Multipoint(I coordinate, float[] locations, List<CubicSpline<C, I>> values, float[] derivatives, float minValue, float maxValue) Creates an instance of aMultipointrecord class.- Parameters:
coordinate- the value for thecoordinaterecord componentlocations- the value for thelocationsrecord componentvalues- the value for thevaluesrecord componentderivatives- the value for thederivativesrecord componentminValue- the value for theminValuerecord componentmaxValue- the value for themaxValuerecord component
-
-
Method Details
-
create
static <C,I extends ToFloatFunction<C>> CubicSpline.Multipoint<C,I> create(I p_216144_, float[] p_216145_, List<CubicSpline<C, I>> p_216146_, float[] p_216147_) -
linearExtend
private static float linearExtend(float p_216134_, float[] p_216135_, float p_216136_, float[] p_216137_, int p_216138_) -
validateSizes
private static <C,I extends ToFloatFunction<C>> void validateSizes(float[] p_216152_, List<CubicSpline<C, I>> p_216153_, float[] p_216154_) -
apply
- Specified by:
applyin interfaceToFloatFunction<C>
-
findIntervalStart
private static int findIntervalStart(float[] p_216149_, float p_216150_) -
parityString
- Specified by:
parityStringin interfaceCubicSpline<C,I extends ToFloatFunction<C>>
-
toString
-
mapAll
- Specified by:
mapAllin interfaceCubicSpline<C,I extends ToFloatFunction<C>>
-
minValue
public float minValue()Returns the value of theminValuerecord component.- Specified by:
minValuein interfaceToFloatFunction<C>- Returns:
- the value of the
minValuerecord component
-
maxValue
public float maxValue()Returns the value of themaxValuerecord component.- Specified by:
maxValuein interfaceToFloatFunction<C>- Returns:
- the value of the
maxValuerecord component
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
coordinate
Returns the value of thecoordinaterecord component.- Returns:
- the value of the
coordinaterecord component
-
locations
public float[] locations()Returns the value of thelocationsrecord component.- Returns:
- the value of the
locationsrecord component
-
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-
derivatives
public float[] derivatives()Returns the value of thederivativesrecord component.- Returns:
- the value of the
derivativesrecord component
-