Package org.freedesktop.dbus.types
Class UInt32
- java.lang.Object
-
- java.lang.Number
-
- org.freedesktop.dbus.types.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 bytebyteValue()The value of this as a byte.intcompareTo(UInt32 _other)Compare two UInt32s.doubledoubleValue()The value of this as a double.booleanequals(java.lang.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.java.lang.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
-
value
private final long value
-
-
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:
byteValuein classjava.lang.Number
-
doubleValue
public double doubleValue()
The value of this as a double.- Specified by:
doubleValuein classjava.lang.Number
-
floatValue
public float floatValue()
The value of this as a float.- Specified by:
floatValuein classjava.lang.Number
-
intValue
public int intValue()
The value of this as a int.- Specified by:
intValuein classjava.lang.Number
-
longValue
public long longValue()
The value of this as a long.- Specified by:
longValuein classjava.lang.Number
-
shortValue
public short shortValue()
The value of this as a short.- Overrides:
shortValuein classjava.lang.Number
-
equals
public boolean equals(java.lang.Object _o)
Test two UInt32s for equality.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(UInt32 _other)
Compare two UInt32s.- Specified by:
compareToin 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:
toStringin classjava.lang.Object
-
-