Enum CompoundingType
- java.lang.Object
-
- java.lang.Enum<CompoundingType>
-
- com.infinitekind.moneydance.model.CompoundingType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CompoundingType>
public enum CompoundingType extends java.lang.Enum<CompoundingType>
Defines the various types of security instruments that can be assigned to a security. Securities may have sub-types as well. The ordinal values are fixed to the original integers mapped to security type, as previously defined inAccount
:COMPOUNDING_DAILY = 0; COMPOUNDING_WEEKLY = 1; COMPOUNDING_MONTHLY = 2; COMPOUNDING_ANNUALLY = 3; COMPOUNDING_QUARTERLY = 4;
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_KEY
Key used to store and retrieve the compounding type from the account parameters.static CompoundingType
DEFAULT
The default security type to use if none is specified.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompoundingType
fromInt(int value)
Given an integer value, return the compounding type.java.lang.String
getResourceKey()
static CompoundingType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CompoundingType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DAILY
public static final CompoundingType DAILY
Every day.
-
WEEKLY
public static final CompoundingType WEEKLY
Every week.
-
MONTHLY
public static final CompoundingType MONTHLY
Every month.
-
ANNUALLY
public static final CompoundingType ANNUALLY
Every year.
-
QUARTERLY
public static final CompoundingType QUARTERLY
Quarterly (this came after annually so they are not in numerical order).
-
-
Field Detail
-
CONFIG_KEY
public static final java.lang.String CONFIG_KEY
Key used to store and retrieve the compounding type from the account parameters.- See Also:
- Constant Field Values
-
DEFAULT
public static final CompoundingType DEFAULT
The default security type to use if none is specified.
-
-
Method Detail
-
values
public static CompoundingType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CompoundingType c : CompoundingType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompoundingType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getResourceKey
public java.lang.String getResourceKey()
-
fromInt
public static CompoundingType fromInt(int value)
Given an integer value, return the compounding type. If not found,DEFAULT
is returned.- Parameters:
value
- The integer value to convert.- Returns:
- The corresponding compounding type.
-
-