public class BudgetItemDetail extends java.lang.Object implements java.lang.Comparable<BudgetItemDetail>
Constructor and 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).
|
Modifier and Type | Method and 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() |
public BudgetItemDetail(int numIntervals, BudgetItem item)
numIntervals
- The number of date intervals that are covered by the item.item
- Budget item.public BudgetItemDetail(int numIntervals, Account category)
numIntervals
- The number of date intervals that are covered by the item.category
- Unbudgeted category.public void addBudgetItem(BudgetItem item)
public java.util.List<BudgetItem> getBudgetItems()
public boolean hasNoData()
public CurrencyType getItemCurrency()
public void addRawAmount(int interval, long amt)
public long getRawAmount(int interval)
public long getDiff(int interval)
public Account getCategory()
public boolean isIncome()
public long getBudgeted(int interval)
public long[] getBudgetedAmounts()
public void addToBudgeted(int interval, long budgeted)
public long getActual(int interval)
public long[] getActualAmounts()
public void addToActual(int interval, long actual)
public int compareTo(BudgetItemDetail other)
compareTo
in interface java.lang.Comparable<BudgetItemDetail>