soot.util
Class BitSetIterator

java.lang.Object
  extended by soot.util.BitSetIterator

public class BitSetIterator
extends Object

A fast enumerator for sparse bit sets. When the enumerator is created, it takes a snapshot of the underlying BitVector, and iterates through the set bits. Note that this class almost implements the Iterator interface, but it doesn't because the return type of next is int rather than Object.


Method Summary
 boolean hasNext()
          Returns true if there are more set bits in the BitVector; false otherwise.
 int next()
          Returns the index of the next set bit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Returns true if there are more set bits in the BitVector; false otherwise.


next

public int next()
Returns the index of the next set bit. Note that the return type is int, and not Object.