Android Open Source - gnucash-android Account Type

From Project

Back to project page gnucash-android.


The source code is released under:

Apache License

If you think the Android project gnucash-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*from   w w w .j  a va  2  m*/
 * The type of account
 * This are the different types specified by the OFX format and
 * they are currently not used except for exporting
public enum AccountType {
    CASH(TransactionType.DEBIT), BANK(TransactionType.DEBIT), CREDIT, ASSET(TransactionType.DEBIT), LIABILITY,
    STOCK(TransactionType.DEBIT), MUTUAL(TransactionType.DEBIT), ROOT;

     * Indicates that this type of normal balance the account type has
     * <p>To increase the value of an account with normal balance of credit, one would credit the account.
     * To increase the value of an account with normal balance of debit, one would likewise debit the account.</p>
    private TransactionType mNormalBalance = TransactionType.CREDIT;

    AccountType(TransactionType normalBalance){
        this.mNormalBalance = normalBalance;

    AccountType() {
        //nothing to see here, move along

    public boolean hasDebitNormalBalance(){
        return mNormalBalance == TransactionType.DEBIT;

     * Returns the type of normal balance this account possesses
     * @return TransactionType balance of the account type
    public TransactionType getNormalBalanceType(){
        return mNormalBalance;

Java Source Code List