Package com.primavera.common.value
Class Unit
java.lang.Object
java.lang.Number
com.primavera.common.value.PrmNumber
com.primavera.common.value.Unit
- All Implemented Interfaces:
Serializable,Comparable<PrmNumber>
This value type is used to define a unit.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.primavera.common.value.PrmNumber
byteValue, compareTo, doubleValue, equals, floatValue, hashCode, intValue, longValue, setDoubleValue, shortValue, toString
-
Field Details
-
MIN_UNIT
Minimum value -
ZERO_UNIT
Zero value -
MAX_UNIT
Maximum value
-
-
Constructor Details
-
Unit
public Unit(double d) Constructs aUnitobject with a given unit value indoubleformat.- Parameters:
d- the unit value
-
Unit
Constructs aUnitobject with a given unit value inNumberformat.- Parameters:
n- the unit value
-
-
Method Details
-
compareTo
Compares twoUnitobjects.- Specified by:
compareToin interfaceComparable<PrmNumber>- Overrides:
compareToin classPrmNumber- Parameters:
obj- theObjectto be compared.- Returns:
- the value
0if the argument is aUnitnumerically equal to thisUnit; a value less than0if the argument is aUnitnumerically greater than thisUnit, or if the argument is not aUnit; and a value greater than0if the argument is aUnitnumerically less than thisUnit.
-