Package com.opengamma.strata.product.etd
Class SplitEtdId
- java.lang.Object
-
- com.opengamma.strata.product.etd.SplitEtdId
-
- All Implemented Interfaces:
org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class SplitEtdId extends Object implements org.joda.beans.ImmutableBean
An OG-ETD identifier that has been split into its constituent parts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SplitEtdId.Builder
The bean-builder forSplitEtdId
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SplitEtdId.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
static SplitEtdId
from(SecurityId securityId)
Obtains an instance from a security identifier.EtdContractCode
getContractCode()
Gets the code supplied by the exchange for use in clearing and margining, such as in SPAN.ExchangeId
getExchangeId()
Gets the ID of the exchange where the instruments derived from the product are traded.YearMonth
getExpiry()
Gets the year-month of the expiry.Optional<SplitEtdOption>
getOption()
Gets the additional information if the ID is an option.SecurityId
getSecurityId()
Gets the security ID that was split.EtdType
getType()
Gets the type of the contract - future or option.EtdVariant
getVariant()
Gets the variant of ETD.int
hashCode()
static org.joda.beans.TypedMetaBean<SplitEtdId>
meta()
The meta-bean forSplitEtdId
.org.joda.beans.TypedMetaBean<SplitEtdId>
metaBean()
SplitEtdId.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
from
public static SplitEtdId from(SecurityId securityId)
Obtains an instance from a security identifier.- Parameters:
securityId
- the OG-ETD security identifier- Returns:
- the split identifier
- Throws:
IllegalArgumentException
- if the identifier cannot be split
-
meta
public static org.joda.beans.TypedMetaBean<SplitEtdId> meta()
The meta-bean forSplitEtdId
.- Returns:
- the meta-bean, not null
-
builder
public static SplitEtdId.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public org.joda.beans.TypedMetaBean<SplitEtdId> metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getSecurityId
public SecurityId getSecurityId()
Gets the security ID that was split.- Returns:
- the value of the property, not null
-
getType
public EtdType getType()
Gets the type of the contract - future or option.- Returns:
- the value of the property, not null
-
getExchangeId
public ExchangeId getExchangeId()
Gets the ID of the exchange where the instruments derived from the product are traded.- Returns:
- the value of the property, not null
-
getContractCode
public EtdContractCode getContractCode()
Gets the code supplied by the exchange for use in clearing and margining, such as in SPAN.- Returns:
- the value of the property, not null
-
getExpiry
public YearMonth getExpiry()
Gets the year-month of the expiry.Expiry will occur on a date implied by the variant of the ETD.
- Returns:
- the value of the property, not null
-
getVariant
public EtdVariant getVariant()
Gets 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'.
- Returns:
- the value of the property, not null
-
getOption
public Optional<SplitEtdOption> getOption()
Gets the additional information if the ID is an option.- Returns:
- the optional value of the property, not null
-
toBuilder
public SplitEtdId.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-