org.qtunes.db.spi.simple
Class WAHBitSet.IndexSet

java.lang.Object
  extended by org.qtunes.db.spi.simple.WAHBitSet.IndexSet
Enclosing class:
WAHBitSet

public class WAHBitSet.IndexSet
extends Object

The IndexSet stores positions of bits that are one. It decodes one word of the bitvector at a time. For a fill of ones, the function isRange returns true, otherwise it returns false. If isRange returns true, the position of the first bit is pointed by the pointer returned by function indices, and there are nIndices consecutive ones. If isRange returns false, there are nIndices bits that are one and the positions of these bits are stored in the array returned by function indices.

See Also:
isRange(), indices(), nIndices()

Constructor Summary
WAHBitSet.IndexSet()
           
 
Method Summary
 boolean hasMore()
           
 int[] indices()
           
 boolean isRange()
           
 void next()
          this function fills the indices and the nIndices.
 int nIndices()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WAHBitSet.IndexSet

public WAHBitSet.IndexSet()
Method Detail

isRange

public boolean isRange()
Returns:
true if the current word is a range word.

indices

public int[] indices()
Returns:
the indexes in the current word.

nIndices

public int nIndices()
Returns:
the number of indexes in the index array that are filled.

hasMore

public boolean hasMore()

next

public void next()
this function fills the indices and the nIndices.