Package net.minecraft.util
Record Class CubicSpline.Multipoint<C>
java.lang.Object
java.lang.Record
net.minecraft.util.CubicSpline.Multipoint<C>
- All Implemented Interfaces:
CubicSpline<C>
,ToFloatFunction<C>
- Enclosing interface:
- CubicSpline<C>
public static record CubicSpline.Multipoint<C>(ToFloatFunction<C> coordinate, float[] locations, List<CubicSpline<C>> values, float[] derivatives)
extends Record
implements CubicSpline<C>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.util.CubicSpline
CubicSpline.Builder<C>, CubicSpline.Constant<C>, CubicSpline.CoordinateVisitor<C>, CubicSpline.Multipoint<C>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ToFloatFunction<C>
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 List<CubicSpline<C>>
The field for thevalues
record component. -
Constructor Summary
ConstructorDescriptionMultipoint
(ToFloatFunction<C> coordinate, float[] locations, List<CubicSpline<C>> values, float[] derivatives) Creates an instance of aMultipoint
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of thecoordinate
record component.float[]
Returns the value of thederivatives
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.float[]
Returns the value of thelocations
record component.mapAll
(CubicSpline.CoordinateVisitor<C> p_211585_) float
max()
float
min()
final String
toString()
Returns a string representation of this record class.private String
toString
(float[] p_184335_) List<CubicSpline<C>>
values()
Returns the value of thevalues
record component.
-
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.
-
-
Constructor Details
-
Multipoint
public Multipoint(ToFloatFunction<C> coordinate, float[] locations, List<CubicSpline<C>> values, float[] derivatives) 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 component
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceToFloatFunction<C>
-
parityString
- Specified by:
parityString
in interfaceCubicSpline<C>
-
toString
-
min
public float min()- Specified by:
min
in interfaceCubicSpline<C>
-
max
public float max()- Specified by:
max
in interfaceCubicSpline<C>
-
mapAll
- Specified by:
mapAll
in interfaceCubicSpline<C>
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
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
-