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>
This class is a wrapper around
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.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScaleThreeDecimalstatic final intstatic final ScaleThreeDecimalFields inherited from class org.kuali.coeus.sys.api.model.AbstractDecimal
ROUND_BEHAVIOR, value -
Constructor Summary
ConstructorsConstructorDescriptionScaleThreeDecimal(double value) ScaleThreeDecimal(int value) ScaleThreeDecimal(String value) ScaleThreeDecimal(BigDecimal value) -
Method Summary
Modifier and TypeMethodDescriptionprotected ScaleThreeDecimalnewInstance(int value) protected ScaleThreeDecimalnewInstance(BigDecimal value, int scale) protected ScaleThreeDecimalprotected 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, toStringMethods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
SCALE
public static final int SCALE- See Also:
-
ZERO
-
ONE_HUNDRED
-
-
Constructor Details
-
ScaleThreeDecimal
-
ScaleThreeDecimal
public ScaleThreeDecimal(int value) -
ScaleThreeDecimal
public ScaleThreeDecimal(double value) -
ScaleThreeDecimal
-
-
Method Details
-
newInstance
- Specified by:
newInstancein classAbstractDecimal<ScaleThreeDecimal>
-
newInstance
- Specified by:
newInstancein classAbstractDecimal<ScaleThreeDecimal>
-
zero
- Specified by:
zeroin classAbstractDecimal<ScaleThreeDecimal>
-
oneHundred
- Specified by:
oneHundredin classAbstractDecimal<ScaleThreeDecimal>
-