public final class ScaleThreeDecimal extends AbstractDecimal<ScaleThreeDecimal>
BigDecimal
. It exposes the only the
needed functionality of BigDecimal
, uses a standard
RoundingMode
of RoundingMode.HALF_UP
and uses a standard SCALE of 3.
This class is, like BigDecimal
, immutable; even methods which
might be expected to change the value actually just return a new instance
with the new value.Modifier and Type | Field and Description |
---|---|
static ScaleThreeDecimal |
ONE_HUNDRED |
static int |
SCALE |
static ScaleThreeDecimal |
ZERO |
ROUND_BEHAVIOR, value
Constructor and Description |
---|
ScaleThreeDecimal(BigDecimal value) |
ScaleThreeDecimal(double value) |
ScaleThreeDecimal(int value) |
ScaleThreeDecimal(String value) |
Modifier and Type | Method and Description |
---|---|
protected ScaleThreeDecimal |
newInstance(BigDecimal value,
int scale) |
protected ScaleThreeDecimal |
newInstance(int value) |
protected ScaleThreeDecimal |
oneHundred() |
protected ScaleThreeDecimal |
zero() |
abs, add, bigDecimalValue, compareTo, divide, doubleValue, equals, floatValue, hashCode, intValue, isGreaterEqual, isGreaterThan, isLessEqual, isLessThan, isNegative, isNonZero, isNumeric, isPositive, isZero, longValue, mod, multiply, negated, percentage, subtract, toString
byteValue, shortValue
public static final int SCALE
public static final ScaleThreeDecimal ZERO
public static final ScaleThreeDecimal ONE_HUNDRED
public ScaleThreeDecimal(String value)
public ScaleThreeDecimal(int value)
public ScaleThreeDecimal(double value)
public ScaleThreeDecimal(BigDecimal value)
protected ScaleThreeDecimal newInstance(int value)
newInstance
in class AbstractDecimal<ScaleThreeDecimal>
protected ScaleThreeDecimal newInstance(BigDecimal value, int scale)
newInstance
in class AbstractDecimal<ScaleThreeDecimal>
protected ScaleThreeDecimal zero()
zero
in class AbstractDecimal<ScaleThreeDecimal>
protected ScaleThreeDecimal oneHundred()
oneHundred
in class AbstractDecimal<ScaleThreeDecimal>
Copyright © 2014–2015 The Kuali Foundation. All rights reserved.