Package org.freedesktop.dbus
Class UInt32
- java.lang.Object
-
- java.lang.Number
-
- org.freedesktop.dbus.UInt32
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<UInt32>
public class UInt32 extends java.lang.Number implements java.lang.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 byte
byteValue()
The value of this as a byte.int
compareTo(UInt32 other)
Compare two UInt32s.double
doubleValue()
The value of this as a double.boolean
equals(java.lang.Object o)
Test two UInt32s for equality.float
floatValue()
The value of this as a float.int
hashCode()
int
intValue()
The value of this as a int.long
longValue()
The value of this as a long.short
shortValue()
The value of this as a short.java.lang.String
toString()
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:
java.lang.NumberFormatException
- if value is not between MIN_VALUE and MAX_VALUE
-
UInt32
public UInt32(java.lang.String value)
Create a UInt32 from a String.- Parameters:
value
- Must parse to a valid integer within MIN_VALUE–MAX_VALUE- Throws:
java.lang.NumberFormatException
- if value is not an integer between MIN_VALUE and MAX_VALUE
-
-
Method Detail
-
byteValue
public byte byteValue()
The value of this as a byte.- Overrides:
byteValue
in classjava.lang.Number
-
doubleValue
public double doubleValue()
The value of this as a double.- Specified by:
doubleValue
in classjava.lang.Number
-
floatValue
public float floatValue()
The value of this as a float.- Specified by:
floatValue
in classjava.lang.Number
-
intValue
public int intValue()
The value of this as a int.- Specified by:
intValue
in classjava.lang.Number
-
longValue
public long longValue()
The value of this as a long.- Specified by:
longValue
in classjava.lang.Number
-
shortValue
public short shortValue()
The value of this as a short.- Overrides:
shortValue
in classjava.lang.Number
-
equals
public boolean equals(java.lang.Object o)
Test two UInt32s for equality.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(UInt32 other)
Compare two UInt32s.- Specified by:
compareTo
in interfacejava.lang.Comparable<UInt32>
- Returns:
- 0 if equal, -ve or +ve if they are different.
-
toString
public java.lang.String toString()
The value of this as a string- Overrides:
toString
in classjava.lang.Object
-
-