Package com.primavera.common.value
Class Cost
java.lang.Object
java.lang.Number
com.primavera.common.value.PrmNumber
com.primavera.common.value.Cost
- All Implemented Interfaces:
Serializable,Comparable<PrmNumber>
This value type is used to define a cost.
- 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
-
ZERO_COST
Zero value -
MAX_COST
Maximum value -
MIN_COST
Minimum value
-
-
Constructor Details
-
Cost
public Cost(double d) Constructs aCostobject with a given cost value indoubleformat.- Parameters:
d- the cost value
-
Cost
Constructs aCostobject with a given cost value inNumberformat.- Parameters:
n- the cost value
-
-
Method Details
-
compareTo
Compares twoCostobjects.- Specified by:
compareToin interfaceComparable<PrmNumber>- Overrides:
compareToin classPrmNumber- Parameters:
obj- theObjectto be compared.- Returns:
- the value
0if the argument is aCostnumerically equal to thisCost; a value less than0if the argument is aCostnumerically greater than thisCost, or if the argument is not aCost; and a value greater than0if the argument is aCostnumerically less than thisCost.
-
getValue
public double getValue()Gets the cost value represented by this object.- Returns:
- a cost value
-