Record Class GreekHedger.Instrument
java.lang.Object
java.lang.Record
com.quantfinlib.hedging.GreekHedger.Instrument
- Enclosing class:
GreekHedger
-
Constructor Summary
ConstructorsConstructorDescriptionInstrument(String name, double delta, double gamma, double vega) Creates an instance of aInstrumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledelta()Returns the value of thedeltarecord component.final booleanIndicates whether some other object is "equal to" this one.doublegamma()Returns the value of thegammarecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.static GreekHedger.Instrumentunderlying(String name) doublevega()Returns the value of thevegarecord component.
-
Constructor Details
-
Instrument
Creates an instance of aInstrumentrecord class.- Parameters:
name- the value for thenamerecord componentdelta- the value for thedeltarecord componentgamma- the value for thegammarecord componentvega- the value for thevegarecord component
-
-
Method Details
-
underlying
-
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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
delta
public double delta()Returns the value of thedeltarecord component.- Returns:
- the value of the
deltarecord component
-
gamma
public double gamma()Returns the value of thegammarecord component.- Returns:
- the value of the
gammarecord component
-
vega
public double vega()Returns the value of thevegarecord component.- Returns:
- the value of the
vegarecord component
-