Venice 0.7beta

org.mov.quote
Interface Quote

All Known Implementing Classes:
EODQuote, IDQuote

public interface Quote

Representation of either an end-of-day or an intra-day stock quote. This interface allows code to manipulate both quote kinds without writing specific code to handle each.

Author:
Andrew Leppard

Field Summary
static int ASK
          Represents current ask.
static int BID
          Represents current bid.
static int DAY_CLOSE
          Represents day close quote for end-of-day quotes or last quote for intra-day quotes.
static int DAY_HIGH
          Represents day high quote for end-of-day quotes or current day high for intra-day quotes.
static int DAY_LOW
          Represents day low quote for end-of-day quotes or current day low for intra-day quotes.
static int DAY_OPEN
          Represents day open quote
static int DAY_VOLUME
          Represents day volume quote for end-of-day quotes or current volume for intra-day quotes.
 
Method Summary
 TradingDate getDate()
          Return the quote date.
 double getDayClose()
          Return the day close for end-of-day quotes or the last quote for intra-day quotes.
 double getDayHigh()
          Return the day high for end-of-day quotes or the current day high for intra-day quotes.
 double getDayLow()
          Return the day low for end-of-day quotes or the current day low for intra-day quotes.
 double getDayOpen()
          Return the day open.
 int getDayVolume()
          Return the day volume quote for end-of-day quotes or the current volume for intra-day quotes.
 double getQuote(int quote)
          Get a single quote.
 Symbol getSymbol()
          Return the stock's symbol.
 

Field Detail

DAY_CLOSE

static final int DAY_CLOSE
Represents day close quote for end-of-day quotes or last quote for intra-day quotes.

See Also:
Constant Field Values

DAY_OPEN

static final int DAY_OPEN
Represents day open quote

See Also:
Constant Field Values

DAY_LOW

static final int DAY_LOW
Represents day low quote for end-of-day quotes or current day low for intra-day quotes.

See Also:
Constant Field Values

DAY_HIGH

static final int DAY_HIGH
Represents day high quote for end-of-day quotes or current day high for intra-day quotes.

See Also:
Constant Field Values

DAY_VOLUME

static final int DAY_VOLUME
Represents day volume quote for end-of-day quotes or current volume for intra-day quotes.

See Also:
Constant Field Values

BID

static final int BID
Represents current bid.

See Also:
Constant Field Values

ASK

static final int ASK
Represents current ask.

See Also:
Constant Field Values
Method Detail

getSymbol

Symbol getSymbol()
Return the stock's symbol.

Returns:
the symbol

getDate

TradingDate getDate()
Return the quote date.

Returns:
the date

getDayVolume

int getDayVolume()
Return the day volume quote for end-of-day quotes or the current volume for intra-day quotes.

Returns:
the volume

getDayLow

double getDayLow()
Return the day low for end-of-day quotes or the current day low for intra-day quotes.

Returns:
the day low

getDayHigh

double getDayHigh()
Return the day high for end-of-day quotes or the current day high for intra-day quotes.

Returns:
the day high

getDayOpen

double getDayOpen()
Return the day open.

Returns:
the day open

getDayClose

double getDayClose()
Return the day close for end-of-day quotes or the last quote for intra-day quotes.

Returns:
the day close

getQuote

double getQuote(int quote)
                throws java.lang.UnsupportedOperationException
Get a single quote.

Parameters:
quote - the quote type: DAY_OPEN, DAY_CLOSE, DAY_HIGH, DAY_LOW, DAY_VOLUME, BID, or ASK
Throws:
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.

Venice 0.7beta