public class BudgetList
extends java.lang.Object
| 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.
|
Budget |
findCurrentBudget()
Return the most recent budget found that contains today's date.
|
Budget |
getBudget(int i)
Get the budget at the given position in the list
|
int |
getBudgetCount()
Get the number of budgets in the list
|
Budget |
getBudgetWithKey(java.lang.String key)
Get the budget with the given key, if any
|
int |
indexOf(Budget b)
Return the index of the given budget in the list or -1 if it is not
in the list.
|
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.
|
void |
sortBudgets()
Sort the list of budgets
|
public void addListener(BudgetListener listener)
public void removeListener(BudgetListener listener)
public final void sortBudgets()
public int getBudgetCount()
public Budget getBudget(int i)
public Budget getBudgetWithKey(java.lang.String key)
public Budget findCurrentBudget()
null if there are none.public int indexOf(Budget b)
public boolean removeBudget(Budget budget)
public void addBudget(Budget budget)