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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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)