Package com.opengamma.strata.product
Class PortfolioItemSummary
- java.lang.Object
-
- com.opengamma.strata.product.PortfolioItemSummary
-
- All Implemented Interfaces:
Described,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class PortfolioItemSummary extends Object implements Described, org.joda.beans.ImmutableBean, Serializable
A summary of a portfolio item.This can be used to display a summary of a portfolio to a user.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPortfolioItemSummary.BuilderThe bean-builder forPortfolioItemSummary.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PortfolioItemSummary.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)ImmutableSet<Currency>getCurrencies()Gets the currencies of the item.StringgetDescription()Gets the description of the item.Optional<StandardId>getId()Gets the identifier of the item, optional.PortfolioItemTypegetPortfolioItemType()Gets the type of the item.ProductTypegetProductType()Gets the type of the product.inthashCode()static org.joda.beans.TypedMetaBean<PortfolioItemSummary>meta()The meta-bean forPortfolioItemSummary.org.joda.beans.TypedMetaBean<PortfolioItemSummary>metaBean()static PortfolioItemSummaryof(StandardId id, PortfolioItemType portfolioItemType, ProductType productType, Set<Currency> currencies, String description)Obtains an instance.PortfolioItemSummary.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()
-
-
-
Method Detail
-
meta
public static org.joda.beans.TypedMetaBean<PortfolioItemSummary> meta()
The meta-bean forPortfolioItemSummary.- Returns:
- the meta-bean, not null
-
of
public static PortfolioItemSummary of(StandardId id, PortfolioItemType portfolioItemType, ProductType productType, Set<Currency> currencies, String description)
Obtains an instance.- Parameters:
id- the value of the propertyportfolioItemType- the value of the property, not nullproductType- the value of the property, not nullcurrencies- the value of the property, not nulldescription- the value of the property, not blank- Returns:
- the instance
-
builder
public static PortfolioItemSummary.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public org.joda.beans.TypedMetaBean<PortfolioItemSummary> metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getId
public Optional<StandardId> getId()
Gets the identifier of the item, optional.- Returns:
- the optional value of the property, not null
-
getPortfolioItemType
public PortfolioItemType getPortfolioItemType()
Gets the type of the item.- Returns:
- the value of the property, not null
-
getProductType
public ProductType getProductType()
Gets the type of the product.- Returns:
- the value of the property, not null
-
getCurrencies
public ImmutableSet<Currency> getCurrencies()
Gets the currencies of the item.This should include the primary currencies the item is based on, not just the payment currencies.
- Returns:
- the value of the property, not null
-
getDescription
public String getDescription()
Gets the description of the item.- Specified by:
getDescriptionin interfaceDescribed- Returns:
- the value of the property, not blank
-
toBuilder
public PortfolioItemSummary.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-