Class SimpleConstantContinuousBarrier
- java.lang.Object
-
- com.opengamma.strata.product.option.SimpleConstantContinuousBarrier
-
- All Implemented Interfaces:
Barrier
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class SimpleConstantContinuousBarrier extends Object implements Barrier, org.joda.beans.ImmutableBean, Serializable
Continuous barrier with constant barrier level.This defines a simple continuous barrier with a constant barrier level. It is assumed that the barrier event period agrees with the lifetime of the option, thus observation start date and end date are not specified in this class.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleConstantContinuousBarrier.Meta
The meta-bean forSimpleConstantContinuousBarrier
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
double
getBarrierLevel()
Gets the barrier level.double
getBarrierLevel(LocalDate date)
Obtains the barrier level for a given observation date.BarrierType
getBarrierType()
Gets the barrier type.KnockType
getKnockType()
Gets the knock type.int
hashCode()
SimpleConstantContinuousBarrier
inverseKnockType()
Obtains an instance with knock type inverted.static SimpleConstantContinuousBarrier.Meta
meta()
The meta-bean forSimpleConstantContinuousBarrier
.SimpleConstantContinuousBarrier.Meta
metaBean()
static SimpleConstantContinuousBarrier
of(BarrierType barrierType, KnockType knockType, double barrierLevel)
Obtains the continuous barrier with constant barrier level.String
toString()
-
-
-
Method Detail
-
of
public static SimpleConstantContinuousBarrier of(BarrierType barrierType, KnockType knockType, double barrierLevel)
Obtains the continuous barrier with constant barrier level.- Parameters:
barrierType
- the barrier typeknockType
- the knock typebarrierLevel
- the barrier level- Returns:
- the instance
-
getBarrierLevel
public double getBarrierLevel(LocalDate date)
Description copied from interface:Barrier
Obtains the barrier level for a given observation date.- Specified by:
getBarrierLevel
in interfaceBarrier
- Parameters:
date
- the observation date- Returns:
- the barrier level
-
inverseKnockType
public SimpleConstantContinuousBarrier inverseKnockType()
Description copied from interface:Barrier
Obtains an instance with knock type inverted.- Specified by:
inverseKnockType
in interfaceBarrier
- Returns:
- the instance
-
meta
public static SimpleConstantContinuousBarrier.Meta meta()
The meta-bean forSimpleConstantContinuousBarrier
.- Returns:
- the meta-bean, not null
-
metaBean
public SimpleConstantContinuousBarrier.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getBarrierType
public BarrierType getBarrierType()
Gets the barrier type.- Specified by:
getBarrierType
in interfaceBarrier
- Returns:
- the value of the property, not null
-
getKnockType
public KnockType getKnockType()
Gets the knock type.- Specified by:
getKnockType
in interfaceBarrier
- Returns:
- the value of the property, not null
-
getBarrierLevel
public double getBarrierLevel()
Gets the barrier level.- Returns:
- the value of the property
-
-