|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for classes providing a shout management service for auctioneers. It is envisaged that there could be many different classes of shout management service, e.g. 4heap memory resident, 4heap with persistence and crash recovery, etc.
| Method Summary | |
java.util.Iterator |
askIterator()
Return an iterator that non-destructively iterates over every ask in the auction (both matched and unmatched). |
java.util.Iterator |
bidIterator()
Return an iterator that non-destructively iterates over every bid in the auction (both matched and unmatched). |
Shout |
getHighestMatchedAsk()
Get the highest matched ask. |
Shout |
getHighestUnmatchedBid()
Get the highest unmatched bid in the auction. |
Shout |
getLowestMatchedBid()
Get the lowest matched bid in the auction. |
Shout |
getLowestUnmatchedAsk()
Get the lowest unmatched ask. |
java.util.List |
getMatchedShouts()
Destructively fetch the list of matched bids and asks. |
void |
newAsk(Shout ask)
|
void |
newBid(Shout bid)
|
void |
printState()
Log the current state of the auction. |
void |
removeShout(Shout shout)
|
| Methods inherited from interface uk.ac.liv.util.Resetable |
reset |
| Method Detail |
public void newBid(Shout bid)
throws DuplicateShoutException
DuplicateShoutException
public void newAsk(Shout ask)
throws DuplicateShoutException
DuplicateShoutExceptionpublic void removeShout(Shout shout)
public void printState()
public java.util.List getMatchedShouts()
Destructively fetch the list of matched bids and asks. The list is of the form
where bi is the ith bid and a0 is the ith ask. A typical auctioneer would clear by matching bi with ai for all i at some price.
Note that the engine's set of matched shouts will become empty as a result of invoking this method.
public Shout getHighestUnmatchedBid()
public Shout getLowestMatchedBid()
public Shout getLowestUnmatchedAsk()
public Shout getHighestMatchedAsk()
public java.util.Iterator askIterator()
public java.util.Iterator bidIterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||