Package org.kuali.coeus.sys.api.model
Class ScaleThreeDecimal
- java.lang.Object
-
- java.lang.Number
-
- org.kuali.coeus.sys.api.model.AbstractDecimal<ScaleThreeDecimal>
-
- org.kuali.coeus.sys.api.model.ScaleThreeDecimal
-
- All Implemented Interfaces:
Serializable,Comparable<ScaleThreeDecimal>
public final class ScaleThreeDecimal extends AbstractDecimal<ScaleThreeDecimal>
This class is a wrapper aroundBigDecimal. It exposes the only the needed functionality ofBigDecimal, uses a standardRoundingModeofRoundingMode.HALF_UPand uses a standard SCALE of 3. This class is, likeBigDecimal, immutable; even methods which might be expected to change the value actually just return a new instance with the new value.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ScaleThreeDecimalONE_HUNDREDstatic intSCALEstatic ScaleThreeDecimalZERO-
Fields inherited from class org.kuali.coeus.sys.api.model.AbstractDecimal
ROUND_BEHAVIOR, value
-
-
Constructor Summary
Constructors Constructor Description ScaleThreeDecimal(double value)ScaleThreeDecimal(int value)ScaleThreeDecimal(String value)ScaleThreeDecimal(BigDecimal value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ScaleThreeDecimalnewInstance(int value)protected ScaleThreeDecimalnewInstance(BigDecimal value, int scale)protected ScaleThreeDecimaloneHundred()protected ScaleThreeDecimalzero()-
Methods inherited from class org.kuali.coeus.sys.api.model.AbstractDecimal
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
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Field Detail
-
SCALE
public static final int SCALE
- See Also:
- Constant Field Values
-
ZERO
public static final ScaleThreeDecimal ZERO
-
ONE_HUNDRED
public static final ScaleThreeDecimal ONE_HUNDRED
-
-
Constructor Detail
-
ScaleThreeDecimal
public ScaleThreeDecimal(String value)
-
ScaleThreeDecimal
public ScaleThreeDecimal(int value)
-
ScaleThreeDecimal
public ScaleThreeDecimal(double value)
-
ScaleThreeDecimal
public ScaleThreeDecimal(BigDecimal value)
-
-
Method Detail
-
newInstance
protected ScaleThreeDecimal newInstance(int value)
- Specified by:
newInstancein classAbstractDecimal<ScaleThreeDecimal>
-
newInstance
protected ScaleThreeDecimal newInstance(BigDecimal value, int scale)
- Specified by:
newInstancein classAbstractDecimal<ScaleThreeDecimal>
-
zero
protected ScaleThreeDecimal zero()
- Specified by:
zeroin classAbstractDecimal<ScaleThreeDecimal>
-
oneHundred
protected ScaleThreeDecimal oneHundred()
- Specified by:
oneHundredin classAbstractDecimal<ScaleThreeDecimal>
-
-