Class 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
    • 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 type
        knockType - the knock type
        barrierLevel - 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 interface Barrier
        Parameters:
        date - the observation date
        Returns:
        the barrier level
      • getBarrierType

        public BarrierType getBarrierType()
        Gets the barrier type.
        Specified by:
        getBarrierType in interface Barrier
        Returns:
        the value of the property, not null
      • getKnockType

        public KnockType getKnockType()
        Gets the knock type.
        Specified by:
        getKnockType in interface Barrier
        Returns:
        the value of the property, not null
      • getBarrierLevel

        public double getBarrierLevel()
        Gets the barrier level.
        Returns:
        the value of the property
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object