Primavera Integration API 7.0

com.primavera.common.value
Class PrmNumber

java.lang.Object
  extended by java.lang.Number
      extended by com.primavera.common.value.PrmNumber
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PrmNumber>
Direct Known Subclasses:
Cost, Duration, Percent, Unit, UnitsPerTime

public class PrmNumber
extends java.lang.Number
implements java.lang.Comparable<PrmNumber>

This value type is used to define a Number object. It is a wrapper class of Number.

See Also:
Serialized Form

Method Summary
 byte byteValue()
          Returns the value of the specified number as a byte.
 int compareTo(double value)
          Compare this PrmNumber object to a double.
 int compareTo(PrmNumber obj)
          Compare two PrmNumber objects.
 double doubleValue()
          Returns the value of the specified number as a double.
 boolean equals(java.lang.Object obj)
          Compares this PrmNumber to the specified object.
 float floatValue()
          Returns the value of the specified number as a float.
 int hashCode()
          Returns a hash code for this object.
 int intValue()
          Returns the value of the specified number as an int.
 long longValue()
          Returns the value of the specified number as a long.
 void setDoubleValue(double v)
          Set the value of this object with a given value.
 short shortValue()
          Returns the value of the specified number as a short.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object

doubleValue

public double doubleValue()
Returns the value of the specified number as a double. This may involve rounding.

Specified by:
doubleValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type double.

hashCode

public int hashCode()
Returns a hash code for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code

floatValue

public float floatValue()
Returns the value of the specified number as a float. This may involve rounding.

Specified by:
floatValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type float.

longValue

public long longValue()
Returns the value of the specified number as a long. This may involve rounding or truncation.

Specified by:
longValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type long.

intValue

public int intValue()
Returns the value of the specified number as an int. This may involve rounding or truncation.

Specified by:
intValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type int.

shortValue

public short shortValue()
Returns the value of the specified number as a short. This may involve rounding or truncation.

Overrides:
shortValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type short.

byteValue

public byte byteValue()
Returns the value of the specified number as a byte. This may involve rounding or truncation.

Overrides:
byteValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type byte.

compareTo

public int compareTo(PrmNumber obj)
Compare two PrmNumber objects.

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

compareTo

public int compareTo(double value)
Compare this PrmNumber object to a double.

Parameters:
value - the double to be compared.
Returns:
the value 0 if the argument is numerically equal to the value presented by this PrmNumber; a value less than 0 if the argument is numerically greater than the value presented by this PrmNumber; and a value greater than 0 if the argument is numerically less than the value presented by this PrmNumber.

equals

public boolean equals(java.lang.Object obj)
Compares this PrmNumber to the specified object. The result is true if compareTo(obj) is 0

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this PrmNumber against.
Returns:
true if the PrmNumber are equal; false otherwise.

setDoubleValue

public void setDoubleValue(double v)
Set the value of this object with a given value.

Parameters:
v - the value.

Primavera Integration API 7.0

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