Primavera Integration API 7.0

com.primavera.common.value
Class Cost

java.lang.Object
  extended by java.lang.Number
      extended by com.primavera.common.value.PrmNumber
          extended by com.primavera.common.value.Cost
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PrmNumber>

public class Cost
extends PrmNumber

This value type is used to define a cost.

See Also:
Serialized Form

Field Summary
static Cost MAX_COST
          Maximum value
static Cost MIN_COST
          Minimum value
static Cost ZERO_COST
          Zero value
 
Constructor Summary
Cost(double d)
          Constructs a Cost object with a given cost value in double format.
Cost(java.lang.Number n)
          Constructs a Cost object with a given cost value in Number format.
 
Method Summary
 int compareTo(PrmNumber obj)
          Compares two Cost objects.
 double getValue()
          Gets the cost value represented by this object.
 
Methods inherited from class com.primavera.common.value.PrmNumber
byteValue, compareTo, doubleValue, equals, floatValue, hashCode, intValue, longValue, setDoubleValue, shortValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO_COST

public static final Cost ZERO_COST
Zero value


MAX_COST

public static final Cost MAX_COST
Maximum value


MIN_COST

public static final Cost MIN_COST
Minimum value

Constructor Detail

Cost

public Cost(double d)
Constructs a Cost object with a given cost value in double format.

Parameters:
d - the cost value

Cost

public Cost(java.lang.Number n)
Constructs a Cost object with a given cost value in Number format.

Parameters:
n - the cost value
Method Detail

compareTo

public int compareTo(PrmNumber obj)
Compares two Cost objects.

Specified by:
compareTo in interface java.lang.Comparable<PrmNumber>
Overrides:
compareTo in class PrmNumber
Parameters:
obj - the Object to be compared.
Returns:
the value 0 if the argument is a Cost numerically equal to this Cost; a value less than 0 if the argument is a Cost numerically greater than this Cost, or if the argument is not a Cost; and a value greater than 0 if the argument is a Cost numerically less than this Cost.

getValue

public double getValue()
Gets the cost value represented by this object.

Returns:
a cost value

Primavera Integration API 7.0

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.