org.freedesktop.dbus

Class UInt64

class UInt64 extends Number implements Comparable<UInt64>

Class to represent unsigned 64-bit numbers. Warning: Any functions which take or return a long are restricted to the range of a signed 64bit number. Use the BigInteger methods if you wish access to the full range.
Field Summary
static BigIntegerMAX_BIG_VALUE
Maximum allowed value (when accessed as a BigInteger)
static longMAX_LONG_VALUE
Maximum allowed value (when accessed as a long)
static longMIN_VALUE
Minimum allowed value
Constructor Summary
UInt64(long value)
Create a UInt64 from a long.
UInt64(long top, long bottom)
Create a UInt64 from two longs.
UInt64(BigInteger value)
Create a UInt64 from a BigInteger
UInt64(String value)
Create a UInt64 from a String.
Method Summary
longbottom()
Least significant 4 bytes.
bytebyteValue()
The value of this as a byte.
intcompareTo(UInt64 other)
Compare two UInt32s.
doubledoubleValue()
The value of this as a double.
booleanequals(Object o)
Test two UInt64s 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.
longtop()
Most significant 4 bytes.
StringtoString()
The value of this as a string.
BigIntegervalue()
The value of this as a BigInteger.

Field Detail

MAX_BIG_VALUE

public static final BigInteger MAX_BIG_VALUE
Maximum allowed value (when accessed as a BigInteger)

MAX_LONG_VALUE

public static final long MAX_LONG_VALUE
Maximum allowed value (when accessed as a long)

MIN_VALUE

public static final long MIN_VALUE
Minimum allowed value

Constructor Detail

UInt64

public UInt64(long value)
Create a UInt64 from a long.

Parameters: value Must be a valid integer within MIN_VALUE–MAX_VALUE

Throws: NumberFormatException if value is not between MIN_VALUE and MAX_VALUE

UInt64

public UInt64(long top, long bottom)
Create a UInt64 from two longs.

Parameters: top Most significant 4 bytes. bottom Least significant 4 bytes.

UInt64

public UInt64(BigInteger value)
Create a UInt64 from a BigInteger

Parameters: value Must be a valid BigInteger between MIN_VALUE–MAX_BIG_VALUE

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

UInt64

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

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

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

Method Detail

bottom

public long bottom()
Least significant 4 bytes.

byteValue

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

compareTo

public int compareTo(UInt64 other)
Compare two UInt32s.

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 UInt64s 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.

top

public long top()
Most significant 4 bytes.

toString

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

value

public BigInteger value()
The value of this as a BigInteger.