java.lang.Object
org.rakiura.mbot.CurrencyTable
- public class CurrencyTable
- extends java.lang.Object
General purpose object class supporting currency conversions.
The data must be presented in text file by rows as:
currency_3_letters_code unit? ?unit comments
and one row must have ??? 1.0 1.0 which will indicate that this row is
the base currency for a given table. E.g.
USD 0.526990 1.89757 Dollars States United
EUR 0.507634 1.96992 Euro
the first float is 1baseunit/unit second unit/1baseunit
- Version:
- version 0.3 $Revision: 1.1.1.1 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
table
private java.util.Hashtable table
datapath
private java.lang.String datapath
CurrencyTable
public CurrencyTable(java.lang.String datapath,
java.lang.String current)
readData
public void readData(java.lang.String filename)
getRatio
public float getRatio(java.lang.String sin,
java.lang.String sout)
getInfo
public java.lang.String getInfo(java.lang.String currency)
toFloat
private float toFloat(java.lang.String tmp)