public class BudgetList
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BUDGET_CLASS_DISCRETIONARY |
static java.lang.String |
BUDGET_CLASS_INCOME |
static java.lang.String |
BUDGET_CLASS_MISC |
static java.lang.String |
BUDGET_CLASS_REQUIRED |
static java.lang.String |
BUDGET_INTERVAL_MONTHLY |
static java.lang.String |
BUDGET_INTERVAL_QUARTERLY |
static java.lang.String |
BUDGET_INTERVAL_WEEKLY |
static java.lang.String |
BUDGET_INTERVAL_YEARLY |
Modifier and Type | Method and Description |
---|---|
void |
addBudget(Budget budget)
Create a new budget, add it to the list, and return it
|
void |
addListener(BudgetListener listener)
Add a listener for events that affect the budget list or the budgets
in the list.
|
boolean |
containsBudgetWithName(java.lang.String budgetName) |
Budget |
findCurrentBudget()
Return the most recent budget found that contains today's date.
|
java.util.List<Budget> |
getAllBudgets() |
Budget |
getBudgetWithID(java.lang.String budgetID)
Get the budget with the given key, if any
|
Budget |
getBudgetWithKey(java.lang.String key)
Get the budget with the given key, if any
|
void |
loadFromLegacyStorage() |
boolean |
removeBudget(Budget budget)
Remove the given budget from the list.
|
void |
removeListener(BudgetListener listener)
Removeo a listener for events that affect the budget list or the budgets
in the list.
|
public static final java.lang.String BUDGET_INTERVAL_MONTHLY
public static final java.lang.String BUDGET_INTERVAL_WEEKLY
public static final java.lang.String BUDGET_INTERVAL_QUARTERLY
public static final java.lang.String BUDGET_INTERVAL_YEARLY
public static final java.lang.String BUDGET_CLASS_MISC
public static final java.lang.String BUDGET_CLASS_DISCRETIONARY
public static final java.lang.String BUDGET_CLASS_REQUIRED
public static final java.lang.String BUDGET_CLASS_INCOME
public void loadFromLegacyStorage()
public void addListener(BudgetListener listener)
public void removeListener(BudgetListener listener)
public java.util.List<Budget> getAllBudgets()
public Budget getBudgetWithKey(java.lang.String key)
public Budget getBudgetWithID(java.lang.String budgetID)
public Budget findCurrentBudget()
null
if there are none.public boolean removeBudget(Budget budget)
public void addBudget(Budget budget)
public boolean containsBudgetWithName(java.lang.String budgetName)