Modifier and Type | Method and Description |
---|---|
static int |
compare(long a,
long b)
Compares the two specified
long values, treating them as unsigned
values between 0 and 2^64 - 1 inclusive. |
static long |
divide(long dividend,
long divisor)
Returns dividend / divisor, where the dividend and divisor are treated as
unsigned 64-bit quantities.
|
static boolean |
isGreater(long one,
long two)
Compare two longs as if they were unsigned.
|
static boolean |
isLess(long one,
long two)
Compare two longs as if they were unsigned.
|
static boolean |
isLessOrEqual(long one,
long two)
Compare two longs as if they were unsigned.
|
public static final int compare(long a, long b)
long
values, treating them as unsigned
values between 0
and 2^64 - 1
inclusive.
From Guava's UnsignedLongs.
a
- the first unsigned long
to compareb
- the second unsigned long
to comparea
is less than b
; a positive
value if a
is greater than b
; or zero if they are
equalpublic static final boolean isGreater(long one, long two)
one
- the first unsigned long
to comparetwo
- the second unsigned long
to compareone > two
public static final boolean isLess(long one, long two)
one
- the first unsigned long
to comparetwo
- the second unsigned long
to compareone < two
public static final boolean isLessOrEqual(long one, long two)
one
- the first unsigned long
to comparetwo
- the second unsigned long
to compareone <= two
public static final long divide(long dividend, long divisor)
dividend
- the dividend (numerator)divisor
- the divisor (denominator)dividend / divisor
ArithmeticException
- if divisor is 0