Record Class CounterpartyExposureTracker.CounterpartyTrade
java.lang.Object
java.lang.Record
com.quantfinlib.risk.CounterpartyExposureTracker.CounterpartyTrade
- Enclosing class:
CounterpartyExposureTracker
-
Constructor Summary
ConstructorsConstructorDescriptionCounterpartyTrade(String counterparty, String product, double notional, double markToMarket, double tenorYears) Creates an instance of aCounterpartyTraderecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecounterpartyrecord 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 themarkToMarketrecord component.doublenotional()Returns the value of thenotionalrecord component.product()Returns the value of theproductrecord component.doubleReturns the value of thetenorYearsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CounterpartyTrade
public CounterpartyTrade(String counterparty, String product, double notional, double markToMarket, double tenorYears) Creates an instance of aCounterpartyTraderecord class.- Parameters:
counterparty- the value for thecounterpartyrecord componentproduct- the value for theproductrecord componentnotional- the value for thenotionalrecord componentmarkToMarket- the value for themarkToMarketrecord componenttenorYears- the value for thetenorYearsrecord 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. -
counterparty
Returns the value of thecounterpartyrecord component.- Returns:
- the value of the
counterpartyrecord component
-
product
Returns the value of theproductrecord component.- Returns:
- the value of the
productrecord component
-
notional
public double notional()Returns the value of thenotionalrecord component.- Returns:
- the value of the
notionalrecord component
-
markToMarket
public double markToMarket()Returns the value of themarkToMarketrecord component.- Returns:
- the value of the
markToMarketrecord component
-
tenorYears
public double tenorYears()Returns the value of thetenorYearsrecord component.- Returns:
- the value of the
tenorYearsrecord component
-