|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jacob.com.Currency
public class Currency
Most COM bridges use java.lang.Long as their Java data type for COM Currency data. This is because COM currency is a 64 bit number where the last 4 digits represent the milli-cents. We wanted to support 64 bit Long values for x64 platforms so that meant we wanted to map Java.LONG to COM.LONG even though it only works for 64 bit platforms. The end result was we needed a new representation for Money so we have this.
In the future, this should convert to and from BigDecimal or Double
Constructor Summary | |
---|---|
Currency(long newValue)
constructor that takes a long already in COM representation |
|
Currency(String newValue)
constructor that takes a String already in COM representation |
Method Summary | |
---|---|
int |
compareTo(Currency anotherCurrency)
compares the values of two currencies |
int |
compareTo(Object o)
standard comparison |
boolean |
equals(Object o)
|
protected Long |
getLongValue()
getter to the inner storage so that cmpareTo can work |
long |
longValue()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Currency(long newValue)
newValue
- public Currency(String newValue)
newValue
- Method Detail |
---|
public long longValue()
protected Long getLongValue()
public int compareTo(Currency anotherCurrency)
anotherCurrency
-
public int compareTo(Object o)
o
- must be Currency or Long
public boolean equals(Object o)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |