|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Defines money management operations.
| Method Summary | |
void |
accept(IMoneyVisitor visitor)
Retrieve territory information. |
void |
add(IMoney money)
Add the given money. |
boolean |
buy(int amount)
Decrease the amount for the current fundings. |
boolean |
canAfford(int amount)
Test if a buy can be afforded. |
void |
pay(int amount)
Credit the given amount. |
void |
reset()
Reset the amounts to zero. |
| Method Detail |
public void pay(int amount)
amount - the amountpublic boolean canAfford(int amount)
amount - the amount
public boolean buy(int amount)
This operation should fail of it cannot be afforded.
amount - the amount to decrease
public void accept(IMoneyVisitor visitor)
visitor - the visitorpublic void add(IMoney money)
money - the money to addpublic void reset()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||