Class SwaptionExerciseDates
- java.lang.Object
-
- com.opengamma.strata.product.swaption.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SwaptionExerciseDates.Builder
The bean-builder forSwaptionExerciseDates
.static class
SwaptionExerciseDates.Meta
The meta-bean forSwaptionExerciseDates
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SwaptionExerciseDates.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
ImmutableList<SwaptionExerciseDate>
getDates()
Gets an explicit list of exercise dates.int
hashCode()
boolean
isAllDates()
Gets whether all dates are valid dates for swaption exercise between the first and last date.boolean
isAmerican()
Checks if the exercise is American.boolean
isBermudan()
Checks if the exercise is Bermudan.boolean
isEuropean()
Checks if the exercise is European.static SwaptionExerciseDates.Meta
meta()
The meta-bean forSwaptionExerciseDates
.SwaptionExerciseDates.Meta
metaBean()
static SwaptionExerciseDates
of(List<SwaptionExerciseDate> dates, boolean allDates)
Obtains an instance.SwaptionExerciseDates.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
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 forSwaptionExerciseDates
.- 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 emptyallDates
- 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
-
metaBean
public SwaptionExerciseDates.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
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
-
-