de.java_chess.javaChess.engine
Class BitUtils

java.lang.Object
  |
  +--de.java_chess.javaChess.engine.BitUtils

public class BitUtils
extends java.lang.Object

This class provides utility methods to manipulate bitmasks.


Constructor Summary
BitUtils()
           
 
Method Summary
static int getHighestBit(long bitmask)
          Find the index of highest set bit in a long bitmask.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitUtils

public BitUtils()
Method Detail

getHighestBit

public static final int getHighestBit(long bitmask)
Find the index of highest set bit in a long bitmask.
Parameters:
bitmask - The bitmask to operate on.
Returns:
The index of the highest set bit or 0, if no bits are set.