org.powertac.common
Class OrderbookOrder

java.lang.Object
  extended by org.powertac.common.OrderbookOrder
All Implemented Interfaces:
Comparable<Object>

public class OrderbookOrder
extends Object
implements Comparable<Object>

Each instance is an individual un-cleared entry (a Bid or an Ask) within an Orderbook.

Author:
Daniel Schnurr

Constructor Summary
OrderbookOrder(double mWh, Double limitPrice)
           
 
Method Summary
 int compareTo(Object o)
           
 long getId()
           
 Double getLimitPrice()
          Returns the limit price for this unsatisfied order.
 double getMWh()
          Returns the quantity of energy unsatisfied for an order.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrderbookOrder

public OrderbookOrder(double mWh,
                      Double limitPrice)
Method Detail

getId

public long getId()

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable<Object>

getLimitPrice

public Double getLimitPrice()
Returns the limit price for this unsatisfied order. Normally this will have a sign opposite to the mWh energy quantity.


getMWh

public double getMWh()
Returns the quantity of energy unsatisfied for an order. This will positive for a bid, negative for an ask.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.