Package com.opengamma.strata.product
Interface PortfolioItemInfoBuilder<T extends PortfolioItemInfo>
-
- Type Parameters:
T
- the info class type
- All Known Implementing Classes:
PositionInfoBuilder
,TradeInfoBuilder
public interface PortfolioItemInfoBuilder<T extends PortfolioItemInfo>
Interface across the various info builder classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> PortfolioItemInfoBuilder<T>
addAttribute(AttributeType<V> attributeType, V attributeValue)
Adds a position attribute to the map of attributes.T
build()
Builds the position information.PortfolioItemInfoBuilder<T>
id(StandardId id)
Sets the primary identifier for the position, optional.
-
-
-
Method Detail
-
id
PortfolioItemInfoBuilder<T> id(StandardId id)
Sets the primary identifier for the position, optional.The identifier is used to identify the position.
- Parameters:
id
- the identifier- Returns:
- this, for chaining
-
addAttribute
<V> PortfolioItemInfoBuilder<T> addAttribute(AttributeType<V> attributeType, V attributeValue)
Adds a position attribute to the map of attributes.The attribute is added using
Map.put(type, value)
semantics.- Type Parameters:
V
- the type of the value- Parameters:
attributeType
- the type providing meaning to the valueattributeValue
- the value- Returns:
- this, for chaining
-
build
T build()
Builds the position information.- Returns:
- the position information
-
-