com.moneydance.apps.md.model
Enum BalanceType

java.lang.Object
  extended by java.lang.Enum<BalanceType>
      extended by com.moneydance.apps.md.model.BalanceType
All Implemented Interfaces:
DisplayableObject, java.io.Serializable, java.lang.Comparable<BalanceType>

public enum BalanceType
extends java.lang.Enum<BalanceType>
implements DisplayableObject

Defines the various balance types that can be displayed.

Author:
Kevin Menningen - Mennē Software Solutions, LLC

Enum Constant Summary
BALANCE
          Balance at the end of the register.
CLEARED_BALANCE
          Balance as cleared through the financial institution.
CONFIRMED_BALANCE
          Balance excluding unconfirmed downloaded transactions
CURRENT_BALANCE
          Balance as of today's date.
UNCONFIRMED_TOTAL
          Total of all unconfirmed transactions
 
Field Summary
static BalanceType DEFAULT
          The default balance type to use if none is specified.
 
Method Summary
static BalanceType fromInt(int value)
          Given an integer value, return the balance type.
 java.lang.String getConfigKey()
           
 java.lang.String getResourceKey()
          Return a resource key for a localized string describing this object.
static BalanceType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BalanceType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CURRENT_BALANCE

public static final BalanceType CURRENT_BALANCE
Balance as of today's date.


BALANCE

public static final BalanceType BALANCE
Balance at the end of the register.


CLEARED_BALANCE

public static final BalanceType CLEARED_BALANCE
Balance as cleared through the financial institution.


CONFIRMED_BALANCE

public static final BalanceType CONFIRMED_BALANCE
Balance excluding unconfirmed downloaded transactions


UNCONFIRMED_TOTAL

public static final BalanceType UNCONFIRMED_TOTAL
Total of all unconfirmed transactions

Field Detail

DEFAULT

public static final BalanceType DEFAULT
The default balance type to use if none is specified.

Method Detail

values

public static BalanceType[] 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 (BalanceType c : BalanceType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static BalanceType 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 name
java.lang.NullPointerException - if the argument is null

getResourceKey

public java.lang.String getResourceKey()
Description copied from interface: DisplayableObject
Return a resource key for a localized string describing this object.

Specified by:
getResourceKey in interface DisplayableObject
Returns:
The resource key for obtaining a localized display string.

getConfigKey

public java.lang.String getConfigKey()
Returns:
The non-localizable key to obtain settings in a stream table.

fromInt

public static BalanceType fromInt(int value)
Given an integer value, return the balance type. If not found, CURRENT_BALANCE is returned.

Parameters:
value - The integer value to convert.
Returns:
The corresponding balance type.