Package com.diozero.util
Class BitManipulation
java.lang.Object
com.diozero.util.BitManipulation
public class BitManipulation extends 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, int bit)
static byte
reverseByte(byte value)
static short
reverseShort(short value)
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, int bit) -
reverseByte
public static byte reverseByte(byte value) -
reverseShort
public static short reverseShort(short value)
-