org.freedesktop.dbus

Class UInt16

class UInt16 extends Number implements Comparable<UInt16>

Class to represent 16-bit unsigned integers.
Field Summary
static intMAX_VALUE
Maximum possible value.
static intMIN_VALUE
Minimum possible value.
Constructor Summary
UInt16(int value)
Create a UInt16 from an int.
UInt16(String value)
Create a UInt16 from a String.
Method Summary
bytebyteValue()
The value of this as a byte.
intcompareTo(UInt16 other)
Compare two UInt16s.
doubledoubleValue()
The value of this as a double.
booleanequals(Object o)
Test two UInt16s for equality.
floatfloatValue()
The value of this as a float.
inthashCode()
intintValue()
The value of this as a int.
longlongValue()
The value of this as a long.
shortshortValue()
The value of this as a short.
StringtoString()
The value of this as a string.

Field Detail

MAX_VALUE

public static final int MAX_VALUE
Maximum possible value.

MIN_VALUE

public static final int MIN_VALUE
Minimum possible value.

Constructor Detail

UInt16

public UInt16(int value)
Create a UInt16 from an int.

Parameters: value Must be within MIN_VALUE–MAX_VALUE

Throws: NumberFormatException if value is not between MIN_VALUE and MAX_VALUE

UInt16

public UInt16(String value)
Create a UInt16 from a String.

Parameters: value Must parse to a valid integer within MIN_VALUE–MAX_VALUE

Throws: NumberFormatException if value is not an integer between MIN_VALUE and MAX_VALUE

Method Detail

byteValue

public byte byteValue()
The value of this as a byte.

compareTo

public int compareTo(UInt16 other)
Compare two UInt16s.

Returns: 0 if equal, -ve or +ve if they are different.

doubleValue

public double doubleValue()
The value of this as a double.

equals

public boolean equals(Object o)
Test two UInt16s for equality.

floatValue

public float floatValue()
The value of this as a float.

hashCode

public int hashCode()

intValue

public int intValue()
The value of this as a int.

longValue

public long longValue()
The value of this as a long.

shortValue

public short shortValue()
The value of this as a short.

toString

public String toString()
The value of this as a string.