|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OrderBook
Method Summary | |
---|---|
void |
add(Order shout)
|
java.util.Iterator<Order> |
askIterator()
Return an iterator that non-destructively iterates over every ask in the market (both matched and unmatched). |
java.util.Iterator<Order> |
bidIterator()
Return an iterator that non-destructively iterates over every bid in the market (both matched and unmatched). |
int |
getDepth()
|
Order |
getHighestMatchedAsk()
Get the highest matched ask. |
Order |
getHighestUnmatchedBid()
Get the highest unmatched bid in the market. |
Order |
getLowestMatchedBid()
Get the lowest matched bid in the market. |
Order |
getLowestUnmatchedAsk()
Get the lowest unmatched ask. |
java.util.List<Order> |
getUnmatchedAsks()
|
java.util.List<Order> |
getUnmatchedBids()
|
boolean |
isEmpty()
|
java.util.List<Order> |
matchOrders()
Destructively fetch the list of matched bids and asks. |
void |
printState()
Log the current state of the market. |
void |
remove(Order shout)
|
Method Detail |
---|
void add(Order shout) throws DuplicateShoutException
DuplicateShoutException
void remove(Order shout)
void printState()
java.util.List<Order> matchOrders()
Destructively fetch the list of matched bids and asks. The list is of the form
where bi is the ith bid and ai 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.
Order getHighestUnmatchedBid()
Order getLowestMatchedBid()
Order getLowestUnmatchedAsk()
Order getHighestMatchedAsk()
java.util.Iterator<Order> askIterator()
java.util.Iterator<Order> bidIterator()
boolean isEmpty()
int getDepth()
java.util.List<Order> getUnmatchedBids()
java.util.List<Order> getUnmatchedAsks()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |