Record Class TickData.SegmentData

java.lang.Object
java.lang.Record
ca.spottedleaf.common.time.TickData.SegmentData
Enclosing class:
TickData

public static record TickData.SegmentData(int count, double average, double median, double least, double greatest) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    SegmentData(int count, double average, double median, double least, double greatest)
    Creates an instance of a SegmentData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the average record component.
    int
    Returns the value of the count record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the greatest record component.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the least record component.
    double
    Returns the value of the median record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • SegmentData

      public SegmentData(int count, double average, double median, double least, double greatest)
      Creates an instance of a SegmentData record class.
      Parameters:
      count - the value for the count record component
      average - the value for the average record component
      median - the value for the median record component
      least - the value for the least record component
      greatest - the value for the greatest 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. All components in this record class 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.
    • count

      public int count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component
    • average

      public double average()
      Returns the value of the average record component.
      Returns:
      the value of the average record component
    • median

      public double median()
      Returns the value of the median record component.
      Returns:
      the value of the median record component
    • least

      public double least()
      Returns the value of the least record component.
      Returns:
      the value of the least record component
    • greatest

      public double greatest()
      Returns the value of the greatest record component.
      Returns:
      the value of the greatest record component