Package com.diozero.util
Class BitManipulation
java.lang.Object
com.diozero.util.BitManipulation
public class BitManipulation
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description BitManipulation()
-
Method Summary
Modifier and Type Method Description static byte
getBitMask(int bit)
static byte
getBitMask(int... bits)
static boolean
isBitSet(byte value, byte bit)
static byte
setBitValue(byte value, boolean on, int bit)
-
Constructor Details
-
BitManipulation
public BitManipulation()
-
-
Method Details
-
setBitValue
public static byte setBitValue(byte value, boolean on, int bit) -
getBitMask
public static byte getBitMask(int... bits) -
getBitMask
public static byte getBitMask(int bit) -
isBitSet
public static boolean isBitSet(byte value, byte bit)
-