jgnash.engine
Enum AccountGroup

java.lang.Object
  extended by java.lang.Enum<AccountGroup>
      extended by jgnash.engine.AccountGroup
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AccountGroup>

public enum AccountGroup
extends java.lang.Enum<AccountGroup>

Account Group class. Helps to categorize account types to make reporting easier and consistent.

Version:
$Id$
Author:
Craig Cavanaugh

Enum Constant Summary
ASSET
           
EQUITY
           
EXPENSE
           
INCOME
           
INVEST
           
LIABILITY
           
ROOT
           
 
Field Summary
private  java.lang.String description
           
 
Method Summary
static java.util.Set<AccountType> getAccountTypes(AccountGroup group)
          Returns all AccountTypes that fit the supplied AccountGroup
 java.lang.String toString()
           
static AccountGroup valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static AccountGroup[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ASSET

public static final AccountGroup ASSET

EQUITY

public static final AccountGroup EQUITY

EXPENSE

public static final AccountGroup EXPENSE

INCOME

public static final AccountGroup INCOME

INVEST

public static final AccountGroup INVEST

LIABILITY

public static final AccountGroup LIABILITY

ROOT

public static final AccountGroup ROOT
Field Detail

description

private transient java.lang.String description
Method Detail

values

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

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

valueOf

public static AccountGroup 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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<AccountGroup>

getAccountTypes

public static java.util.Set<AccountType> getAccountTypes(AccountGroup group)
Returns all AccountTypes that fit the supplied AccountGroup

Parameters:
group - AccountGroup to match
Returns:
array of AccountTypes that fit the supplied group