org.otfeed.event
Class OTBBO

java.lang.Object
  extended by org.otfeed.event.OTBBO
All Implemented Interfaces:
java.lang.Comparable<OTBBO>

public final class OTBBO
extends java.lang.Object
implements java.lang.Comparable<OTBBO>

The best bid or offer - this is half of a quote. These get sent when only one side is changing.


Constructor Summary
OTBBO()
          Default constructor.
OTBBO(java.util.Date timestamp, double price, int size, TradeSideEnum side, java.lang.String exchange, java.lang.String symbol)
          Constructor.
 
Method Summary
 int compareTo(OTBBO other)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getExchange()
           
 double getPrice()
           
 TradeSideEnum getSide()
           
 int getSize()
           
 java.lang.String getSymbol()
           
 java.util.Date getTimestamp()
           
 int hashCode()
           
 void setExchange(java.lang.String exchange)
          Sets exchange code.
 void setPrice(double price)
          Sets price.
 void setSide(TradeSideEnum side)
          Sets side.
 void setSize(int size)
          Sets size.
 void setSymbol(java.lang.String symbol)
          Sets symbol code.
 void setTimestamp(java.util.Date timestamp)
          Sets time of the event.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OTBBO

public OTBBO()
Default constructor.


OTBBO

public OTBBO(java.util.Date timestamp,
             double price,
             int size,
             TradeSideEnum side,
             java.lang.String exchange,
             java.lang.String symbol)
Constructor.

Parameters:
timestamp - time of the event.
price - price.
size - size.
side - side.
exchange - exchange code.
symbol - symbol code.
Method Detail

getTimestamp

public java.util.Date getTimestamp()
Returns:
timestamp when the event occurred.

setTimestamp

public void setTimestamp(java.util.Date timestamp)
Sets time of the event.

Parameters:
timestamp - Time when the event occurred.

getPrice

public double getPrice()
Returns:
Price.

setPrice

public void setPrice(double price)
Sets price.

Parameters:
price - Price.

getSize

public int getSize()
Returns:
Size.

setSize

public void setSize(int size)
Sets size.

Parameters:
size - Size.

getSide

public TradeSideEnum getSide()
Returns:
Side: B = Bid (buyer side). A = Ask (seller side).

setSide

public void setSide(TradeSideEnum side)
Sets side.

Parameters:
side - Side: B = Bid (buyer side). A = Ask (seller side).

getExchange

public java.lang.String getExchange()
Returns:
Exchange code.

setExchange

public void setExchange(java.lang.String exchange)
Sets exchange code.

Parameters:
exchange - Exchange code.

setSymbol

public void setSymbol(java.lang.String symbol)
Sets symbol code.

Parameters:
symbol - Symbol code.

getSymbol

public java.lang.String getSymbol()
Returns:
Symbol code; this field is provided for option chains only, because there can be more than one symbol appropriate to the requested underlyer and expiry date.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(OTBBO other)
Specified by:
compareTo in interface java.lang.Comparable<OTBBO>


Copyright © 2007 Mike Kroutikov. All Rights Reserved.