to.etc.util
Class BoolVector

java.lang.Object
  extended by to.etc.util.BoolVector

public class BoolVector
extends java.lang.Object

This contains a packed array of boolean values. The array grows dynamically and each boolean only uses a single bit.

Author:
Frits Jalvingh

Constructor Summary
BoolVector()
          Create a default vector..
BoolVector(int cap)
          Create a vector for the specified capacity.
 
Method Summary
 int capacity()
          Returns the current capacity
 boolean get(int ix)
          Get a value from the vector.
 void or(BoolVector bv)
          Does a bitwise OR of the contents of THIS vector and the parameter vector, and store the result in this vector.
 boolean set(int ix, boolean value)
          Set a value in the vector.
 int size()
          Returns the current #of elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoolVector

public BoolVector()
Create a default vector..


BoolVector

public BoolVector(int cap)
Create a vector for the specified capacity.

Method Detail

set

public boolean set(int ix,
                   boolean value)
Set a value in the vector. It returns the previous value.


get

public boolean get(int ix)
Get a value from the vector.


size

public int size()
Returns the current #of elements.


capacity

public int capacity()
Returns the current capacity


or

public void or(BoolVector bv)
Does a bitwise OR of the contents of THIS vector and the parameter vector, and store the result in this vector.

Parameters:
bv -