Package jebl.util
Class FixedBitSet
java.lang.Object
jebl.util.FixedBitSet
A bit-set of fixed size. Size is determined on creation.
- Version:
- $Id: FixedBitSet.java 591 2006-12-21 02:39:18Z pepster $
- Author:
- Joseph Heled
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
void
clear
(int position) void
static FixedBitSet
boolean
contains
(int i) boolean
int
hashCode()
void
int
int
nextOnBit
(int fromIndex) Iteration helper.void
set
(int position) boolean
setInclusion
(FixedBitSet bitset) void
toString()
void
union
(FixedBitSet b)
-
Constructor Details
-
FixedBitSet
public FixedBitSet(int size) -
FixedBitSet
-
-
Method Details
-
set
public void set(int position) -
clear
public void clear(int position) -
setInclusion
- Parameters:
bitset
-- Returns:
- true if bitset contains this set (this <= bitset)
-
union
-
intersect
-
setMinus
-
intersectCardinality
-
complement
-
complement
public void complement() -
nextOnBit
public int nextOnBit(int fromIndex) Iteration helper. A typical iteration on set bits might be FixedBitSet b; for(int i = b.nextOnBit(0); i >= 0; i = b.nextOnBit(i+1)) ...- Parameters:
fromIndex
-- Returns:
- Next set member whose index is >= fromIndex. -1 if none.
-
cardinality
public int cardinality() -
contains
public boolean contains(int i) -
hashCode
public int hashCode() -
equals
-
toString
-