Class BitUtil


  • public class BitUtil
    extends Object
    A collection of bit utilities.
    • Constructor Detail

      • BitUtil

        public BitUtil()
    • Method Detail

      • leastSignificantBit

        public static int leastSignificantBit​(long value)
        Computes the least-significant bit of the specified long that is set to 1. Zero-indexed.
        Parameters:
        value - the long whose least-significant bit is desired.
        Returns:
        the least-significant bit of the specified long. -1 is returned if there are no bits set.