Class BudgetItemDetail
java.lang.Object
com.infinitekind.moneydance.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
-
Constructor Summary
Constructors Constructor Description BudgetItemDetail(int numIntervals, Account category)
Constructor when building an unbudgeted item from a category.BudgetItemDetail(int numIntervals, BudgetItem item)
Constructor when we have a budget item (non-null). -
Method Summary
Modifier and Type Method Description void
addBudgetItem(BudgetItem item)
void
addRawAmount(int interval, long amt)
void
addToActual(int interval, long actual)
void
addToBudgeted(int interval, long budgeted)
int
compareTo(BudgetItemDetail other)
long
getActual(int interval)
long[]
getActualAmounts()
long
getBudgeted(int interval)
long[]
getBudgetedAmounts()
java.util.List<BudgetItem>
getBudgetItems()
Account
getCategory()
long
getDiff(int interval)
CurrencyType
getItemCurrency()
long
getRawAmount(int interval)
boolean
hasNoData()
boolean
isIncome()
java.lang.String
toString()
-
Constructor Details
-
BudgetItemDetail
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
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.
-
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
addBudgetItem
-
getBudgetItems
-
hasNoData
public boolean hasNoData()- Returns:
- True if both actual and budgeted values for all intervals is zero.
-
getItemCurrency
-
addRawAmount
public void addRawAmount(int interval, long amt) -
getRawAmount
public long getRawAmount(int interval) -
getDiff
public long getDiff(int interval) -
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
- Specified by:
compareTo
in interfacejava.lang.Comparable<BudgetItemDetail>
-