javax.cim

Class UnsignedInteger8

public class UnsignedInteger8 extends Number implements Serializable, Comparable

The UnsignedInteger8 class wraps the value of an uint8. This class was created to represent an uint8 data type as defined by the CIM Infrastructure Specification. The specification is available from the DMTF (Distributed Management Task Force) at http://dmtf.org/
Field Summary
static shortMAX_VALUE
The maximum possible value for an UnsignedInteger8.
static shortMIN_VALUE
The minimum possible value for an UnsignedInteger8.
Constructor Summary
UnsignedInteger8(short pValue)
Constructs an unsigned 8-bit integer object for the specified short value.
UnsignedInteger8(String pValue)
Constructs an unsigned 8-bit integer object for the specified string.
Method Summary
bytebyteValue()
Returns the value of this unsigned integer object as a byte.
intcompareTo(Object pOther)
Compares this UnsignedInteger8 with the specified UnsignedInteger8.
doubledoubleValue()
doubleValue
booleanequals(Object pObj)
floatfloatValue()
floatValue
intintValue()
intValue
longlongValue()
Returns the value of this unsigned integer object as a long.
shortshortValue()
Returns the value of this unsigned integer object as a short.
StringtoString()

Field Detail

MAX_VALUE

public static final short MAX_VALUE
The maximum possible value for an UnsignedInteger8.

MIN_VALUE

public static final short MIN_VALUE
The minimum possible value for an UnsignedInteger8.

Constructor Detail

UnsignedInteger8

public UnsignedInteger8(short pValue)
Constructs an unsigned 8-bit integer object for the specified short value. Only the lower 8 bits are considered.

Parameters: pValue - the short to be represented as an unsigned 8-bit integer object.

Throws: NumberFormatException - if the number is out of range.

UnsignedInteger8

public UnsignedInteger8(String pValue)
Constructs an unsigned 8-bit integer object for the specified string. Only the lower 8 bits are considered.

Parameters: pValue - the string to be represented as an unsigned 8-bit integer.

Throws: NumberFormatException - if the number is out of range.

Method Detail

byteValue

public byte byteValue()
Returns the value of this unsigned integer object as a byte.

Returns: the byte value of this unsigned integer object

compareTo

public int compareTo(Object pOther)
Compares this UnsignedInteger8 with the specified UnsignedInteger8. 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.

Parameters: pOther - Object to which this UnsignedInteger8 is to be compared. Throws a ClassCastException if the input object is not an UnsignedInteger8.

Returns: -1, 0 or 1 as this UnsignedInteger8 is numerically less than, equal to, or greater than val.

See Also: java.lang.Comparable#compareTo(Object o)

doubleValue

public double doubleValue()
doubleValue

Returns: double

equals

public boolean equals(Object pObj)

See Also: java.lang.Object#equals(java.lang.Object)

floatValue

public float floatValue()
floatValue

Returns: float

intValue

public int intValue()
intValue

Returns: int

longValue

public long longValue()
Returns the value of this unsigned integer object as a long.

Returns: Value of this unsigned integer object as a long.

shortValue

public short shortValue()
Returns the value of this unsigned integer object as a short.

Returns: value of this unsigned integer object as a short

toString

public String toString()

See Also: java.lang.Object#toString()

Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.