public final class EtdContractSpecId extends Object implements ReferenceDataId<EtdContractSpec>, Serializable
This identifier is used to obtain an EtdContractSpec from ReferenceData.
An ETD product identifier uniquely identifies an ETD product within the system. The only restriction placed on the identifier is that it is sufficiently unique for the reference data lookup. As such, it is acceptable to use an identifier from a well-known global or vendor symbology.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Checks if this identifier equals another identifier.
|
Class<EtdContractSpec> |
getReferenceDataType()
Gets the type of data this identifier refers to.
|
StandardId |
getStandardId()
Gets the standard two-part identifier.
|
int |
hashCode()
Returns a suitable hash code for the identifier.
|
static EtdContractSpecId |
of(StandardId standardId)
Creates an instance from a standard two-part identifier.
|
static EtdContractSpecId |
of(String scheme,
String value)
Obtains an instance from a scheme and value.
|
static EtdContractSpecId |
parse(String str)
Parses an
StandardId from a formatted scheme and value. |
String |
toString()
Returns the identifier in a standard string format.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitqueryValueOrNullpublic static EtdContractSpecId of(String scheme, String value)
The scheme and value are used to produce a StandardId, where more
information is available on how schemes and values relate to industry identifiers.
The scheme must be non-empty and match the regular expression '[A-Za-z0-9:/+.=_-]*'.
This permits letters, numbers, colon, forward-slash, plus, dot, equals, underscore and dash.
If necessary, the scheme can be encoded using StandardId.encodeScheme(String).
The value must be non-empty and match the regular expression '[!-z][ -z]*'.
scheme - the scheme of the identifier, not emptyvalue - the value of the identifier, not emptyIllegalArgumentException - if the scheme or value is invalidpublic static EtdContractSpecId of(StandardId standardId)
standardId - the underlying standard two-part identifierpublic static EtdContractSpecId parse(String str)
StandardId from a formatted scheme and value.
This parses the identifier from the form produced by toString()
which is '$scheme~$value'.
str - the identifier to parseIllegalArgumentException - if the identifier cannot be parsedpublic StandardId getStandardId()
public Class<EtdContractSpec> getReferenceDataType()
A EtdProductId refers to a Security.
getReferenceDataType in interface ReferenceDataId<EtdContractSpec>public boolean equals(Object obj)
The comparison checks the name.
public int hashCode()
public String toString()
The returned string is in the form '$scheme~$value'.
This is suitable for use with parse(String).
For example, if the scheme is 'OG-Future' and the value is 'ECAG-FGBL-Mar14'
then the result is 'OG-Future~ECAG-FGBL-Mar14'.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.