Package jebl.util

# Class FixedBitSet

java.lang.Object
jebl.util.FixedBitSet

public class FixedBitSet extends Object
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
Constructor
Description
`FixedBitSet(int size)`
`FixedBitSet(FixedBitSet bs)`

## Method Summary

Modifier and Type
Method
Description
`int`
`cardinality()`
`void`
`clear(int position)`
`void`
`complement()`
`static FixedBitSet`
`complement(FixedBitSet b)`
`boolean`
`contains(int i)`
`boolean`
`equals(Object x)`
`int`
`hashCode()`
`void`
`intersect(FixedBitSet b)`
`int`
`intersectCardinality(FixedBitSet b)`
`int`
`nextOnBit(int fromIndex)`
Iteration helper.
`void`
`set(int position)`
`boolean`
`setInclusion(FixedBitSet bitset)`
`void`
`setMinus(FixedBitSet b)`
`String`
`toString()`
`void`
`union(FixedBitSet b)`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### FixedBitSet

public FixedBitSet(int size)

### FixedBitSet

public FixedBitSet(FixedBitSet bs)

## Method Details

### set

public void set(int position)

### clear

public void clear(int position)

### setInclusion

public boolean setInclusion(FixedBitSet bitset)

Parameters:
  `bitset` -
Returns:
  true if bitset contains this set (this invalid input: '<'= bitset)

### union

public void union(FixedBitSet b)

### intersect

public void intersect(FixedBitSet b)

### setMinus

public void setMinus(FixedBitSet b)

### intersectCardinality

public int intersectCardinality(FixedBitSet b)

### complement

public static FixedBitSet complement(FixedBitSet b)

### 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()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object x)

Overrides:
  `equals` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`