Package org.freedesktop.dbus
Class UInt32
java.lang.Object
java.lang.Number
org.freedesktop.dbus.UInt32
- All Implemented Interfaces:
Serializable
,Comparable<UInt32>
Class to represent unsigned 32-bit numbers.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte
The value of this as a byte.int
Compare two UInt32s.double
The value of this as a double.boolean
Test two UInt32s for equality.float
The value of this as a float.int
hashCode()
int
intValue()
The value of this as a int.long
The value of this as a long.short
The value of this as a short.toString()
The value of this as a string
-
Field Details
-
MAX_VALUE
public static final long MAX_VALUEMaximum allowed value- See Also:
-
MIN_VALUE
public static final long MIN_VALUEMinimum allowed value- See Also:
-
-
Constructor Details
-
UInt32
public UInt32(long value) Create a UInt32 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
-
UInt32
Create a UInt32 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 Details
-
byteValue
public byte byteValue()The value of this as a byte. -
doubleValue
public double doubleValue()The value of this as a double.- Specified by:
doubleValue
in classNumber
-
floatValue
public float floatValue()The value of this as a float.- Specified by:
floatValue
in classNumber
-
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.- Overrides:
shortValue
in classNumber
-
equals
Test two UInt32s for equality. -
hashCode
public int hashCode() -
compareTo
Compare two UInt32s.- Specified by:
compareTo
in interfaceComparable<UInt32>
- Returns:
- 0 if equal, -ve or +ve if they are different.
-
toString
The value of this as a string
-