Record Class KeyframeTrackSampler.Segment<T>

java.lang.Object
java.lang.Record
net.minecraft.util.KeyframeTrackSampler.Segment<T>
Enclosing class:
KeyframeTrackSampler<T>

private static record KeyframeTrackSampler.Segment<T>(EasingType easing, T fromValue, int fromTicks, T toValue, int toTicks) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final EasingType
    The field for the easing record component.
    private final int
    The field for the fromTicks record component.
    private final T
    The field for the fromValue record component.
    private final int
    The field for the toTicks record component.
    private final T
    The field for the toValue record component.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Segment(EasingType easing, T fromValue, int fromTicks, T toValue, int toTicks)
    Creates an instance of a Segment record class.
     
    Segment(KeyframeTrack<T> track, Keyframe<T> from, int fromTicks, Keyframe<T> to, int toTicks)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the easing record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the fromTicks record component.
    Returns the value of the fromValue record component.
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the toTicks record component.
    Returns the value of the toValue record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • easing

      private final EasingType easing
      The field for the easing record component.
    • fromValue

      private final T fromValue
      The field for the fromValue record component.
    • fromTicks

      private final int fromTicks
      The field for the fromTicks record component.
    • toValue

      private final T toValue
      The field for the toValue record component.
    • toTicks

      private final int toTicks
      The field for the toTicks record component.
  • Constructor Details

    • Segment

      public Segment(KeyframeTrack<T> track, Keyframe<T> from, int fromTicks, Keyframe<T> to, int toTicks)
    • Segment

      private Segment(EasingType easing, T fromValue, int fromTicks, T toValue, int toTicks)
      Creates an instance of a Segment record class.
      Parameters:
      easing - the value for the easing record component
      fromValue - the value for the fromValue record component
      fromTicks - the value for the fromTicks record component
      toValue - the value for the toValue record component
      toTicks - the value for the toTicks record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • easing

      public EasingType easing()
      Returns the value of the easing record component.
      Returns:
      the value of the easing record component
    • fromValue

      public T fromValue()
      Returns the value of the fromValue record component.
      Returns:
      the value of the fromValue record component
    • fromTicks

      public int fromTicks()
      Returns the value of the fromTicks record component.
      Returns:
      the value of the fromTicks record component
    • toValue

      public T toValue()
      Returns the value of the toValue record component.
      Returns:
      the value of the toValue record component
    • toTicks

      public int toTicks()
      Returns the value of the toTicks record component.
      Returns:
      the value of the toTicks record component