Package org.freedesktop.dbus.types
Class UInt32
- java.lang.Object
-
- java.lang.Number
-
- org.freedesktop.dbus.types.UInt32
-
- All Implemented Interfaces:
Serializable,Comparable<UInt32>
public class UInt32 extends Number implements Comparable<UInt32>
Class to represent unsigned 32-bit numbers.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytebyteValue()The value of this as a byte.intcompareTo(UInt32 other)Compare two UInt32s.doubledoubleValue()The value of this as a double.booleanequals(Object o)Test two UInt32s 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 long MAX_VALUE
Maximum allowed value- See Also:
- Constant Field Values
-
MIN_VALUE
public static final long MIN_VALUE
Minimum allowed value- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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
public UInt32(String _value)
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 Detail
-
doubleValue
public double doubleValue()
The value of this as a double.- Specified by:
doubleValuein classNumber
-
floatValue
public float floatValue()
The value of this as a float.- Specified by:
floatValuein classNumber
-
longValue
public long longValue()
The value of this as a long.
-
shortValue
public short shortValue()
The value of this as a short.- Overrides:
shortValuein classNumber
-
equals
public boolean equals(Object o)
Test two UInt32s for equality.
-
compareTo
public int compareTo(UInt32 other)
Compare two UInt32s.- Specified by:
compareToin interfaceComparable<UInt32>- Returns:
- 0 if equal, -ve or +ve if they are different.
-
-