Package edu.uiuc.ncsa.security.core.util
Class BitSetUtil
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.BitSetUtil
-
-
Constructor Summary
Constructors Constructor Description BitSetUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
andCompress(BitSet bitSet)
DittoorCompress(BitSet)
except the returned value isprotected static boolean
compress(BitSet bitSet, boolean doAnd)
Internal method for other compress operations.static boolean
orCompress(BitSet bitSet)
Apply or between each element of this set.static int
toInt(BitSet bitSet)
Take a bit vector (representing the place values) and return the integer in base 2.
-
-
-
Method Detail
-
orCompress
public static boolean orCompress(BitSet bitSet)
Apply or between each element of this set. So if the elements are{a0,a1,a2,...,an}
then the result isa0 || a1 || a2 || ... || an
- Returns:
-
andCompress
public static boolean andCompress(BitSet bitSet)
DittoorCompress(BitSet)
except the returned value isa0 && a1 && a2 && ... && an
- Returns:
-
compress
protected static boolean compress(BitSet bitSet, boolean doAnd)
Internal method for other compress operations.- Parameters:
bitSet
-doAnd
-- Returns:
-
toInt
public static int toInt(BitSet bitSet)
Take a bit vector (representing the place values) and return the integer in base 2. So if the bitset is {1,2,3,4,5} then this returns 0 + 2 + 4 + 8 + 16 + 32- Parameters:
bitSet
-- Returns:
-
-