Class ULong
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 ULongA constant holding the maximum value + 1 ansigned longcan have as ULong, 263.static final BigIntegerA constant holding the maximum value anunsigned longcan have, 264-1.static final BigIntegerA constant holding the maximum value + 1 ansigned longcan have, 263.static final ULongA constant holding the minimum value anunsigned longcan have as ULong, 0.static final BigIntegerA constant holding the minimum value anunsigned longcan have, 0.private static final longGenerated UIDprivate final longThe value modelling the content of thisunsigned long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateULong(long value) Create anunsigned longby masking it with0xFFFFFFFFFFFFFFFFi.e.privateCreate anunsigned longprivateULong(BigInteger value) Create anunsigned long -
Method Summary
Modifier and TypeMethodDescriptionadd(int val) add(long val) static intcompare(long x, long y) intdoublebooleanfloatinthashCode()intintValue()longsubtract(int val) subtract(long val) toString()static ULongvalueOf(long value) Create anunsigned longby masking it with0xFFFFFFFFFFFFFFFFi.e.static ULongCreate anunsigned longstatic ULongvalueOf(BigInteger value) Create anunsigned longMethods inherited from class UNumber
toBigIntegerMethods inherited from class Number
byteValue, shortValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDGenerated UID- See Also:
-
MIN_VALUE
A constant holding the minimum value anunsigned longcan have, 0. -
MAX_VALUE
A constant holding the maximum value anunsigned longcan have, 264-1. -
MAX_VALUE_LONG
A constant holding the maximum value + 1 ansigned longcan have, 263. -
MIN
A constant holding the minimum value anunsigned longcan have as ULong, 0. -
MAX
A constant holding the maximum value + 1 ansigned longcan have as ULong, 263. -
value
private final long valueThe value modelling the content of thisunsigned long
-
-
Constructor Details
-
ULong
Create anunsigned long- Throws:
NumberFormatException- Ifvalueis not in the range of anunsigned long
-
ULong
private ULong(long value) Create anunsigned longby masking it with0xFFFFFFFFFFFFFFFFi.e.(long) -1becomes(uint) 18446744073709551615 -
ULong
Create anunsigned long- Throws:
NumberFormatException- Ifvaluedoes not contain a parsableunsigned long.
-
-
Method Details
-
valueOf
Create anunsigned long- Throws:
NumberFormatException- Ifvaluedoes not contain a parsableunsigned long.
-
valueOf
Create anunsigned longby masking it with0xFFFFFFFFFFFFFFFFi.e.(long) -1becomes(uint) 18446744073709551615 -
valueOf
Create anunsigned long- Throws:
NumberFormatException- Ifvalueis not in the range of anunsigned long
-
compare
public static int compare(long x, long y) -
intValue
-
longValue
-
floatValue
public float floatValue()- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classNumber
-
hashCode
-
equals
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<ULong>
-
add
- Throws:
NumberFormatException
-
add
- Throws:
NumberFormatException
-
add
- Throws:
NumberFormatException
-
subtract
-
subtract
-
subtract
-