Enum SecurityType
- java.lang.Object
-
- java.lang.Enum<SecurityType>
-
- com.infinitekind.moneydance.model.SecurityType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SecurityType>
public enum SecurityType extends java.lang.Enum<SecurityType>
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
:SECURITY_TYPE_CD = 0; SECURITY_TYPE_BOND = 1; SECURITY_TYPE_MUTUAL = 2; SECURITY_TYPE_STOCK = 3; SECURITY_TYPE_OPTION = 4;
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_KEY
Key used to store and retrieve the security type from the account parameters.static SecurityType
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 SecurityType
fromInt(int value)
Given an integer value, return the balance type.java.lang.String
getResourceKey()
static SecurityType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SecurityType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CD
public static final SecurityType CD
Certificate of Deposit.
-
BOND
public static final SecurityType BOND
Bond.
-
MUTUAL
public static final SecurityType MUTUAL
Mutual Fund.
-
STOCK
public static final SecurityType STOCK
Stocks and Exchange Traded Funds.
-
OPTION
public static final SecurityType OPTION
Option or derivitive.
-
OTHER
public static final SecurityType OTHER
Other type like real estate or commodity.
-
-
Field Detail
-
CONFIG_KEY
public static final java.lang.String CONFIG_KEY
Key used to store and retrieve the security type from the account parameters.- See Also:
- Constant Field Values
-
DEFAULT
public static final SecurityType DEFAULT
The default security type to use if none is specified.
-
-
Method Detail
-
values
public static SecurityType[] 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 (SecurityType c : SecurityType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SecurityType 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()
- Returns:
- The resource key that can be used to obtain a localized display string.
-
fromInt
public static SecurityType fromInt(int value)
Given an integer value, return the balance type. If not found,DEFAULT
is returned.- Parameters:
value
- The integer value to convert.- Returns:
- The corresponding balance type.
-
-