public class BitUtil
extends java.lang.Object
Constructor and Description |
---|
BitUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
assertOneBitMask(int mask) |
static byte |
clear(byte value,
byte mask) |
static int |
clear(int value,
int mask) |
static long |
clear(long value,
long mask) |
static boolean |
isPowerOfTwo(int i) |
static boolean |
isSet(byte value,
byte mask) |
static boolean |
isSet(int value,
int mask) |
static boolean |
isSet(long flags,
long mask) |
static byte |
set(byte value,
byte mask,
boolean setBit) |
static int |
set(int value,
int mask,
boolean setBit) |
static long |
set(long value,
long mask,
boolean setBit) |
public static boolean isSet(byte value, byte mask)
public static boolean isSet(int value, int mask)
public static boolean isSet(long flags, long mask)
public static byte set(byte value, byte mask, boolean setBit)
public static int set(int value, int mask, boolean setBit)
public static long set(long value, long mask, boolean setBit)
public static byte clear(byte value, byte mask)
public static int clear(int value, int mask)
public static long clear(long value, long mask)
public static void assertOneBitMask(int mask)
public static boolean isPowerOfTwo(int i)