public class Money extends FixedPointFloat
| Modifier and Type | Field and Description |
|---|---|
static int |
DIGITS |
static String |
MAX_VALUE |
static String |
MIN_VALUE |
PRIME_HASHCODE, ZERO| Modifier | Constructor and Description |
|---|---|
|
Money()
Don't call this constructor! For DWR internal use only!
|
protected |
Money(BigDecimal value) |
protected |
Money(BigDecimal value,
int digits) |
|
Money(Long value)
Constructor with database value representation given in parameter; this constructor should be used only by the
framework.
|
protected |
Money(Long value,
int digits) |
protected |
Money(Money value,
int digits) |
|
Money(String value) |
protected |
Money(String value,
int digits) |
| Modifier and Type | Method and Description |
|---|---|
protected Long |
floorValue(long value,
int minAmount)
Returns the value rounded to the next lower value, similar to Math.floor.
|
int |
hashCode() |
boolean |
isNegative() |
boolean |
isPositive() |
Money |
round(Money roundingGranularity) |
protected Long |
roundValue(int minAmount)
Returned the rounded value as long.
|
static Money |
zero()
Returns a zero money; a new object is returned for every call (Money.zero() == Money.zero() => false)
|
compareTo, doubleValue, equals, floatValue, getBigDecimalValue, getDigits, getValue, getValue, intValue, isZero, longValue, setDigits, setValue, toString, toStringbyteValue, shortValuepublic static final String MIN_VALUE
public static final String MAX_VALUE
public static final int DIGITS
public Money()
public Money(String value)
protected Money(String value, int digits)
protected Money(Money value, int digits)
public Money(Long value)
protected Money(Long value, int digits)
protected Money(BigDecimal value)
protected Money(BigDecimal value, int digits)
public boolean isNegative()
public boolean isPositive()
protected Long roundValue(int minAmount)
protected Long floorValue(long value, int minAmount)
public static Money zero()
public int hashCode()
hashCode in class FixedPointFloatCopyright © 2021. All rights reserved.