Class MoneynessStrike
- java.lang.Object
-
- com.opengamma.strata.market.option.MoneynessStrike
-
- All Implemented Interfaces:
Strike
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class MoneynessStrike extends Object implements Strike, org.joda.beans.ImmutableBean, Serializable
A strike based on moneyness.The moneyness is defined as
strike/forward
. The strike should be nonnegative and the forward should be strictly positive.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MoneynessStrike.Meta
The meta-bean forMoneynessStrike
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
StrikeType
getType()
Gets the type of the strike.double
getValue()
Gets the value of moneyness.int
hashCode()
static MoneynessStrike.Meta
meta()
The meta-bean forMoneynessStrike
.MoneynessStrike.Meta
metaBean()
static MoneynessStrike
of(double moneyness)
Obtains an instance ofMoneyness
with the value of moneyness.static MoneynessStrike
ofStrikeAndForward(double strike, double forward)
Obtains an instance ofMoneyness
from the strike and forward.String
toString()
MoneynessStrike
withValue(double value)
Creates an new instance of the same strike type with value.
-
-
-
Method Detail
-
of
public static MoneynessStrike of(double moneyness)
Obtains an instance ofMoneyness
with the value of moneyness.- Parameters:
moneyness
- the value of moneyness, not negative- Returns:
- the instance
-
ofStrikeAndForward
public static MoneynessStrike ofStrikeAndForward(double strike, double forward)
Obtains an instance ofMoneyness
from the strike and forward.The moneyness is defined as
strike/forward
.- Parameters:
strike
- the strike, not negativeforward
- the forward, not negative- Returns:
- the instance
-
getType
public StrikeType getType()
Description copied from interface:Strike
Gets the type of the strike.
-
withValue
public MoneynessStrike withValue(double value)
Description copied from interface:Strike
Creates an new instance of the same strike type with value.
-
meta
public static MoneynessStrike.Meta meta()
The meta-bean forMoneynessStrike
.- Returns:
- the meta-bean, not null
-
metaBean
public MoneynessStrike.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getValue
public double getValue()
Gets the value of moneyness.
-
-