public final class EtdContractSpecBuilder extends Object
EtdContractSpec.| Modifier and Type | Method and Description |
|---|---|
<T> EtdContractSpecBuilder |
addAttribute(AttributeType<T> attributeType,
T attributeValue)
Adds an attribute to the builder.
|
EtdContractSpec |
build()
Builds a new specification from the data in this builder.
|
EtdContractSpecBuilder |
contractCode(EtdContractCode contractCode)
Sets the code of the contract specification as given by the exchange in clearing and margining.
|
EtdContractSpecBuilder |
description(String description)
Sets the description of the contract specification.
|
EtdContractSpecBuilder |
exchangeId(ExchangeId exchangeId)
Sets the ID of the exchange where the instruments derived from the contract specification are traded.
|
EtdContractSpecBuilder |
id(EtdContractSpecId id)
Sets the ID of the contract specification.
|
EtdContractSpecBuilder |
priceInfo(SecurityPriceInfo priceInfo)
Sets the information about the security price - currency, tick size, tick value, contract size.
|
EtdContractSpecBuilder |
type(EtdType productType)
Sets the type of the contract specification.
|
public EtdContractSpec build()
public EtdContractSpecBuilder id(EtdContractSpecId id)
id - the IDpublic EtdContractSpecBuilder type(EtdType productType)
productType - the new value, not nullpublic EtdContractSpecBuilder exchangeId(ExchangeId exchangeId)
exchangeId - the new value, not nullpublic EtdContractSpecBuilder contractCode(EtdContractCode contractCode)
contractCode - the new value, not emptypublic EtdContractSpecBuilder description(String description)
description - the new value, not emptypublic EtdContractSpecBuilder priceInfo(SecurityPriceInfo priceInfo)
priceInfo - the new value, not nullpublic <T> EtdContractSpecBuilder addAttribute(AttributeType<T> attributeType, T attributeValue)
Only one attribute is stored for each attribute type. If this method is called multiple times with the same attribute type the previous attribute value will be replaced.
T - the type of the attributeattributeType - the type of the attributeattributeValue - the value of the attributeCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.