javax.cim
public class UnsignedInteger16 extends Number implements Comparable<UnsignedInteger16>
UnsignedInteger16
class wraps the value of an uint16. This
class was created to represent an uint16 data type as defined by the CIM
Infrastructure Specification. The specification is available from the DMTF
(Distributed Management Task Force) at http://dmtf.org/Modifier and Type | Field and Description |
---|---|
static int |
MAX_VALUE
The maximum value for an UnsignedInteger16.
|
static int |
MIN_VALUE
The minimum value for an UnsignedInteger16.
|
Constructor and Description |
---|
UnsignedInteger16(int pValue)
Constructs an unsigned 16-bit integer object for the specified int value.
|
UnsignedInteger16(String pValue)
Constructs an unsigned 16-bit integer object for the specified string.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Returns the value of this unsigned integer object as a byte.
|
int |
compareTo(UnsignedInteger16 pOther)
Compares this
UnsignedInteger16 with the specified
UnsignedInteger16 . |
double |
doubleValue() |
boolean |
equals(Object pObj) |
float |
floatValue() |
int |
intValue() |
long |
longValue()
Returns the value of this unsigned integer object as a
long . |
short |
shortValue()
Returns the value of this unsigned integer object as a short.
|
String |
toString() |
public static final int MAX_VALUE
public static final int MIN_VALUE
public UnsignedInteger16(int pValue) throws NumberFormatException
pValue
- - the integer to be represented as an unsigned 16-bit integer.NumberFormatException
- - if the number is out of range.public UnsignedInteger16(String pValue) throws NumberFormatException
pValue
- - the string to be represented as an unsigned 16-bit integer.NumberFormatException
- - if the number is out of range.public boolean equals(Object pObj)
equals
in class Object
Object.equals(java.lang.Object)
public byte byteValue()
public short shortValue()
shortValue
in class Number
public long longValue()
long
.public double doubleValue()
doubleValue
in class Number
Number.doubleValue()
public float floatValue()
floatValue
in class Number
Number.floatValue()
public int intValue()
intValue
in class Number
Number.intValue()
public int compareTo(UnsignedInteger16 pOther)
UnsignedInteger16
with the specified
UnsignedInteger16
. 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.compareTo
in interface Comparable<UnsignedInteger16>
pOther
- - Object to which this UnsignedInteger16
is to be
compared. Throws a ClassCastException
if the
input object is not an UnsignedInteger16
.UnsignedInteger16
is numerically
less than, equal to, or greater than val.Comparable.compareTo(Object o)
public String toString()
toString
in class Object
Object.toString()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.