Venice 0.7beta

org.mov.quote
Class MetaStock2QuoteFilter

java.lang.Object
  extended by org.mov.quote.MetaStock2QuoteFilter
All Implemented Interfaces:
EODQuoteFilter

public class MetaStock2QuoteFilter
extends java.lang.Object
implements EODQuoteFilter

Provides a filter to parse the Meta Stock (volume/100) quote format. This format uses 4 digit years and prices in dollars, volume is divided by 100. The first column is the symbol, then the date, open, high, low, close & volume. Exampe:

 XXX,19990715,1.73,1.82,1.71,1.81,36489
 

Author:
Andrew Leppard

Constructor Summary
MetaStock2QuoteFilter()
          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

MetaStock2QuoteFilter

public MetaStock2QuoteFilter()
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.7beta