Record Class AccountLedgerSummary
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.core.nonentities.account.AccountLedgerSummary
- Record Components:
netProfit- closed position net profitpercentageReturn- net profit against funded capital
An account's ledger-derived figures, computed together.
These are always wanted as a pair, and computing them separately made the caller pay for the net profit twice, because the percentage return needs it too.
- Version:
- 3.0.5
- Author:
- Stephen Prizio
-
Constructor Summary
ConstructorsConstructorDescriptionAccountLedgerSummary(double netProfit, double percentageReturn) Creates an instance of aAccountLedgerSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.doubleReturns the value of thepercentageReturnrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AccountLedgerSummary
public AccountLedgerSummary(double netProfit, double percentageReturn) Creates an instance of aAccountLedgerSummaryrecord class.- Parameters:
netProfit- the value for thenetProfitrecord componentpercentageReturn- the value for thepercentageReturnrecord 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. -
netProfit
-
percentageReturn
public double percentageReturn()Returns the value of thepercentageReturnrecord component.- Returns:
- the value of the
percentageReturnrecord component
-