public enum PriceType extends Enum<PriceType> implements NamedEnum
The price is usually clean or dirty. Financial instruments are often quoted in terms of clean price rather than dirty price.
The dirty price is the full price, which is typically the mark-to-market value of an instrument.
The clean price is computed from the dirty price by subtracting/adding accrued interest. Subtraction/addition is determined by the direction of accrued interest payment.
| Enum Constant and Description |
|---|
CLEAN
Clean price.
|
DIRTY
Dirty price.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isCleanPrice()
Check if the price type is 'Clean'.
|
static PriceType |
of(String name)
Obtains an instance from the specified name.
|
String |
toString()
Returns the formatted name of the type.
|
static PriceType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PriceType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PriceType CLEAN
The accrued interest is removed from the full price.
public static final PriceType DIRTY
The dirty price is the full price of an instrument.
public static PriceType[] values()
for (PriceType c : PriceType.values()) System.out.println(c);
public static PriceType 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 PriceType 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 boolean isCleanPrice()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.