public enum PortfolioItemType extends Enum<PortfolioItemType> implements NamedEnum
This allows trades, positions and sensitivities to be separated.
| Enum Constant and Description |
|---|
OTHER
Any other kind of portfolio item.
|
POSITION
A position.
|
SENSITIVITIES
Risk expressed as sensitivities.
|
TRADE
A trade.
|
| Modifier and Type | Method and Description |
|---|---|
static PortfolioItemType |
of(String name)
Obtains an instance from the specified name.
|
String |
toString()
Returns the formatted name of the type.
|
static PortfolioItemType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PortfolioItemType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PortfolioItemType TRADE
A trade is a transaction that occurred on a specific date between two counterparties.
See Trade.
public static final PortfolioItemType POSITION
public static final PortfolioItemType SENSITIVITIES
public static final PortfolioItemType OTHER
public static PortfolioItemType[] values()
for (PortfolioItemType c : PortfolioItemType.values()) System.out.println(c);
public static PortfolioItemType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static PortfolioItemType of(String name)
Parsing handles the mixed case form produced by toString() and
the upper and lower case variants of the enum constant name.
name - the name to parseIllegalArgumentException - if the name is not knownpublic String toString()
toString in class Enum<PortfolioItemType>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.