Record Class MultiCurrencyExposureSimulator.FxForwardTerms
java.lang.Object
java.lang.Record
com.quantfinlib.credit.MultiCurrencyExposureSimulator.FxForwardTerms
- Record Components:
foreignNotional- foreign units bought (sold if negative), non-zerostrike- contract rate, > 0maturityYears- settlement time, > 0
- Enclosing class:
MultiCurrencyExposureSimulator
public static record MultiCurrencyExposureSimulator.FxForwardTerms(double foreignNotional, double strike, double maturityYears)
extends Record
FX forward: buy
foreignNotional units of foreign currency at
strike domestic per foreign at maturityYears; a
negative notional sells.-
Constructor Summary
ConstructorsConstructorDescriptionFxForwardTerms(double foreignNotional, double strike, double maturityYears) Validates the terms. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theforeignNotionalrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thematurityYearsrecord component.doublestrike()Returns the value of thestrikerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FxForwardTerms
public FxForwardTerms(double foreignNotional, double strike, double maturityYears) Validates the terms.
-
-
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. -
foreignNotional
public double foreignNotional()Returns the value of theforeignNotionalrecord component.- Returns:
- the value of the
foreignNotionalrecord component
-
strike
-
maturityYears
public double maturityYears()Returns the value of thematurityYearsrecord component.- Returns:
- the value of the
maturityYearsrecord component
-