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
FieldsModifier and TypeFieldDescriptionprivate final ToFloatFunction<C>The field for thecoordinaterecord component.private final float[]The field for thederivativesrecord component.private final float[]The field for thelocationsrecord component.private final List<CubicSpline<C>>The field for thevaluesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMultipoint(ToFloatFunction<C> coordinate, float[] locations, List<CubicSpline<C>> values, float[] derivatives) Creates an instance of aMultipointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thecoordinaterecord component.float[]Returns the value of thederivativesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.float[]Returns the value of thelocationsrecord component.mapAll(CubicSpline.CoordinateVisitor<C> p_211585_) floatmax()floatmin()final StringtoString()Returns a string representation of this record class.private StringtoString(float[] p_184335_) List<CubicSpline<C>>values()Returns the value of thevaluesrecord component.
-
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.
-
-
Constructor Details
-
Multipoint
public Multipoint(ToFloatFunction<C> coordinate, float[] locations, List<CubicSpline<C>> values, float[] derivatives) 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 component
-
-
Method Details
-
apply
- Specified by:
applyin interfaceToFloatFunction<C>
-
parityString
- Specified by:
parityStringin interfaceCubicSpline<C>
-
toString
-
min
public float min()- Specified by:
minin interfaceCubicSpline<C>
-
max
public float max()- Specified by:
maxin interfaceCubicSpline<C>
-
mapAll
- Specified by:
mapAllin 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 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
-