public final class PositionInfoBuilder extends Object implements PortfolioItemInfoBuilder<PositionInfo>
PositionInfo.
This builder allows a PositionInfo to be created.
| Modifier and Type | Method and Description |
|---|---|
<T> PositionInfoBuilder |
addAttribute(AttributeType<T> attributeType,
T attributeValue)
Adds a position attribute to the map of attributes.
|
PositionInfo |
build()
Builds the position information.
|
PositionInfoBuilder |
id(StandardId id)
Sets the primary identifier for the position, optional.
|
public PositionInfoBuilder id(StandardId id)
The identifier is used to identify the position.
id in interface PortfolioItemInfoBuilder<PositionInfo>id - the identifierpublic <T> PositionInfoBuilder addAttribute(AttributeType<T> attributeType, T attributeValue)
The attribute is added using Map.put(type, value) semantics.
addAttribute in interface PortfolioItemInfoBuilder<PositionInfo>T - the type of the valueattributeType - the type providing meaning to the valueattributeValue - the valuepublic PositionInfo build()
build in interface PortfolioItemInfoBuilder<PositionInfo>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.