|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ecash.kernel.BuyerPurse
Contains all the notes and information used to build them. Calls to the add() and the remove() methods will be taken into account only after a call to addCommit() and removeCommit() respectively. The clear() method will initialize this process. Each item of this list is a BuyerPurseUnit object.
BuyerPurseUnit
,
Serialized FormConstructor Summary | |
BuyerPurse()
Creates a BuyerPurse. |
Method Summary | |
void |
add(Note note,
FullNotesList fullNotesList,
BankChoice bankChoice)
Adds a new note and its building information. |
void |
addCommit()
Let's take into effect all the calls made to the add() method, and then calls the clear() method. |
void |
clear()
Initializes the data for the add() and the remove() methods. |
int |
findAmount(java.lang.String amount)
Returns the first index of a note with the specified amount. |
java.util.Vector |
getAmountList()
Returns the amounts list of the notes. |
BankChoice |
getBankChoice(int index)
Gets the BankChoice of the specified note. |
FullNotesList |
getFullNotesList(int index)
Gets the FullNotesList of the specified note. |
Note |
getNote(int index)
Gets the specified note. |
void |
initFindAmount()
Initializes the findAmount() method. |
void |
remove(int index)
Removes a note. |
void |
removeCommit()
Let's take into effect all the calls made to the remove() method, and then calls the clear() method. |
int |
size()
Returns the number of notes. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BuyerPurse()
Method Detail |
public void add(Note note, FullNotesList fullNotesList, BankChoice bankChoice)
note
- the notefullNotesList
- all the information used to create the note, and
also the other notes (the bank gets several notes and then choose
wich one she will signbankChoice
- the note chosen by the bankaddCommit()
public void addCommit()
add(ecash.kernel.Note, ecash.kernel.FullNotesList, ecash.kernel.BankChoice)
public void remove(int index)
index
- the index of the note to removeremoveCommit()
public void removeCommit()
remove(int)
public Note getNote(int index)
index
- the index in the listpublic FullNotesList getFullNotesList(int index)
index
- the index in the listpublic BankChoice getBankChoice(int index)
index
- the index in the listpublic java.util.Vector getAmountList()
public int size()
public void clear()
public void initFindAmount()
public int findAmount(java.lang.String amount)
amount
- the amount to find
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |