prevent instantiation
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3509 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
26e9f2a0b0
commit
b85033a722
|
@ -12,12 +12,13 @@ package com.ibm.wala.util.intset;
|
|||
|
||||
/**
|
||||
* utilities for manipulating values at the bit-level.
|
||||
*
|
||||
* @author Stephen Fink
|
||||
* @author Dave Grove
|
||||
*/
|
||||
public class Bits {
|
||||
|
||||
// there's no reason to instantiate this class.
|
||||
private Bits() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the lower 8 bits (as an int) of an int
|
||||
*/
|
||||
|
@ -26,7 +27,7 @@ public class Bits {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the lower 16 bits (as an int) of an int
|
||||
* Return the lower 16 bits (as an int) of an int
|
||||
*/
|
||||
public static int lower16(int value) {
|
||||
return (value & 0xffff);
|
||||
|
@ -69,8 +70,7 @@ public class Bits {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the number of ones in the binary representation of an integer.
|
||||
* Hank Warren's Hacker's Delight algorithm
|
||||
* Return the number of ones in the binary representation of an integer. Hank Warren's Hacker's Delight algorithm
|
||||
*/
|
||||
public static int populationCount(int value) {
|
||||
int result = ((value & 0xAAAAAAAA) >>> 1) + (value & 0x55555555);
|
||||
|
|
|
@ -45,6 +45,10 @@ public class IntSetUtil {
|
|||
|
||||
private final static boolean DEBUG = false;
|
||||
|
||||
// there's no reason to instantiate this class
|
||||
private IntSetUtil() {
|
||||
}
|
||||
|
||||
/**
|
||||
* This method constructs an appropriate mutable copy of set.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue