Class NumberUtils

java.lang.Object
be.lmenten.utils.lang.NumberUtils

public class NumberUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    bit​(int data, int bit)
    Get the state of a single bit.
    static void
    bit​(int data, int bit, boolean state)
    Set the state of a single bit.
    static boolean
    bit0​(int data)
     
    static void
    bit0​(int data, boolean state)
     
    static boolean
    bit1​(int data)
     
    static void
    bit1​(int data, boolean state)
     
    static boolean
    bit2​(int data)
     
    static void
    bit2​(int data, boolean state)
     
    static boolean
    bit3​(int data)
     
    static void
    bit3​(int data, boolean state)
     
    static boolean
    bit4​(int data)
     
    static void
    bit4​(int data, boolean state)
     
    static boolean
    bit5​(int data)
     
    static void
    bit5​(int data, boolean state)
     
    static boolean
    bit6​(int data)
     
    static void
    bit6​(int data, boolean state)
     
    static boolean
    bit7​(int data)
     
    static void
    bit7​(int data, boolean state)
     
    static int
    propagateMSB​(int b)
     

    Methods inherited from class java.lang.Object

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

    • NumberUtils

      public NumberUtils()
  • Method Details

    • propagateMSB

      public static int propagateMSB(int b)
      Parameters:
      b -
      Returns:
    • bit

      public static boolean bit(int data, int bit)
      Get the state of a single bit.
      Parameters:
      bit -
      Returns:
    • bit0

      public static boolean bit0(int data)
    • bit1

      public static boolean bit1(int data)
    • bit2

      public static boolean bit2(int data)
    • bit3

      public static boolean bit3(int data)
    • bit4

      public static boolean bit4(int data)
    • bit5

      public static boolean bit5(int data)
    • bit6

      public static boolean bit6(int data)
    • bit7

      public static boolean bit7(int data)
    • bit

      public static void bit(int data, int bit, boolean state)
      Set the state of a single bit.
      Parameters:
      bit -
      state -
    • bit0

      public static void bit0(int data, boolean state)
    • bit1

      public static void bit1(int data, boolean state)
    • bit2

      public static void bit2(int data, boolean state)
    • bit3

      public static void bit3(int data, boolean state)
    • bit4

      public static void bit4(int data, boolean state)
    • bit5

      public static void bit5(int data, boolean state)
    • bit6

      public static void bit6(int data, boolean state)
    • bit7

      public static void bit7(int data, boolean state)