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 classSimpleConstantContinuousBarrier.MetaThe meta-bean forSimpleConstantContinuousBarrier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)doublegetBarrierLevel()Gets the barrier level.doublegetBarrierLevel(LocalDate date)Obtains the barrier level for a given observation date.BarrierTypegetBarrierType()Gets the barrier type.KnockTypegetKnockType()Gets the knock type.inthashCode()SimpleConstantContinuousBarrierinverseKnockType()Obtains an instance with knock type inverted.static SimpleConstantContinuousBarrier.Metameta()The meta-bean forSimpleConstantContinuousBarrier.SimpleConstantContinuousBarrier.MetametaBean()static SimpleConstantContinuousBarrierof(BarrierType barrierType, KnockType knockType, double barrierLevel)Obtains the continuous barrier with constant barrier level.StringtoString()
-
-
-
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:BarrierObtains the barrier level for a given observation date.- Specified by:
getBarrierLevelin interfaceBarrier- Parameters:
date- the observation date- Returns:
- the barrier level
-
inverseKnockType
public SimpleConstantContinuousBarrier inverseKnockType()
Description copied from interface:BarrierObtains an instance with knock type inverted.- Specified by:
inverseKnockTypein 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:
metaBeanin interfaceorg.joda.beans.Bean
-
getBarrierType
public BarrierType getBarrierType()
Gets the barrier type.- Specified by:
getBarrierTypein interfaceBarrier- Returns:
- the value of the property, not null
-
getKnockType
public KnockType getKnockType()
Gets the knock type.- Specified by:
getKnockTypein interfaceBarrier- Returns:
- the value of the property, not null
-
getBarrierLevel
public double getBarrierLevel()
Gets the barrier level.- Returns:
- the value of the property
-
-