public final class ULong extends UNumber implements Comparable<ULong>
unsigned long
typeModifier and Type | Field and Description |
---|---|
static ULong |
MAX
A constant holding the maximum value + 1 an
signed long can
have as ULong, 263. |
static BigInteger |
MAX_VALUE
A constant holding the maximum value an
unsigned long can
have, 264-1. |
static BigInteger |
MAX_VALUE_LONG
A constant holding the maximum value + 1 an
signed long can
have, 263. |
static ULong |
MIN
A constant holding the minimum value an
unsigned long can
have as ULong, 0. |
static BigInteger |
MIN_VALUE
A constant holding the minimum value an
unsigned long can
have, 0. |
Modifier and Type | Method and Description |
---|---|
ULong |
add(int val) |
ULong |
add(long val) |
ULong |
add(ULong val) |
static int |
compare(long x,
long y) |
int |
compareTo(ULong o) |
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
ULong |
subtract(int val) |
ULong |
subtract(long val) |
ULong |
subtract(ULong val) |
String |
toString() |
static ULong |
valueOf(BigInteger value)
Create an
unsigned long |
static ULong |
valueOf(long value)
Create an
unsigned long by masking it with
0xFFFFFFFFFFFFFFFF i.e. |
static ULong |
valueOf(String value)
Create an
unsigned long |
toBigInteger
byteValue, shortValue
public static final BigInteger MIN_VALUE
unsigned long
can
have, 0.public static final BigInteger MAX_VALUE
unsigned long
can
have, 264-1.public static final BigInteger MAX_VALUE_LONG
signed long
can
have, 263.public static final ULong MIN
unsigned long
can
have as ULong, 0.public static final ULong MAX
signed long
can
have as ULong, 263.public static ULong valueOf(String value) throws NumberFormatException
unsigned long
NumberFormatException
- If value
does not contain a
parsable unsigned long
.public static ULong valueOf(long value)
unsigned long
by masking it with
0xFFFFFFFFFFFFFFFF
i.e. (long) -1
becomes
(uint) 18446744073709551615
public static ULong valueOf(BigInteger value) throws NumberFormatException
unsigned long
NumberFormatException
- If value
is not in the range
of an unsigned long
public static int compare(long x, long y)
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
public int compareTo(ULong o)
compareTo
in interface Comparable<ULong>
public ULong add(ULong val) throws NumberFormatException
NumberFormatException
public ULong add(int val) throws NumberFormatException
NumberFormatException
public ULong add(long val) throws NumberFormatException
NumberFormatException
public ULong subtract(int val)
public ULong subtract(long val)
Copyright © 2019. All rights reserved.