Class ResolvedSwaption.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwaption>
-
- com.opengamma.strata.product.swaption.ResolvedSwaption.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ResolvedSwaption>
- Enclosing class:
- ResolvedSwaption
public static final class ResolvedSwaption.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwaption>
The bean-builder forResolvedSwaption
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedSwaption
build()
ResolvedSwaption.Builder
exerciseInfo(SwaptionExerciseDates exerciseInfo)
Sets the exercise information.ResolvedSwaption.Builder
expiry(ZonedDateTime expiry)
Sets the expiry date-time of the option.Object
get(String propertyName)
ResolvedSwaption.Builder
longShort(LongShort longShort)
Sets whether the option is long or short.ResolvedSwaption.Builder
set(String propertyName, Object newValue)
ResolvedSwaption.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
ResolvedSwaption.Builder
swaptionSettlement(SwaptionSettlement swaptionSettlement)
Sets settlement method.String
toString()
ResolvedSwaption.Builder
underlying(ResolvedSwap underlying)
Sets the underlying swap.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<ResolvedSwaption>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwaption>
-
set
public ResolvedSwaption.Builder set(String propertyName, Object newValue)
-
set
public ResolvedSwaption.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<ResolvedSwaption>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwaption>
-
build
public ResolvedSwaption build()
-
longShort
public ResolvedSwaption.Builder longShort(LongShort longShort)
Sets whether the option is long or short.Long indicates that the owner wants the option to be in the money at expiry. Short indicates that the owner wants the option to be out of the money at expiry.
- Parameters:
longShort
- the new value, not null- Returns:
- this, for chaining, not null
-
swaptionSettlement
public ResolvedSwaption.Builder swaptionSettlement(SwaptionSettlement swaptionSettlement)
Sets settlement method.The settlement of the option is specified by
SwaptionSettlement
.- Parameters:
swaptionSettlement
- the new value, not null- Returns:
- this, for chaining, not null
-
exerciseInfo
public ResolvedSwaption.Builder exerciseInfo(SwaptionExerciseDates exerciseInfo)
Sets the exercise information.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.
European swaptions will have matching information in this object, expiry date and swap start date. If this is not set in the builder, it will be defaulted to European from the expiry date and swap start date.
- Parameters:
exerciseInfo
- the new value, not null- Returns:
- this, for chaining, not null
-
expiry
public ResolvedSwaption.Builder expiry(ZonedDateTime expiry)
Sets the expiry date-time of the option.The option is European, and can only be exercised on the expiry date.
- Parameters:
expiry
- the new value, not null- Returns:
- this, for chaining, not null
-
underlying
public ResolvedSwaption.Builder underlying(ResolvedSwap underlying)
Sets the underlying swap.At expiry, if the option is exercised, this swap will be entered into. The swap description is the swap as viewed by the party long the option.
- Parameters:
underlying
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwaption>
-
-