public final class UnsignedLongs
extends java.lang.Object
Similar methods are now available in Java 8, but are required here for Java 6/7 compatibility.
This class is not part of the public API and may be removed or changed at any time.
Modifier and Type | Field and Description |
---|---|
private static int[] |
MAX_SAFE_DIGITS |
private static long |
MAX_VALUE |
private static long[] |
MAX_VALUE_DIVS |
private static int[] |
MAX_VALUE_MODS |
Modifier | Constructor and Description |
---|---|
private |
UnsignedLongs() |
Modifier and Type | Method and Description |
---|---|
static int |
compare(long first,
long second)
Equivalent of Long.compareUnsigned in Java 8.
|
private static int |
compareLongs(long x,
long y) |
private static long |
divide(long dividend,
long divisor) |
private static boolean |
overflowInParse(long current,
int digit,
int radix) |
static long |
parse(java.lang.String string)
Equivalent to Long.parseUnsignedLong in Java 8.
|
private static long |
remainder(long dividend,
long divisor) |
static java.lang.String |
toString(long value)
Equivalent to Long.toUnsignedString in Java 8.
|
private static final long MAX_VALUE
private static final long[] MAX_VALUE_DIVS
private static final int[] MAX_VALUE_MODS
private static final int[] MAX_SAFE_DIGITS
public static int compare(long first, long second)
first
- the first valuesecond
- the second valuepublic static java.lang.String toString(long value)
value
- the long value to treat as unsignedpublic static long parse(java.lang.String string)
string
- the string representation of an unsigned longprivate static boolean overflowInParse(long current, int digit, int radix)
private static int compareLongs(long x, long y)
private static long divide(long dividend, long divisor)
private static long remainder(long dividend, long divisor)