public class CommonUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CommonUtils.DictionaryUtils |
| Modifier and Type | Field and Description |
|---|---|
static long |
two32 |
| Constructor and Description |
|---|
CommonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
intLog2(long n)
Get the integer logarithm to base 2.
|
static long |
modulo(long a,
long n)
Get the arithmetic modulo.
|
static int |
popCount(long n)
Counts the number of set bits in input integer.
|
static int[] |
readArray(java.io.DataInputStream is)
Reads an integer array from stream.
|
public static final long two32
public static int[] readArray(java.io.DataInputStream is)
is - DataInputStream to read data from.public static int intLog2(long n)
n - Input integer.public static long modulo(long a,
long n)
a - Input operand.n - Modulus.public static int popCount(long n)
n - Input integer.