public final class TradeInfoBuilder extends Object implements PortfolioItemInfoBuilder<TradeInfo>
TradeInfo.
This builder allows a TradeInfo to be created.
| Modifier and Type | Method and Description |
|---|---|
<T> TradeInfoBuilder |
addAttribute(AttributeType<T> attributeType,
T attributeValue)
Adds a trade attribute to the map of attributes.
|
TradeInfo |
build()
Builds the trade information.
|
TradeInfoBuilder |
counterparty(StandardId counterparty)
Sets the counterparty identifier, optional.
|
TradeInfoBuilder |
id(StandardId id)
Sets the primary identifier for the trade, optional.
|
TradeInfoBuilder |
settlementDate(LocalDate settlementDate)
Sets the settlement date, optional.
|
TradeInfoBuilder |
tradeDate(LocalDate tradeDate)
Sets the trade date, optional.
|
TradeInfoBuilder |
tradeTime(LocalTime tradeTime)
Sets the trade time, optional.
|
TradeInfoBuilder |
zone(ZoneId zone)
Sets the trade time-zone, optional.
|
public TradeInfoBuilder id(StandardId id)
The identifier is used to identify the trade.
id in interface PortfolioItemInfoBuilder<TradeInfo>id - the identifierpublic TradeInfoBuilder counterparty(StandardId counterparty)
An identifier used to specify the counterparty of the trade.
counterparty - the counterpartypublic TradeInfoBuilder tradeDate(LocalDate tradeDate)
tradeDate - the trade datepublic TradeInfoBuilder tradeTime(LocalTime tradeTime)
tradeTime - the trade timepublic TradeInfoBuilder zone(ZoneId zone)
zone - the trade zonepublic TradeInfoBuilder settlementDate(LocalDate settlementDate)
settlementDate - the settlement datepublic <T> TradeInfoBuilder addAttribute(AttributeType<T> attributeType, T attributeValue)
The attribute is added using Map.put(type, value) semantics.
addAttribute in interface PortfolioItemInfoBuilder<TradeInfo>T - the type of the valueattributeType - the type providing meaning to the valueattributeValue - the valuepublic TradeInfo build()
build in interface PortfolioItemInfoBuilder<TradeInfo>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.