net.commerce.zocalo.orders
Class SortedOrders
java.lang.Object
net.commerce.zocalo.orders.SortedOrders
public class SortedOrders
- extends java.lang.Object
A collection of Orders on a single asset. Used by a Book to manage the orders
and to find the best order when there is an offer.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SortedOrders
public SortedOrders(Position position,
Price price)
iterator
public java.util.Iterator iterator()
getBest
public Order getBest()
bestPrice
public Price bestPrice()
hasOrders
public boolean hasOrders()
add
public void add(Order o)
throws DuplicateOrderException
- Throws:
DuplicateOrderException
remove
public boolean remove(Order o)
getQuantityAtPrice
public Quantity getQuantityAtPrice(Price price)
usersOwnOrders
public Order[] usersOwnOrders(User user,
boolean increasingOrder)
printPrices
public void printPrices(java.lang.StringBuffer buf)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getSamplePrice
public Price getSamplePrice()
- Deprecated.
setSamplePrice
public void setSamplePrice(Price samplePrice)
- Deprecated.