Package org.jf.util

Class NibbleUtils


  • public abstract class NibbleUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      NibbleUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int extractHighSignedNibble​(int value)
      Extracts the high signed 4-bit nibble from the least significant byte of the given value
      static int extractHighUnsignedNibble​(int value)
      Extracts the high unsigned 4-bit nibble from the least significant byte of the given value
      static int extractLowSignedNibble​(int value)
      Extracts the low signed 4-bit nibble from the least significant byte of the given value
      static int extractLowUnsignedNibble​(int value)
      Extracts the low unsigned 4-bit nibble from the least significant byte of the given value
      • Methods inherited from class java.lang.Object

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

      • NibbleUtils

        public NibbleUtils()
    • Method Detail

      • extractHighSignedNibble

        public static int extractHighSignedNibble​(int value)
        Extracts the high signed 4-bit nibble from the least significant byte of the given value
        Parameters:
        value - the value to extract the nibble from
        Returns:
        the extracted signed nibble value
      • extractLowSignedNibble

        public static int extractLowSignedNibble​(int value)
        Extracts the low signed 4-bit nibble from the least significant byte of the given value
        Parameters:
        value - the value to extract the nibble from
        Returns:
        the extracted signed nibble value
      • extractHighUnsignedNibble

        public static int extractHighUnsignedNibble​(int value)
        Extracts the high unsigned 4-bit nibble from the least significant byte of the given value
        Parameters:
        value - the value to extract the nibble from
        Returns:
        the extracted unsigned nibble value
      • extractLowUnsignedNibble

        public static int extractLowUnsignedNibble​(int value)
        Extracts the low unsigned 4-bit nibble from the least significant byte of the given value
        Parameters:
        value - the value to extract the nibble from
        Returns:
        the extracted unsigned nibble value