net.sourceforge.eclipsetrader.core.db.feed
Class Quote

java.lang.Object
  extended bynet.sourceforge.eclipsetrader.core.db.feed.Quote

public class Quote
extends java.lang.Object

Price quote snapshot.

Since:
1.0
Author:
Marco Maccaferri

Constructor Summary
Quote()
           
Quote(java.util.Date date, double last, double bid, double ask)
          Build a new instance giving the last update date, last, bid and ask prices.
Quote(double last, double bid, double ask)
          Build a new instance giving the last, bid and ask prices.
Quote(Quote quote)
          Build a new instance that is the exact copy of the given instance.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 double getAsk()
           
 int getAskSize()
           
 double getBid()
           
 int getBidSize()
           
 java.util.Date getDate()
          Returns the date when the quote was last updated.
 double getLast()
           
 long getVolume()
          Returns the cumulative volume exchange.
 void setAsk(double ask)
           
 void setAskSize(int askSize)
           
 void setBid(double bid)
           
 void setBidSize(int bidSize)
           
 void setDate(java.util.Date date)
          Sets the date when the quote was last updated.
 void setLast(double last)
           
 void setVolume(long volume)
          Sets the cumulative volume exchange.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Quote

public Quote()

Quote

public Quote(Quote quote)
Build a new instance that is the exact copy of the given instance.

Parameters:
quote - the instance to copy

Quote

public Quote(double last,
             double bid,
             double ask)
Build a new instance giving the last, bid and ask prices.

Parameters:
last - the last price
bid - the bid price
ask - the ask price

Quote

public Quote(java.util.Date date,
             double last,
             double bid,
             double ask)
Build a new instance giving the last update date, last, bid and ask prices.

Parameters:
date - the last update date
last - the last price
bid - the bid price
ask - the ask price
Method Detail

getDate

public java.util.Date getDate()
Returns the date when the quote was last updated.

Returns:
the last update date/time

setDate

public void setDate(java.util.Date date)
Sets the date when the quote was last updated.

Parameters:
date - the last update date/time

getAsk

public double getAsk()

setAsk

public void setAsk(double ask)

getBid

public double getBid()

setBid

public void setBid(double bid)

getLast

public double getLast()

setLast

public void setLast(double last)

getAskSize

public int getAskSize()

setAskSize

public void setAskSize(int askSize)

getBidSize

public int getBidSize()

setBidSize

public void setBidSize(int bidSize)

getVolume

public long getVolume()
Returns the cumulative volume exchange.

Returns:
the volume value

setVolume

public void setVolume(long volume)
Sets the cumulative volume exchange.

Parameters:
volume - the volume value

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Quote objects are equal if all fields, excluding the date field, are equals.