Record Class SettlementRiskAnalyzer.SettlementLeg
java.lang.Object
java.lang.Record
com.quantfinlib.risk.SettlementRiskAnalyzer.SettlementLeg
- Enclosing class:
SettlementRiskAnalyzer
-
Constructor Summary
ConstructorsConstructorDescriptionSettlementLeg(String counterparty, String payCurrency, double payAmount, long payTimeMillis, String receiveCurrency, double receiveAmount, long receiveTimeMillis) Creates an instance of aSettlementLegrecord 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.booleanTrue when we pay before we receive — the Herstatt window.doubleReturns the value of thepayAmountrecord component.Returns the value of thepayCurrencyrecord component.longReturns the value of thepayTimeMillisrecord component.doubleReturns the value of thereceiveAmountrecord component.Returns the value of thereceiveCurrencyrecord component.longReturns the value of thereceiveTimeMillisrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SettlementLeg
public SettlementLeg(String counterparty, String payCurrency, double payAmount, long payTimeMillis, String receiveCurrency, double receiveAmount, long receiveTimeMillis) Creates an instance of aSettlementLegrecord class.- Parameters:
counterparty- the value for thecounterpartyrecord componentpayCurrency- the value for thepayCurrencyrecord componentpayAmount- the value for thepayAmountrecord componentpayTimeMillis- the value for thepayTimeMillisrecord componentreceiveCurrency- the value for thereceiveCurrencyrecord componentreceiveAmount- the value for thereceiveAmountrecord componentreceiveTimeMillis- the value for thereceiveTimeMillisrecord component
-
-
Method Details
-
hasHerstattWindow
public boolean hasHerstattWindow()True when we pay before we receive — the Herstatt window. -
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
-
payCurrency
Returns the value of thepayCurrencyrecord component.- Returns:
- the value of the
payCurrencyrecord component
-
payAmount
public double payAmount()Returns the value of thepayAmountrecord component.- Returns:
- the value of the
payAmountrecord component
-
payTimeMillis
public long payTimeMillis()Returns the value of thepayTimeMillisrecord component.- Returns:
- the value of the
payTimeMillisrecord component
-
receiveCurrency
Returns the value of thereceiveCurrencyrecord component.- Returns:
- the value of the
receiveCurrencyrecord component
-
receiveAmount
public double receiveAmount()Returns the value of thereceiveAmountrecord component.- Returns:
- the value of the
receiveAmountrecord component
-
receiveTimeMillis
public long receiveTimeMillis()Returns the value of thereceiveTimeMillisrecord component.- Returns:
- the value of the
receiveTimeMillisrecord component
-