public enum CompoundedRateType extends Enum<CompoundedRateType> implements NamedEnum
Compounded rate is continuously compounded rate or periodically compounded rate.
The main application of this is z-spread computation under a specific way of compounding.
See, for example, DiscountFactors.
| Enum Constant and Description |
|---|
CONTINUOUS
Continuous compounding.
|
PERIODIC
Periodic compounding.
|
| Modifier and Type | Method and Description |
|---|---|
static CompoundedRateType |
of(String name)
Obtains an instance from the specified name.
|
String |
toString()
Returns the formatted name of the type.
|
static CompoundedRateType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CompoundedRateType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompoundedRateType PERIODIC
The rate is periodically compounded. In this case the number of periods par year should be specified in addition.
public static final CompoundedRateType CONTINUOUS
The rate is continuously compounded.
public static CompoundedRateType[] values()
for (CompoundedRateType c : CompoundedRateType.values()) System.out.println(c);
public static CompoundedRateType 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 CompoundedRateType 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<CompoundedRateType>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.