Venice 0.7beta

org.mov.quote
Class YahooIDQuoteFilter

java.lang.Object
  extended by org.mov.quote.YahooIDQuoteFilter
All Implemented Interfaces:
IDQuoteFilter

public class YahooIDQuoteFilter
extends java.lang.Object
implements IDQuoteFilter

Provides a filter to parse the Yahoo intra-day stock quote format. This format uses a date with the month name, prices are in dollars. The first column is the symbol, then the last quote, the time, change, open, high, low and then the volume. Example:

 IBM,76.39,6/17/2005,4:02pm,-0.66,77.70,77.73,76.38,8594900
 

Author:
Andrew Leppard

Constructor Summary
YahooIDQuoteFilter()
          Creates an instance of the filter.
 
Method Summary
 java.lang.String getName()
          Return the name of the filter.
 IDQuote toIDQuote(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(IDQuote 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

YahooIDQuoteFilter

public YahooIDQuoteFilter()
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 IDQuoteFilter
Returns:
the name of the filter.

toIDQuote

public IDQuote toIDQuote(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:
toIDQuote in interface IDQuoteFilter
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(IDQuote quote)
Convert the given stock quote to a string line.

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

Venice 0.7beta