javax.wbem.cim
Class UnsignedInt64

java.lang.Object
  |
  +--java.lang.Number
        |
        +--javax.wbem.cim.UnsignedInt64
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class UnsignedInt64
extends java.lang.Number
implements java.io.Serializable, java.lang.Comparable

Creates and instantiates an unsigned 64-bit integer object. The CIMDataType class uses this class to instantiate valid CIM data types.

Since:
WBEM 1.0

Field Summary
static java.math.BigInteger MAX_VALUE
          the maximum value this BigInteger can have
static java.math.BigInteger MIN_VALUE
          the minimum value this BigInteger can have
 
Constructor Summary
UnsignedInt64(java.math.BigInteger input)
          Constructor creates an unsigned 64-bit integer object for the specified BigInteger.
UnsignedInt64(byte[] bval)
          Constructor creates an unsigned 64-bit integer object for the specified array of bytes.
UnsignedInt64(java.lang.String sval)
          Constructor creates an unsigned 64-bit integer object for the specified string.
 
Method Summary
 java.math.BigInteger bigIntValue()
           
 int compareTo(java.lang.Object val)
          Compares this UnsignedInt64 with the specified UnsignedInt64.
 double doubleValue()
          Returns the value of the specified number as a double.
 boolean equals(java.lang.Object o)
          Compares this unsigned 64-bit integer object with the specified object for equality
 float floatValue()
          Returns the value of the specified number as a float.
 int hashCode()
          Returns the hash code for this UnsignedInt64.
 int intValue()
          Returns the value of the specified number as an int.
 long longValue()
          Returns the value of the specified number as a long.
 java.lang.String toString()
          Returns the text representation of this unsigned 64-bit integer object
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_VALUE

public static final java.math.BigInteger MAX_VALUE
the maximum value this BigInteger can have


MIN_VALUE

public static final java.math.BigInteger MIN_VALUE
the minimum value this BigInteger can have

Constructor Detail

UnsignedInt64

public UnsignedInt64(java.lang.String sval)
              throws java.lang.NumberFormatException
Constructor creates an unsigned 64-bit integer object for the specified string. Only the bottom 64 bits are considered.


UnsignedInt64

public UnsignedInt64(byte[] bval)
              throws java.lang.NumberFormatException
Constructor creates an unsigned 64-bit integer object for the specified array of bytes. Only the bottom 64 bits are considered.


UnsignedInt64

public UnsignedInt64(java.math.BigInteger input)
Constructor creates an unsigned 64-bit integer object for the specified BigInteger. Only the bottom 64 bits are considered.

Method Detail

equals

public boolean equals(java.lang.Object o)
Compares this unsigned 64-bit integer object with the specified object for equality

Overrides:
equals in class java.lang.Object
Returns:
boolean true if the specified object is an unsigned 64-bit integer object. Otherwise, false.

bigIntValue

public java.math.BigInteger bigIntValue()

intValue

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

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

longValue

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

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

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.

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.

compareTo

public int compareTo(java.lang.Object val)
Compares this UnsignedInt64 with the specified UnsignedInt64. This method is provided in preference to individual methods for each of the six boolean comparison operators (<, ==, >, >=, !=, <=). The suggested idiom for performing these comparisons is: (x.compareTo(y) <op> 0), where <op> is one of the six comparison operators.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
val - Object to which this UnsignedInt64 is to be compared. Throws a ClassCastException if the input object is not an UnsignedInt64.
Returns:
-1, 0 or 1 as this UnsignedInt64 is numerically less than, equal to, or greater than val.

toString

public java.lang.String toString()
Returns the text representation of this unsigned 64-bit integer object

Overrides:
toString in class java.lang.Object
Returns:
String text representation of this unsigned 64-bit integer

hashCode

public int hashCode()
Returns the hash code for this UnsignedInt64.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code for this UnsignedInt64.