com.moneydance.apps.md.model
Class BudgetItemDetail
java.lang.Object
com.moneydance.apps.md.model.BudgetItemDetail
- All Implemented Interfaces:
- java.lang.Comparable<BudgetItemDetail>
public class BudgetItemDetail
- extends java.lang.Object
- implements java.lang.Comparable<BudgetItemDetail>
For one specific category, holds all the budget information (actual vs. budgeted). Since the user
can enter multiple budget items per category, holds the list of all budget items for a single
category.
- Author:
- Kevin Menningen - Mennē Software Solutions, LLC
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BudgetItemDetail
public BudgetItemDetail(int numIntervals,
BudgetItem item)
- Constructor when we have a budget item (non-null).
- Parameters:
numIntervals
- The number of date intervals that are covered by the item.item
- Budget item.
BudgetItemDetail
public BudgetItemDetail(int numIntervals,
Account category)
- Constructor when building an unbudgeted item from a category.
- Parameters:
numIntervals
- The number of date intervals that are covered by the item.category
- Unbudgeted category.
addBudgetItem
public void addBudgetItem(BudgetItem item)
getBudgetItems
public java.util.List<BudgetItem> getBudgetItems()
hasNoData
public boolean hasNoData()
- Returns:
- True if both actual and budgeted values for all intervals is zero.
getItemCurrency
public CurrencyType getItemCurrency()
addRawAmount
public void addRawAmount(int interval,
long amt)
getRawAmount
public long getRawAmount(int interval)
getDiff
public long getDiff(int interval)
getCategory
public Account getCategory()
isIncome
public boolean isIncome()
getBudgeted
public long getBudgeted(int interval)
getBudgetedAmounts
public long[] getBudgetedAmounts()
addToBudgeted
public void addToBudgeted(int interval,
long budgeted)
getActual
public long getActual(int interval)
getActualAmounts
public long[] getActualAmounts()
addToActual
public void addToActual(int interval,
long actual)
compareTo
public int compareTo(BudgetItemDetail other)
-
- Specified by:
compareTo
in interface java.lang.Comparable<BudgetItemDetail>