Class Swaption.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<Swaption>
-
- com.opengamma.strata.product.swaption.Swaption.Builder
-
- All Implemented Interfaces:
BeanBuilder<Swaption>
- Enclosing class:
- Swaption
public static final class Swaption.Builder extends DirectFieldsBeanBuilder<Swaption>
The bean-builder forSwaption
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Swaption
build()
Swaption.Builder
expiryDate(AdjustableDate expiryDate)
Sets the expiry date of the option.Swaption.Builder
expiryTime(java.time.LocalTime expiryTime)
Sets the expiry time of the option.Swaption.Builder
expiryZone(java.time.ZoneId expiryZone)
Sets the time-zone of the expiry time.java.lang.Object
get(java.lang.String propertyName)
Swaption.Builder
longShort(LongShort longShort)
Sets whether the option is long or short.Swaption.Builder
set(java.lang.String propertyName, java.lang.Object newValue)
Swaption.Builder
set(MetaProperty<?> property, java.lang.Object value)
Swaption.Builder
swaptionSettlement(SwaptionSettlement swaptionSettlement)
Sets settlement method.java.lang.String
toString()
Swaption.Builder
underlying(Swap underlying)
Sets the underlying swap.-
Methods inherited from class org.joda.beans.impl.direct.DirectFieldsBeanBuilder
get
-
-
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.String propertyName)
- Specified by:
get
in interfaceBeanBuilder<Swaption>
- Overrides:
get
in classDirectFieldsBeanBuilder<Swaption>
-
set
public Swaption.Builder set(java.lang.String propertyName, java.lang.Object newValue)
-
set
public Swaption.Builder set(MetaProperty<?> property, java.lang.Object value)
- Specified by:
set
in interfaceBeanBuilder<Swaption>
- Overrides:
set
in classDirectFieldsBeanBuilder<Swaption>
-
build
public Swaption build()
-
longShort
public Swaption.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 Swaption.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
-
expiryDate
public Swaption.Builder expiryDate(AdjustableDate expiryDate)
Sets the expiry date of the option.The option is European, and can only be exercised on the expiry date.
This date is typically set to be a valid business day. However, the
businessDayAdjustment
property may be set to provide a rule for adjustment.- Parameters:
expiryDate
- the new value, not null- Returns:
- this, for chaining, not null
-
expiryTime
public Swaption.Builder expiryTime(java.time.LocalTime expiryTime)
Sets the expiry time of the option.The expiry time is related to the expiry date and time-zone.
- Parameters:
expiryTime
- the new value, not null- Returns:
- this, for chaining, not null
-
expiryZone
public Swaption.Builder expiryZone(java.time.ZoneId expiryZone)
Sets the time-zone of the expiry time.The expiry time-zone is related to the expiry date and time.
- Parameters:
expiryZone
- the new value, not null- Returns:
- this, for chaining, not null
-
underlying
public Swaption.Builder underlying(Swap 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 java.lang.String toString()
- Overrides:
toString
in classDirectFieldsBeanBuilder<Swaption>
-
-