Package com.opengamma.strata.product.etd
Class SplitEtdId.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SplitEtdId>
-
- com.opengamma.strata.product.etd.SplitEtdId.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<SplitEtdId>
- Enclosing class:
- SplitEtdId
public static final class SplitEtdId.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SplitEtdId>
The bean-builder forSplitEtdId
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SplitEtdId
build()
SplitEtdId.Builder
contractCode(EtdContractCode contractCode)
Sets the code supplied by the exchange for use in clearing and margining, such as in SPAN.SplitEtdId.Builder
exchangeId(ExchangeId exchangeId)
Sets the ID of the exchange where the instruments derived from the product are traded.SplitEtdId.Builder
expiry(YearMonth expiry)
Sets the year-month of the expiry.Object
get(String propertyName)
SplitEtdId.Builder
option(SplitEtdOption option)
Sets the additional information if the ID is an option.SplitEtdId.Builder
securityId(SecurityId securityId)
Sets the security ID that was split.SplitEtdId.Builder
set(String propertyName, Object newValue)
SplitEtdId.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
SplitEtdId.Builder
type(EtdType type)
Sets the type of the contract - future or option.SplitEtdId.Builder
variant(EtdVariant variant)
Sets the variant of ETD.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<SplitEtdId>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SplitEtdId>
-
set
public SplitEtdId.Builder set(String propertyName, Object newValue)
-
set
public SplitEtdId.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<SplitEtdId>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SplitEtdId>
-
build
public SplitEtdId build()
-
securityId
public SplitEtdId.Builder securityId(SecurityId securityId)
Sets the security ID that was split.- Parameters:
securityId
- the new value, not null- Returns:
- this, for chaining, not null
-
type
public SplitEtdId.Builder type(EtdType type)
Sets the type of the contract - future or option.- Parameters:
type
- the new value, not null- Returns:
- this, for chaining, not null
-
exchangeId
public SplitEtdId.Builder exchangeId(ExchangeId exchangeId)
Sets the ID of the exchange where the instruments derived from the product are traded.- Parameters:
exchangeId
- the new value, not null- Returns:
- this, for chaining, not null
-
contractCode
public SplitEtdId.Builder contractCode(EtdContractCode contractCode)
Sets the code supplied by the exchange for use in clearing and margining, such as in SPAN.- Parameters:
contractCode
- the new value, not null- Returns:
- this, for chaining, not null
-
expiry
public SplitEtdId.Builder expiry(YearMonth expiry)
Sets the year-month of the expiry.Expiry will occur on a date implied by the variant of the ETD.
- Parameters:
expiry
- the new value, not null- Returns:
- this, for chaining, not null
-
variant
public SplitEtdId.Builder variant(EtdVariant variant)
Sets the variant of ETD.This captures the variant of the ETD. The most common variant is 'Monthly'. Other variants are 'Weekly', 'Daily' and 'Flex'.
When building, this defaults to 'Monthly'.
- Parameters:
variant
- the new value, not null- Returns:
- this, for chaining, not null
-
option
public SplitEtdId.Builder option(SplitEtdOption option)
Sets the additional information if the ID is an option.- Parameters:
option
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SplitEtdId>
-
-