java.lang.Object
java.lang.Number
org.joou.UNumber
org.joou.ULong
- All Implemented Interfaces:
Serializable
,Comparable<ULong>
The
unsigned long
type- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ULong
A constant holding the maximum value + 1 ansigned long
can have as ULong, 263.static final BigInteger
A constant holding the maximum value anunsigned long
can have, 264-1.static final BigInteger
A constant holding the maximum value + 1 ansigned long
can have, 263.static final ULong
A constant holding the minimum value anunsigned long
can have as ULong, 0.static final BigInteger
A constant holding the minimum value anunsigned long
can have, 0.private static final long
Generated UIDprivate final long
The value modelling the content of thisunsigned long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ULong
(long value) Create anunsigned long
by masking it with0xFFFFFFFFFFFFFFFF
i.e.private
Create anunsigned long
private
ULong
(BigInteger value) Create anunsigned long
-
Method Summary
Modifier and TypeMethodDescriptionadd
(int val) add
(long val) static int
compare
(long x, long y) int
double
boolean
float
int
hashCode()
int
intValue()
long
subtract
(int val) subtract
(long val) toString()
static ULong
valueOf
(long value) Create anunsigned long
by masking it with0xFFFFFFFFFFFFFFFF
i.e.static ULong
Create anunsigned long
static ULong
valueOf
(BigInteger value) Create anunsigned long
Methods inherited from class org.joou.UNumber
toBigInteger
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDGenerated UID- See Also:
-
MIN_VALUE
A constant holding the minimum value anunsigned long
can have, 0. -
MAX_VALUE
A constant holding the maximum value anunsigned long
can have, 264-1. -
MAX_VALUE_LONG
A constant holding the maximum value + 1 ansigned long
can have, 263. -
MIN
A constant holding the minimum value anunsigned long
can have as ULong, 0. -
MAX
A constant holding the maximum value + 1 ansigned long
can have as ULong, 263. -
value
private final long valueThe value modelling the content of thisunsigned long
-
-
Constructor Details
-
ULong
Create anunsigned long
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned long
-
ULong
private ULong(long value) Create anunsigned long
by masking it with0xFFFFFFFFFFFFFFFF
i.e.(long) -1
becomes(uint) 18446744073709551615
-
ULong
Create anunsigned long
- Throws:
NumberFormatException
- Ifvalue
does not contain a parsableunsigned long
.
-
-
Method Details
-
valueOf
Create anunsigned long
- Throws:
NumberFormatException
- Ifvalue
does not contain a parsableunsigned long
.
-
valueOf
Create anunsigned long
by masking it with0xFFFFFFFFFFFFFFFF
i.e.(long) -1
becomes(uint) 18446744073709551615
-
valueOf
Create anunsigned long
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned long
-
compare
public static int compare(long x, long y) -
intValue
public int intValue() -
longValue
public long longValue() -
floatValue
public float floatValue()- Specified by:
floatValue
in classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in classNumber
-
hashCode
public int hashCode() -
equals
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ULong>
-
add
- Throws:
NumberFormatException
-
add
- Throws:
NumberFormatException
-
add
- Throws:
NumberFormatException
-
subtract
-
subtract
-
subtract
-