public final class Money
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
Money |
asPrecision(int precision)
Returns a new Money object with the base value cast to the specified
precision.
|
boolean |
equals(java.lang.Object obj) |
long |
factor() |
int |
hashCode() |
long |
longValue() |
int |
precision() |
java.lang.String |
toString()
Returns formatted string representing the values in the Money object.
|
static Money |
valueOf(long longValue,
int precision) |
static Money |
valueOf(java.lang.String stringValue)
Returns a Money object instance by parsing the specified string.
|
static Money |
valueOf(java.lang.String stringValue,
int precision)
Creates a Money object with the specified precision by parsing the string.
|
public static Money valueOf(long longValue, int precision)
public static Money valueOf(java.lang.String stringValue) throws RangeOverflowException, LossOfPrecisionException
stringValue - LossOfPrecisionExceptionRangeOverflowExceptionpublic static Money valueOf(java.lang.String stringValue, int precision) throws RangeOverflowException, LossOfPrecisionException
stringValue - precision - RangeOverflowExceptionLossOfPrecisionExceptionpublic final int precision()
public final long longValue()
public final long factor()
public final Money asPrecision(int precision) throws RangeOverflowException, LossOfPrecisionException
precision - RangeOverflowExceptionLossOfPrecisionExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object