Class UInt
java.lang.Object
java.lang.Number
com.thanlinardos.spring_enterprise_library.math.UInt
- All Implemented Interfaces:
Serializable
Class representing an unsigned integer (UInt) with a range from 0 to 4294967295.
This class extends the Number class and provides methods to retrieve the value
in different numeric formats.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
MIN_VALUE
public static final long MIN_VALUEThe minimum and maximum values for an unsigned integer- See Also:
-
MAX_VALUE
public static final long MAX_VALUEThe maximum value for an unsigned integer (2^32 - 1)- See Also:
-
-
Constructor Details
-
UInt
public UInt(long value) Constructs a UInt with the specified value.- Parameters:
value- the unsigned integer value (must be between 0 and 4294967295)- Throws:
IllegalArgumentException- if the value is out of range
-
-
Method Details
-
intValue
-
longValue
-
floatValue
public float floatValue()Returns the value of this UInt as a float.- Specified by:
floatValuein classNumber- Returns:
- the float value.
-
doubleValue
public double doubleValue()Returns the value of this UInt as a double.- Specified by:
doubleValuein classNumber- Returns:
- the double value.
-
toString
-