Venice 0.751beta

nz.org.venice.quote
Class YahooEODQuoteFilter

java.lang.Object
  extended bynz.org.venice.quote.YahooEODQuoteFilter
All Implemented Interfaces:
EODQuoteFilter

public class YahooEODQuoteFilter
extends java.lang.Object
implements EODQuoteFilter

Provides a filter to parse the Yahoo end-of-day stock quote format. This format uses a date with the month name, prices are in dollars. The first column is the date, then open, high, low, close & volume. The final field is the adjusted close. This filter is not hooked up to the QuoteFilterList because we cannot currently ask the user to enter the missing symbol. Example:

 16-Oct-03,38.75,39.15,38.22,38.70,307300,38.70
 

Author:
Andrew Leppard

Constructor Summary
YahooEODQuoteFilter(Symbol symbol)
          Creates an instance of the filter.
 
Method Summary
 java.lang.String getName()
          Return the name of the filter.
 EODQuote toEODQuote(java.lang.String quoteLine)
          Parse the given text string and returns the stock quote or null if it did not contain a valid quote.
 java.lang.String toString(EODQuote quote)
          Convert the given stock quote to a string line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YahooEODQuoteFilter

public YahooEODQuoteFilter(Symbol symbol)
Creates an instance of the filter.

Method Detail

getName

public java.lang.String getName()
Return the name of the filter.

Specified by:
getName in interface EODQuoteFilter
Returns:
the name of the filter.

toEODQuote

public EODQuote toEODQuote(java.lang.String quoteLine)
                    throws QuoteFormatException
Parse the given text string and returns the stock quote or null if it did not contain a valid quote.

Specified by:
toEODQuote in interface EODQuoteFilter
Parameters:
quoteLine - a single line of text containing a quote
Returns:
the stock quote
Throws:
QuoteFormatException - if the quote could not be parsed

toString

public java.lang.String toString(EODQuote quote)
Convert the given stock quote to a string line.

Specified by:
toString in interface EODQuoteFilter
Parameters:
quote - a stock quote
Returns:
string version of the quote

Venice 0.751beta