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

public Class UInt32

extends Number
implements Comparable<UInt32>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Annotations
@SuppressWarnings:serial

Class to represent unsigned 32-bit numbers.

Field Summary

Modifier and TypeField and Description
public static final long
MAX_VALUE

Maximum allowed value

public static final long
MIN_VALUE

Minimum allowed value

private final long

Constructor Summary

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

Create a UInt32 from a long.

public
UInt32(String
Must parse to a valid integer within MIN_VALUE–MAX_VALUE
_value
)

Create a UInt32 from a String.

Method Summary

Modifier and TypeMethod and Description
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
(UInt32
the object to be compared.
_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 UInt32s 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 String
toString()

Overrides java.lang.Object.toString.

The value of this as a string

Field Detail

MAX_VALUEback to summary
public static final long MAX_VALUE

Maximum allowed value

MIN_VALUEback to summary
public static final long MIN_VALUE

Minimum allowed value

valueback to summary
private final long value

Constructor Detail

UInt32back to summary
public UInt32(long _value)

Create a UInt32 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
UInt32back to summary
public UInt32(String _value)

Create a UInt32 from a String.

Parameters
_value:String

Must parse to a valid integer within MIN_VALUE–MAX_VALUE

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

Method Detail

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(UInt32 _other)

Implements java.lang.Comparable.compareTo.

Compare two UInt32s.

Parameters
_other:UInt32

Doc from java.lang.Comparable.compareTo.

the object to be compared.

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 UInt32s 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
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

The value of this as a string

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override