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
Modifier and TypeFieldDescriptionprivate final I
The field for thecoordinate
record component.private final float[]
The field for thederivatives
record component.private final float[]
The field for thelocations
record component.private final float
The field for themaxValue
record component.private final float
The field for theminValue
record component.private final List
<CubicSpline<C, I>> The field for thevalues
record component.Fields inherited from interface net.minecraft.util.ToFloatFunction
IDENTITY
-
Constructor Summary
ConstructorDescriptionMultipoint
(I coordinate, float[] locations, List<CubicSpline<C, I>> values, float[] derivatives, float minValue, float maxValue) Creates an instance of aMultipoint
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of thecoordinate
record 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 thederivatives
record component.final boolean
Indicates whether some other object is "equal to" this one.private static int
findIntervalStart
(float[] p_216149_, float p_216150_) final int
hashCode()
Returns a hash code value for this object.private static float
linearExtend
(float p_216134_, float[] p_216135_, float p_216136_, float[] p_216137_, int p_216138_) float[]
Returns the value of thelocations
record component.mapAll
(CubicSpline.CoordinateVisitor<I> p_211585_) float
maxValue()
Returns the value of themaxValue
record component.float
minValue()
Returns the value of theminValue
record component.final String
toString()
Returns a string representation of this record class.private String
toString
(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 thevalues
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.util.ToFloatFunction
comap
-
Field Details
-
coordinate
The field for thecoordinate
record component. -
locations
private final float[] locationsThe field for thelocations
record component. -
values
The field for thevalues
record component. -
derivatives
private final float[] derivativesThe field for thederivatives
record component. -
minValue
private final float minValueThe field for theminValue
record component. -
maxValue
private final float maxValueThe field for themaxValue
record 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 aMultipoint
record class.- Parameters:
coordinate
- the value for thecoordinate
record componentlocations
- the value for thelocations
record componentvalues
- the value for thevalues
record componentderivatives
- the value for thederivatives
record componentminValue
- the value for theminValue
record componentmaxValue
- the value for themaxValue
record 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:
apply
in interfaceToFloatFunction<C>
-
findIntervalStart
private static int findIntervalStart(float[] p_216149_, float p_216150_) -
parityString
- Specified by:
parityString
in interfaceCubicSpline<C,
I extends ToFloatFunction<C>>
-
toString
-
mapAll
- Specified by:
mapAll
in interfaceCubicSpline<C,
I extends ToFloatFunction<C>>
-
minValue
public float minValue()Returns the value of theminValue
record component.- Specified by:
minValue
in interfaceToFloatFunction<C>
- Returns:
- the value of the
minValue
record component
-
maxValue
public float maxValue()Returns the value of themaxValue
record component.- Specified by:
maxValue
in interfaceToFloatFunction<C>
- Returns:
- the value of the
maxValue
record 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 thecoordinate
record component.- Returns:
- the value of the
coordinate
record component
-
locations
public float[] locations()Returns the value of thelocations
record component.- Returns:
- the value of the
locations
record component
-
values
Returns the value of thevalues
record component.- Returns:
- the value of the
values
record component
-
derivatives
public float[] derivatives()Returns the value of thederivatives
record component.- Returns:
- the value of the
derivatives
record component
-