|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mov.quote.EODQuote
public class EODQuote
Representation of an end-of-day stock quote for a given stock on a given date.
Field Summary |
---|
Fields inherited from interface org.mov.quote.Quote |
---|
ASK, BID, DAY_CLOSE, DAY_HIGH, DAY_LOW, DAY_OPEN, DAY_VOLUME |
Constructor Summary | |
---|---|
EODQuote(Symbol symbol,
TradingDate date,
int day_volume,
double day_low,
double day_high,
double day_open,
double day_close)
Create a new end-of-day stock quote for the given date. |
Method Summary | |
---|---|
boolean |
equals(EODQuote quote)
Compare the two stock quotes for equality. |
boolean |
equals(java.lang.Object quote)
Compare the two stock quotes for equality. |
TradingDate |
getDate()
Return the quote date. |
double |
getDayClose()
Return the day close. |
double |
getDayHigh()
Return the day high. |
double |
getDayLow()
Return the day low. |
double |
getDayOpen()
Return the day open. |
int |
getDayVolume()
Return the volume. |
double |
getQuote(int quote)
Get a single quote. |
Symbol |
getSymbol()
Return the stock's symbol. |
void |
setDate(TradingDate date)
Set the quote date. |
void |
setSymbol(Symbol symbol)
Set the symbol for this quote. |
java.lang.String |
toString()
Return a string representation of the stock quote. |
void |
verify()
Clean up the quote. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EODQuote(Symbol symbol, TradingDate date, int day_volume, double day_low, double day_high, double day_open, double day_close)
symbol
- the stock symboldate
- the date of this stock quoteday_volume
- the number of shares traded on this dateday_low
- the lowest quote on this dateday_high
- the highest quote on this dateday_open
- the opening quote on this dateday_close
- the closing quote on this dateMethod Detail |
---|
public void verify() throws QuoteFormatException
QuoteFormatException
- if there were any problems with the quotepublic Symbol getSymbol()
getSymbol
in interface Quote
public TradingDate getDate()
getDate
in interface Quote
public int getDayVolume()
getDayVolume
in interface Quote
public double getDayLow()
getDayLow
in interface Quote
public double getDayHigh()
getDayHigh
in interface Quote
public double getDayOpen()
getDayOpen
in interface Quote
public double getDayClose()
getDayClose
in interface Quote
public void setSymbol(Symbol symbol)
symbol
- the stock symbolpublic void setDate(TradingDate date)
date
- the datepublic boolean equals(java.lang.Object quote)
equals
in class java.lang.Object
quote
- the quote to compare against
1
if they are equal; 0
otherwisepublic boolean equals(EODQuote quote)
quote
- the quote to compare against
1
if they are equal; 0
otherwisepublic double getQuote(int quote) throws java.lang.UnsupportedOperationException
Quote
getQuote
in interface Quote
quote
- the quote type:
Quote.DAY_OPEN
,
Quote.DAY_CLOSE
,
Quote.DAY_HIGH
,
Quote.DAY_LOW
,
Quote.DAY_VOLUME
,
Quote.BID
, or
Quote.ASK
java.lang.UnsupportedOperationException
- if the quote type is not
supported by the quote. For example, end of day quotes
do not contain bid or ask prices.public java.lang.String toString()
toString
in class java.lang.Object
|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |