public class Longs
extends java.lang.Object
| Constructor and Description |
|---|
Longs() |
| Modifier and Type | Method and Description |
|---|---|
static int |
bitCount(long i) |
static int |
bitLength(long i) |
static int |
compare(long x,
long y) |
static int |
compareUnsigned(long x,
long y) |
static long |
divideUnsigned(long x,
long y) |
static long |
highestOneBit(long i) |
static long |
lowestOneBit(long i) |
static int |
numberOfLeadingZeros(long i) |
static int |
numberOfTrailingZeros(long i) |
static long |
parseUnsignedLong(java.lang.String s) |
static long |
reverse(long i) |
static long |
reverseBytes(long i) |
static long |
rotateLeft(long i,
int distance) |
static long |
rotateRight(long i,
int distance) |
static byte[] |
toUnsignedByteArray(long i)
Return the big-endian encoding of
i taken as an unsigned 64-bit value, in the fewest
octets that hold its significant bits: 0 is the empty array, 255 is FF, 256 is
01 00, and a negative argument takes all eight. |
static java.lang.Long |
valueOf(long value) |
static void |
xorTo(int len,
long[] x,
int xOff,
long[] z,
int zOff)
Deprecated.
Use
Nat.xorTo64(int, long[], int, long[], int) instead. |
public static final int BYTES
public static final int SIZE
public static int bitCount(long i)
public static int bitLength(long i)
public static int compare(long x,
long y)
public static int compareUnsigned(long x,
long y)
public static long divideUnsigned(long x,
long y)
public static long highestOneBit(long i)
public static long lowestOneBit(long i)
public static int numberOfLeadingZeros(long i)
public static int numberOfTrailingZeros(long i)
public static long parseUnsignedLong(java.lang.String s)
public static long reverse(long i)
public static long reverseBytes(long i)
public static long rotateLeft(long i,
int distance)
public static long rotateRight(long i,
int distance)
public static byte[] toUnsignedByteArray(long i)
i taken as an unsigned 64-bit value, in the fewest
octets that hold its significant bits: 0 is the empty array, 255 is FF, 256 is
01 00, and a negative argument takes all eight.public static java.lang.Long valueOf(long value)
@Deprecated
public static void xorTo(int len,
long[] x,
int xOff,
long[] z,
int zOff)
Nat.xorTo64(int, long[], int, long[], int) instead.