Class 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
    • 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 for SplitEtdId.
        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 interface org.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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object