public class Utils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.math.BigInteger |
SIGNED_BIT_32 |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
compareUnsigned(int a,
int b)
Compares two int values by bits.
|
static boolean |
compareUnsigned(long a,
long b)
Compares two long values by bits.
|
static java.math.BigInteger |
getUnsignedBigInteger(int i)
Returns the value of this
Integer as an unsigned BigInteger . |
static java.math.BigInteger |
getUnsignedBigInteger(long i)
Returns the value of this
Long as an unsigned BigInteger . |
public static boolean compareUnsigned(int a, int b)
a
- the first int to compare.b
- the second int to compare.true
if a < b, false
if a >= b.public static boolean compareUnsigned(long a, long b)
a
- the first long to compare.b
- the second long to compare.true
if a < b, false
if a >= b.public static java.math.BigInteger getUnsignedBigInteger(int i)
Integer
as an unsigned BigInteger
.i
- - an integer to be converted to a BigInteger
.BigInteger
representation of the unsigned integer value.public static java.math.BigInteger getUnsignedBigInteger(long i)
Long
as an unsigned BigInteger
.i
- an long to be converted to a BigInteger
.BigInteger
representation of the unsigned long value.