public class Currency extends java.lang.Object implements java.lang.Comparable<Currency>
In the future, this should convert to and from BigDecimal or Double
| Constructor and Description |
|---|
Currency(long newValue)
constructor that takes a long already in COM representation
|
Currency(java.lang.String newValue)
constructor that takes a String already in COM representation
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Currency anotherCurrency)
Compares the values of two currencies
|
boolean |
equals(java.lang.Object o) |
protected java.lang.Long |
getLongValue()
Getter to the inner Long so that
Comparable.compareTo(T) can work |
long |
longValue()
Return the currency as a primitive long.
|
public Currency(long newValue)
newValue - New value.public Currency(java.lang.String newValue)
newValue - New value.public long longValue()
protected java.lang.Long getLongValue()
Comparable.compareTo(T) can workpublic int compareTo(Currency anotherCurrency)
compareTo in interface java.lang.Comparable<Currency>anotherCurrency - Currency object to compare to.public boolean equals(java.lang.Object o)
equals in class java.lang.Objecthttp://jacob-project.sourceforge.net