public final class BitUtils
extends java.lang.Object
Constructor and Description |
---|
BitUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
maskInt(int width)
Returns a bit mask of the given width.
|
static int |
maskInt(int lo,
int hi)
Returns a bit mask for the given range.
|
static long |
maskLong(int width)
Returns a bit mask of the given width.
|
static long |
maskLong(int lo,
int hi)
Returns a bit mask for the given range.
|
public static int maskInt(int width)
width
- Mask width.public static int maskInt(int lo, int hi)
lo
- Lower bound.hi
- Higher bound.public static long maskLong(int width)
width
- Mask width.public static long maskLong(int lo, int hi)
lo
- Lower bound.hi
- Higher bound.