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
ConstructorsConstructorDescriptionSegmentData(int count, double average, double median, double least, double greatest) Creates an instance of aSegmentDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleaverage()Returns the value of theaveragerecord component.intcount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.doublegreatest()Returns the value of thegreatestrecord component.final inthashCode()Returns a hash code value for this object.doubleleast()Returns the value of theleastrecord component.doublemedian()Returns the value of themedianrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SegmentData
public SegmentData(int count, double average, double median, double least, double greatest) Creates an instance of aSegmentDatarecord class.- Parameters:
count- the value for thecountrecord componentaverage- the value for theaveragerecord componentmedian- the value for themedianrecord componentleast- the value for theleastrecord componentgreatest- the value for thegreatestrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
average
public double average()Returns the value of theaveragerecord component.- Returns:
- the value of the
averagerecord component
-
median
public double median()Returns the value of themedianrecord component.- Returns:
- the value of the
medianrecord component
-
least
public double least()Returns the value of theleastrecord component.- Returns:
- the value of the
leastrecord component
-
greatest
public double greatest()Returns the value of thegreatestrecord component.- Returns:
- the value of the
greatestrecord component
-