Top Description Fields Constructors Methods
org.freedesktop.dbus.types

public Class UInt64

extends Number
implements Comparable<UInt64>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Annotations
@SuppressWarnings:serial
Imports
java.math.BigInteger

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

Modifier and TypeField and Description
private final long
private static final String
private static final String
public static final BigInteger
MAX_BIG_VALUE

Maximum allowed value (when accessed as a BigInteger)

public static final long
MAX_LONG_VALUE

Maximum allowed value (when accessed as a long)

public static final long
MIN_VALUE

Minimum allowed value

private final long
private final BigInteger

Constructor Summary

AccessConstructor and Description
public
UInt64(long
Must be a valid integer within MIN_VALUE–MAX_VALUE
_value
)

Create a UInt64 from a long.

public
UInt64(long
Most significant 4 bytes.
_top
,
long
Least significant 4 bytes.
_bottom
)

Create a UInt64 from two longs.

public
UInt64(BigInteger
Must be a valid BigInteger between MIN_VALUE–MAX_BIG_VALUE
_value
)

Create a UInt64 from a BigInteger

public
UInt64(String
Must parse to a valid integer within MIN_VALUE–MAX_BIG_VALUE
_value
)

Create a UInt64 from a String.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

bottom
bottom
()

Least significant 4 bytes.

public byte
byteValue()

Overrides java.lang.Number.byteValue.

The value of this as a byte.

public int

Returns:

0 if equal, -ve or +ve if they are different.
compareTo
(UInt64
other uint64
_other
)

Implements java.lang.Comparable.compareTo.

Compare two UInt32s.

public double
doubleValue()

Implements abstract java.lang.Number.doubleValue.

The value of this as a double.

public boolean
equals(Object
the reference object with which to compare.
_o
)

Overrides java.lang.Object.equals.

Test two UInt64s for equality.

public float
floatValue()

Implements abstract java.lang.Number.floatValue.

The value of this as a float.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public int
intValue()

Implements abstract java.lang.Number.intValue.

The value of this as a int.

public long
longValue()

Implements abstract java.lang.Number.longValue.

The value of this as a long.

public short
shortValue()

Overrides java.lang.Number.shortValue.

The value of this as a short.

public long

Returns:

top
top
()

Most significant 4 bytes.

public String

Returns:

string
toString
()

Overrides java.lang.Object.toString.

The value of this as a string.

public BigInteger

Returns:

value
value
()

The value of this as a BigInteger.

Field Detail

bottomback to summary
private final long bottom
BOUNDSback to summary
private static final String BOUNDS
ERROR_MSGback to summary
private static final String ERROR_MSG
MAX_BIG_VALUEback to summary
public static final BigInteger MAX_BIG_VALUE

Maximum allowed value (when accessed as a BigInteger)

MAX_LONG_VALUEback to summary
public static final long MAX_LONG_VALUE

Maximum allowed value (when accessed as a long)

MIN_VALUEback to summary
public static final long MIN_VALUE

Minimum allowed value

topback to summary
private final long top
valueback to summary
private final BigInteger value

Constructor Detail

UInt64back to summary
public UInt64(long _value)

Create a UInt64 from a long.

Parameters
_value:long

Must be a valid integer within MIN_VALUE–MAX_VALUE

Exceptions
NumberFormatException:
if value is not between MIN_VALUE and MAX_VALUE
UInt64back to summary
public UInt64(long _top, long _bottom)

Create a UInt64 from two longs.

Parameters
_top:long

Most significant 4 bytes.

_bottom:long

Least significant 4 bytes.

UInt64back to summary
public UInt64(BigInteger _value)

Create a UInt64 from a BigInteger

Parameters
_value:BigInteger

Must be a valid BigInteger between MIN_VALUE–MAX_BIG_VALUE

Exceptions
NumberFormatException:
if value is not an integer between MIN_VALUE and MAX_BIG_VALUE
UInt64back to summary
public UInt64(String _value)

Create a UInt64 from a String.

Parameters
_value:String

Must parse to a valid integer within MIN_VALUE–MAX_BIG_VALUE

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

Method Detail

bottomback to summary
public long bottom()

Least significant 4 bytes.

Returns:long

bottom

byteValueback to summary
public byte byteValue()

Overrides java.lang.Number.byteValue.

The value of this as a byte.

Returns:byte

Doc from java.lang.Number.byteValue.

the numeric value represented by this object after conversion to type byte.

Annotations
@Override
compareToback to summary
public int compareTo(UInt64 _other)

Implements java.lang.Comparable.compareTo.

Compare two UInt32s.

Parameters
_other:UInt64

other uint64

Returns:int

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

Annotations
@Override
doubleValueback to summary
public double doubleValue()

Implements abstract java.lang.Number.doubleValue.

The value of this as a double.

Returns:double

Doc from java.lang.Number.doubleValue.

the numeric value represented by this object after conversion to type double.

Annotations
@Override
equalsback to summary
public boolean equals(Object _o)

Overrides java.lang.Object.equals.

Test two UInt64s for equality.

Parameters
_o:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
floatValueback to summary
public float floatValue()

Implements abstract java.lang.Number.floatValue.

The value of this as a float.

Returns:float

Doc from java.lang.Number.floatValue.

the numeric value represented by this object after conversion to type float.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
intValueback to summary
public int intValue()

Implements abstract java.lang.Number.intValue.

The value of this as a int.

Returns:int

Doc from java.lang.Number.intValue.

the numeric value represented by this object after conversion to type int.

Annotations
@Override
longValueback to summary
public long longValue()

Implements abstract java.lang.Number.longValue.

The value of this as a long.

Returns:long

Doc from java.lang.Number.longValue.

the numeric value represented by this object after conversion to type long.

Annotations
@Override
shortValueback to summary
public short shortValue()

Overrides java.lang.Number.shortValue.

The value of this as a short.

Returns:short

Doc from java.lang.Number.shortValue.

the numeric value represented by this object after conversion to type short.

Annotations
@Override
topback to summary
public long top()

Most significant 4 bytes.

Returns:long

top

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

The value of this as a string.

Returns:String

string

Annotations
@Override
valueback to summary
public BigInteger value()

The value of this as a BigInteger.

Returns:BigInteger

value