Class SwaptionExerciseDates

  • All Implemented Interfaces:
    Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class SwaptionExerciseDates
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    The dates when a swaption can be exercised, resolved for pricing.

    A swaption can have three different kinds of exercise - European, American and Bermudan. A European swaption has one exercise date, an American can exercise on any date, and a Bermudan can exercise on a fixed set of dates.

    This is the resolved form of SwaptionExercise.

    See Also:
    Serialized Form
    • Method Detail

      • isEuropean

        public boolean isEuropean()
        Checks if the exercise is European.
        Returns:
        true if European exercise on a single date
      • isAmerican

        public boolean isAmerican()
        Checks if the exercise is American.
        Returns:
        true if American exercise on any date
      • isBermudan

        public boolean isBermudan()
        Checks if the exercise is Bermudan.
        Returns:
        true if Bermudan exercise on a specific set of dates
      • meta

        public static SwaptionExerciseDates.Meta meta()
        The meta-bean for SwaptionExerciseDates.
        Returns:
        the meta-bean, not null
      • of

        public static SwaptionExerciseDates of​(List<SwaptionExerciseDate> dates,
                                               boolean allDates)
        Obtains an instance.
        Parameters:
        dates - the value of the property, not empty
        allDates - the value of the property
        Returns:
        the instance
      • builder

        public static SwaptionExerciseDates.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • getDates

        public ImmutableList<SwaptionExerciseDate> getDates()
        Gets an explicit list of exercise dates.

        A European swaption has one date in the list. A Bermudan swaption has at least two dates in the list. An American swaption has at exactly two dates in the list, the earliest and latest dates.

        Returns:
        the value of the property, not empty
      • isAllDates

        public boolean isAllDates()
        Gets whether all dates are valid dates for swaption exercise between the first and last date.

        This will be true for an American swaption, and false otherwise.

        Returns:
        the value of the property
      • toBuilder

        public SwaptionExerciseDates.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object