From b85033a722cc712b60654c40122d480df397c7a8 Mon Sep 17 00:00:00 2001 From: sjfink Date: Wed, 22 Apr 2009 17:08:13 +0000 Subject: [PATCH] prevent instantiation git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3509 f5eafffb-2e1d-0410-98e4-8ec43c5233c4 --- .../src/com/ibm/wala/util/intset/Bits.java | 12 ++++++------ .../src/com/ibm/wala/util/intset/IntSetUtil.java | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/com.ibm.wala.core/src/com/ibm/wala/util/intset/Bits.java b/com.ibm.wala.core/src/com/ibm/wala/util/intset/Bits.java index d1ab7eee2..5984036ae 100644 --- a/com.ibm.wala.core/src/com/ibm/wala/util/intset/Bits.java +++ b/com.ibm.wala.core/src/com/ibm/wala/util/intset/Bits.java @@ -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); diff --git a/com.ibm.wala.core/src/com/ibm/wala/util/intset/IntSetUtil.java b/com.ibm.wala.core/src/com/ibm/wala/util/intset/IntSetUtil.java index 606e84aaa..007afc281 100644 --- a/com.ibm.wala.core/src/com/ibm/wala/util/intset/IntSetUtil.java +++ b/com.ibm.wala.core/src/com/ibm/wala/util/intset/IntSetUtil.java @@ -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. *