Record Class CumulativeStrategyReportEntry
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.anther.models.strategy.CumulativeStrategyReportEntry
- Record Components:
points- cumulative pointsnetProfit- cumulative profittrades- cumulative tradestradeType- type of tradeopened- open timeclosed- close timepointsForTrade- points only for this trade, not cumulativeprofitForTrade- profit only for this trade, not cumulative
public record CumulativeStrategyReportEntry(double points, double netProfit, int trades, String tradeType, LocalDateTime opened, LocalDateTime closed, double pointsForTrade, double profitForTrade)
extends Record
Representation of a cumulative entry when computing strategy results.
- Version:
- 1.0.1
- Author:
- Stephen Prizio
-
Constructor Summary
ConstructorsConstructorDescriptionCumulativeStrategyReportEntry(double points, double netProfit, int trades, String tradeType, LocalDateTime opened, LocalDateTime closed, double pointsForTrade, double profitForTrade) Creates an instance of aCumulativeStrategyReportEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclosed()Returns the value of theclosedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thenetProfitrecord component.opened()Returns the value of theopenedrecord component.doublepoints()Returns the value of thepointsrecord component.doubleReturns the value of thepointsForTraderecord component.doubleReturns the value of theprofitForTraderecord component.final StringtoString()Returns a string representation of this record class.inttrades()Returns the value of thetradesrecord component.Returns the value of thetradeTyperecord component.
-
Constructor Details
-
CumulativeStrategyReportEntry
public CumulativeStrategyReportEntry(double points, double netProfit, int trades, String tradeType, LocalDateTime opened, LocalDateTime closed, double pointsForTrade, double profitForTrade) Creates an instance of aCumulativeStrategyReportEntryrecord class.- Parameters:
points- the value for thepointsrecord componentnetProfit- the value for thenetProfitrecord componenttrades- the value for thetradesrecord componenttradeType- the value for thetradeTyperecord componentopened- the value for theopenedrecord componentclosed- the value for theclosedrecord componentpointsForTrade- the value for thepointsForTraderecord componentprofitForTrade- the value for theprofitForTraderecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
points
-
netProfit
-
trades
-
tradeType
-
opened
-
closed
-
pointsForTrade
public double pointsForTrade()Returns the value of thepointsForTraderecord component.- Returns:
- the value of the
pointsForTraderecord component
-
profitForTrade
public double profitForTrade()Returns the value of theprofitForTraderecord component.- Returns:
- the value of the
profitForTraderecord component
-