Primavera Integration API 7.0

com.primavera.common.value
Class Unit

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

public class Unit
extends PrmNumber

This value type is used to define a unit.

See Also:
Serialized Form

Field Summary
static Unit MAX_UNIT
          Maximum value
static Unit ZERO_UNIT
          Zero value
 
Constructor Summary
Unit(double d)
          Constructs a Unit object with a given unit value in double format.
Unit(java.lang.Number n)
          Constructs a Unit object with a given unit value in Number format.
 
Method Summary
 int compareTo(PrmNumber obj)
          Compares two Unit objects.
 
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_UNIT

public static final Unit ZERO_UNIT
Zero value


MAX_UNIT

public static final Unit MAX_UNIT
Maximum value

Constructor Detail

Unit

public Unit(double d)
Constructs a Unit object with a given unit value in double format.

Parameters:
d - the unit value

Unit

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

Parameters:
n - the unit value
Method Detail

compareTo

public int compareTo(PrmNumber obj)
Compares two Unit 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 Unit numerically equal to this Unit; a value less than 0 if the argument is a Unit numerically greater than this Unit, or if the argument is not a Unit; and a value greater than 0 if the argument is a Unit numerically less than this Unit.

Primavera Integration API 7.0

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