org.mov.quote
Class YahooExchangeRateFilter
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
YahooExchangeRateFilter
public YahooExchangeRateFilter()
- Create an instance of this filter.
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