Venice 0.7beta

org.mov.quote
Class YahooExchangeRateFilter

java.lang.Object
  extended by org.mov.quote.YahooExchangeRateFilter

public class YahooExchangeRateFilter
extends java.lang.Object

Provides a filter to parse currency exchange rates supplied from Yahoo. The currency exchange rate format contains the two currencies being exchanged, the current price, the date of the quote, the time of the quote, and the bid and ask rates. Example:

 "USDJPY=X", 115.845,   1/25/2006, 5:10pm, 115.83, 115.86
 

Author:
Andrew Leppard

Constructor Summary
YahooExchangeRateFilter()
          Create an instance of this filter.
 
Method Summary
 ExchangeRate toExchangeRate(java.lang.String line)
          Parse the given text string and return the exchange rate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YahooExchangeRateFilter

public YahooExchangeRateFilter()
Create an instance of this filter.

Method Detail

toExchangeRate

public ExchangeRate toExchangeRate(java.lang.String line)
                            throws ExchangeRateFormatException
Parse the given text string and return the exchange rate.

Parameters:
line - a single line of text containing the exchange rate
Returns:
the exchange rate
Throws:
ExchangeRateFormatException - if the line could not be parsed

Venice 0.7beta