|
Purple Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.purpletech.graph.currency.CurrencyMapper
|
+--com.purpletech.graph.currency.USDMapper
This class converts between BogoDollars and US Dollars (decimal representation, to 4 decimal places (1/100 of a penny)).
| Field Summary |
| Fields inherited from class com.purpletech.graph.currency.CurrencyMapper |
locale |
| Constructor Summary | |
USDMapper()
|
|
| Method Summary | |
int |
fromDouble(double val)
converts from a double (representing an actual value in the actual underlying currency) to BogoDollars |
int |
fromObject(java.lang.Object val)
converts from an Object representing an actual value in the real units to an int. |
int |
fromString(java.lang.String s)
converts from a String (representing an actual value in the actual underlying currency) to BogoDollars. |
double |
toDouble(int val)
converts from BogoDollars to a double representation of this currency |
java.lang.String |
toString(java.lang.Object val)
converts from some Object type to a String representation of this unit |
| Methods inherited from class com.purpletech.graph.currency.CurrencyMapper |
getLocale, getUnitInterval, setLocale, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public USDMapper()
| Method Detail |
public double toDouble(int val)
toDouble in class CurrencyMapperpublic int fromDouble(double val)
fromDouble in class CurrencyMapperpublic java.lang.String toString(java.lang.Object val)
Unit
val - an object containing the value, usually a number wrapperpublic int fromObject(java.lang.Object val)
Unit
val - a String representing an actual value in the real units
public int fromString(java.lang.String s)
throws java.text.ParseException
CurrencyMapperShould be overridden if the Locale's parse method doesn't work correctly for this currency (e.g. fractious and fractional values)
fromString in interface UnitfromString in class CurrencyMappers - a String representing an actual value in the real units
java.text.ParseException
|
Documentation generated March 5 2003 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||