Record Class CumulativeStrategyReportEntry

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.anther.models.strategy.CumulativeStrategyReportEntry
Record Components:
points - cumulative points
netProfit - cumulative profit
trades - cumulative trades
tradeType - type of trade
opened - open time
closed - close time
pointsForTrade - points only for this trade, not cumulative
profitForTrade - 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 Details

    • CumulativeStrategyReportEntry

      public CumulativeStrategyReportEntry(double points, double netProfit, int trades, String tradeType, LocalDateTime opened, LocalDateTime closed, double pointsForTrade, double profitForTrade)
      Creates an instance of a CumulativeStrategyReportEntry record class.
      Parameters:
      points - the value for the points record component
      netProfit - the value for the netProfit record component
      trades - the value for the trades record component
      tradeType - the value for the tradeType record component
      opened - the value for the opened record component
      closed - the value for the closed record component
      pointsForTrade - the value for the pointsForTrade record component
      profitForTrade - the value for the profitForTrade 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • points

      public double points()
      Returns the value of the points record component.
      Returns:
      the value of the points record component
    • netProfit

      public double netProfit()
      Returns the value of the netProfit record component.
      Returns:
      the value of the netProfit record component
    • trades

      public int trades()
      Returns the value of the trades record component.
      Returns:
      the value of the trades record component
    • tradeType

      public String tradeType()
      Returns the value of the tradeType record component.
      Returns:
      the value of the tradeType record component
    • opened

      public LocalDateTime opened()
      Returns the value of the opened record component.
      Returns:
      the value of the opened record component
    • closed

      public LocalDateTime closed()
      Returns the value of the closed record component.
      Returns:
      the value of the closed record component
    • pointsForTrade

      public double pointsForTrade()
      Returns the value of the pointsForTrade record component.
      Returns:
      the value of the pointsForTrade record component
    • profitForTrade

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