Class SimpleConstantContinuousBarrier

  • All Implemented Interfaces:
    Barrier, java.io.Serializable, Bean, ImmutableBean

    public final class SimpleConstantContinuousBarrier
    extends java.lang.Object
    implements Barrier, ImmutableBean, java.io.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​(java.time.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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object