Package com.opengamma.strata.product
Class SecurityInfoBuilder
- java.lang.Object
-
- com.opengamma.strata.product.SecurityInfoBuilder
-
public final class SecurityInfoBuilder extends Object
Builder to createSecurityInfo.This builder allows a
SecurityInfoto be created.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> SecurityInfoBuilderaddAttribute(AttributeType<T> attributeType, T attributeValue)Adds a security attribute to the map of attributes.SecurityInfobuild()Builds the security information.SecurityInfoBuilderid(SecurityId id)Sets the security identifier.SecurityInfoBuilderpriceInfo(SecurityPriceInfo priceInfo)Sets the information about the security price.
-
-
-
Method Detail
-
id
public SecurityInfoBuilder id(SecurityId id)
Sets the security identifier.This identifier uniquely identifies the security within the system.
- Parameters:
id- the identifier- Returns:
- this, for chaining
-
priceInfo
public SecurityInfoBuilder priceInfo(SecurityPriceInfo priceInfo)
Sets the information about the security price.This provides information about the security price. This can be used to convert the price into a monetary value.
- Parameters:
priceInfo- the price info- Returns:
- this, for chaining
-
addAttribute
public <T> SecurityInfoBuilder addAttribute(AttributeType<T> attributeType, T attributeValue)
Adds a security attribute to the map of attributes.The attribute is added using
Map.put(type, value)semantics.- Type Parameters:
T- the type of the value- Parameters:
attributeType- the type providing meaning to the valueattributeValue- the value- Returns:
- this, for chaining
-
build
public SecurityInfo build()
Builds the security information.- Returns:
- the security information
-
-