Record Class PositionUtil.PositionClosingMetadata
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.radicle.util.position.PositionUtil.PositionClosingMetadata
- Record Components:
returnOnInvestment- percentage return on account balancereturnOnPosition- percentage return on position valuedrawdown- market-price-based drawdown
- Enclosing class:
PositionUtil
-
Constructor Summary
ConstructorsConstructorDescriptionPositionClosingMetadata(double returnOnInvestment, double returnOnPosition, double drawdown) Creates an instance of aPositionClosingMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledrawdown()Returns the value of thedrawdownrecord 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 thereturnOnInvestmentrecord component.doubleReturns the value of thereturnOnPositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PositionClosingMetadata
public PositionClosingMetadata(double returnOnInvestment, double returnOnPosition, double drawdown) Creates an instance of aPositionClosingMetadatarecord class.- Parameters:
returnOnInvestment- the value for thereturnOnInvestmentrecord componentreturnOnPosition- the value for thereturnOnPositionrecord componentdrawdown- the value for thedrawdownrecord 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. -
returnOnInvestment
public double returnOnInvestment()Returns the value of thereturnOnInvestmentrecord component.- Returns:
- the value of the
returnOnInvestmentrecord component
-
returnOnPosition
public double returnOnPosition()Returns the value of thereturnOnPositionrecord component.- Returns:
- the value of the
returnOnPositionrecord component
-
drawdown
-