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>
  • Field Details

    • coordinate

      private final ToFloatFunction<C> coordinate
      The field for the coordinate record component.
    • locations

      private final float[] locations
      The field for the locations record component.
    • values

      private final List<CubicSpline<C>> values
      The field for the values record component.
    • derivatives

      private final float[] derivatives
      The field for the derivatives record component.
  • Constructor Details

    • Multipoint

      public Multipoint(ToFloatFunction<C> coordinate, float[] locations, List<CubicSpline<C>> values, float[] derivatives)
      Creates an instance of a Multipoint record class.
      Parameters:
      coordinate - the value for the coordinate record component
      locations - the value for the locations record component
      values - the value for the values record component
      derivatives - the value for the derivatives record component
  • Method Details

    • apply

      public float apply(C p_184340_)
      Specified by:
      apply in interface ToFloatFunction<C>
    • parityString

      public String parityString()
      Specified by:
      parityString in interface CubicSpline<C>
    • toString

      private String toString(float[] p_184335_)
    • min

      public float min()
      Specified by:
      min in interface CubicSpline<C>
    • max

      public float max()
      Specified by:
      max in interface CubicSpline<C>
    • mapAll

      public CubicSpline<C> mapAll(CubicSpline.CoordinateVisitor<C> p_211585_)
      Specified by:
      mapAll in interface CubicSpline<C>
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • coordinate

      public ToFloatFunction<C> coordinate()
      Returns the value of the coordinate record component.
      Returns:
      the value of the coordinate record component
    • locations

      public float[] locations()
      Returns the value of the locations record component.
      Returns:
      the value of the locations record component
    • values

      public List<CubicSpline<C>> values()
      Returns the value of the values record component.
      Returns:
      the value of the values record component
    • derivatives

      public float[] derivatives()
      Returns the value of the derivatives record component.
      Returns:
      the value of the derivatives record component