Record Class Backtester.Segment
java.lang.Object
java.lang.Record
com.quantfinlib.backtest.Backtester.Segment
- Enclosing class:
Backtester
public static record Backtester.Segment(BacktestResult result, Backtester.State endState)
extends Record
A segment's result and the state it ended in.
-
Constructor Summary
ConstructorsConstructorDescriptionSegment(BacktestResult result, Backtester.State endState) Creates an instance of aSegmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionendState()Returns the value of theendStaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Segment
Creates an instance of aSegmentrecord class.- Parameters:
result- the value for theresultrecord componentendState- the value for theendStaterecord 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 withObjects::equals(Object,Object). -
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
endState
Returns the value of theendStaterecord component.- Returns:
- the value of the
endStaterecord component
-