Venice 0.751beta

nz.org.venice.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.
 long 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

public 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

public static final int DAY_OPEN
Represents day open quote

See Also:
Constant Field Values

DAY_LOW

public 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

public 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

public 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

public static final int BID
Represents current bid.

See Also:
Constant Field Values

ASK

public static final int ASK
Represents current ask.

See Also:
Constant Field Values
Method Detail

getSymbol

public Symbol getSymbol()
Return the stock's symbol.

Returns:
the symbol

getDate

public TradingDate getDate()
Return the quote date.

Returns:
the date

getDayVolume

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

Returns:
the volume

getDayLow

public 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

public 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

public double getDayOpen()
Return the day open.

Returns:
the day open

getDayClose

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

Returns:
the day close

getQuote

public 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.751beta