Package com.tnsai.evaluation.reporting
Record Class TrendAnalyzer.MetricTrend
java.lang.Object
java.lang.Record
com.tnsai.evaluation.reporting.TrendAnalyzer.MetricTrend
- Enclosing class:
TrendAnalyzer
public static record TrendAnalyzer.MetricTrend(double firstValue, double lastValue, double absoluteChange, double percentChange, double slope, TrendAnalyzer.Direction direction)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMetricTrend(double firstValue, double lastValue, double absoluteChange, double percentChange, double slope, TrendAnalyzer.Direction direction) Creates an instance of aMetricTrendrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theabsoluteChangerecord component.Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thefirstValuerecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thelastValuerecord component.doubleReturns the value of thepercentChangerecord component.doubleslope()Returns the value of thesloperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MetricTrend
public MetricTrend(double firstValue, double lastValue, double absoluteChange, double percentChange, double slope, TrendAnalyzer.Direction direction) Creates an instance of aMetricTrendrecord class.- Parameters:
firstValue- the value for thefirstValuerecord componentlastValue- the value for thelastValuerecord componentabsoluteChange- the value for theabsoluteChangerecord componentpercentChange- the value for thepercentChangerecord componentslope- the value for thesloperecord componentdirection- the value for thedirectionrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
firstValue
public double firstValue()Returns the value of thefirstValuerecord component.- Returns:
- the value of the
firstValuerecord component
-
lastValue
public double lastValue()Returns the value of thelastValuerecord component.- Returns:
- the value of the
lastValuerecord component
-
absoluteChange
public double absoluteChange()Returns the value of theabsoluteChangerecord component.- Returns:
- the value of the
absoluteChangerecord component
-
percentChange
public double percentChange()Returns the value of thepercentChangerecord component.- Returns:
- the value of the
percentChangerecord component
-
slope
public double slope()Returns the value of thesloperecord component.- Returns:
- the value of the
sloperecord component
-
direction
Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-