public final class IntTools
extends java.lang.Object
| Constructor and Description |
|---|
IntTools() |
| Modifier and Type | Method and Description |
|---|---|
static int |
bitwidth(int maxint) |
static int |
countOneBits(int integer) |
static boolean |
isPow2(int value) |
static int |
pow2(int exp) |
static int |
smallestRepresentableInteger(int bitwidth) |
public static int bitwidth(int maxint)
maxint - public static int pow2(int exp)
public static int smallestRepresentableInteger(int bitwidth)
public static boolean isPow2(int value)
value - true if there is an i such that value == exp(2,i)public static int countOneBits(int integer)