|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.moneydance.apps.md.model.Budget
public final class Budget
Represents one item in a budget
Constructor Summary | |
---|---|
Budget(BudgetList list,
RootAccount root)
Construct a new budget in the context of the given account. |
|
Budget(BudgetList list,
RootAccount root,
java.lang.String key,
StreamTable info)
|
Method Summary | |
---|---|
static BudgetCalculationResults |
calculate(DateRange[] dateRanges,
RootAccount rootAccount,
java.util.List<BudgetItem> items,
boolean showAllCategories,
boolean showZeroes)
Compute budgeted and actual amounts, store them in an object that can be used by various clients including the report, dashboard, and budget bars. |
BudgetCalculationResults |
calculate(com.moneydance.apps.md.controller.time.GraphInterval[] graphIntervals,
boolean showAllCategories,
boolean showZeroes)
Compute budgeted and actual values based upon a series of graph intervals, for this budget. |
BudgetCalculationResults |
calculate(int startDate,
int endDate,
boolean showAllCategories,
boolean showZeroes)
Compute budgeted and actual values based upon a single date range, for this budget. |
Budget |
cloneBudget()
Create a copy of this budget |
boolean |
containsDate(int dateInt)
Determine if this budget contains any items that span the date given. |
BudgetItem |
createItem()
Create a new item, add it to the list, and return it |
BudgetList |
getBudgetList()
Return the list that contains this budget |
static int |
getIntervalIdx(DateRange[] intervals,
int date)
Given a date range list and a date, find the index of the date range in which the date belongs. |
BudgetItem |
getItem(int i)
Get the budget item at the given position in the list |
int |
getItemCount()
Get the number of items in this budget |
java.lang.String |
getKey()
Return the unique key needed to identify this budget for storage |
java.lang.String |
getName()
Get the name of this budget |
int |
indexOf(BudgetItem item)
Return the position in the item list of the given item |
boolean |
removeItem(BudgetItem item)
Remove the given budget item from the list. |
void |
setBudgetInfo(Budget budget)
Copies the information from the given budget into this budget. |
void |
setName(java.lang.String newName)
Set the name for this budget |
void |
sortItems()
Sort the list of budgets |
BudgetItem[] |
toArray()
Get a new array of the budget items contained in this list |
java.lang.String |
toString()
Return the string representation of this budget |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Budget(BudgetList list, RootAccount root)
public Budget(BudgetList list, RootAccount root, java.lang.String key, StreamTable info)
Method Detail |
---|
public void setBudgetInfo(Budget budget)
public Budget cloneBudget()
public boolean containsDate(int dateInt)
dateInt
- The date to test.
public final java.lang.String getKey()
public final BudgetList getBudgetList()
public final void sortItems()
public java.lang.String getName()
public void setName(java.lang.String newName)
public int getItemCount()
public BudgetItem getItem(int i)
public BudgetItem[] toArray()
public boolean removeItem(BudgetItem item)
public int indexOf(BudgetItem item)
public BudgetItem createItem()
public java.lang.String toString()
toString
in class java.lang.Object
public BudgetCalculationResults calculate(com.moneydance.apps.md.controller.time.GraphInterval[] graphIntervals, boolean showAllCategories, boolean showZeroes)
graphIntervals
- Graphing/reporting intervals representing a series of date ranges.showAllCategories
- True if all categories, including unbudgeted ones, are to be shown.showZeroes
- True if budget items with no spending and no budgeted amount are
to be included.
public BudgetCalculationResults calculate(int startDate, int endDate, boolean showAllCategories, boolean showZeroes)
startDate
- Starting date to include.endDate
- Ending date to include.showAllCategories
- True if all categories, including unbudgeted ones, are to be shown.showZeroes
- True if budget items with no spending and no budgeted amount are to
be included.
public static BudgetCalculationResults calculate(DateRange[] dateRanges, RootAccount rootAccount, java.util.List<BudgetItem> items, boolean showAllCategories, boolean showZeroes)
dateRanges
- List of date ranges to compute actual and budgeted for.rootAccount
- Root account containing all other accounts.items
- List of budget items to compute with.showAllCategories
- True if all categories, including unbudgeted ones, are to be shown.showZeroes
- True if budget items with no spending and no budgeted amount are
to be included.
public static int getIntervalIdx(DateRange[] intervals, int date)
intervals
- A list of date intervals.date
- The date to find.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |