Class BitSetIterator


  • public class BitSetIterator
    extends java.lang.Object
    An iterator to iterate over set bits in an BitSet. This is faster than nextSetBit() for iterating over the complete set of bits, especially when the density of the bits set is high.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int NO_MORE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int nextSetBit()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BitSetIterator

        public BitSetIterator​(BitSet obs)
      • BitSetIterator

        public BitSetIterator​(long[] bits,
                              int numWords)
    • Method Detail

      • nextSetBit

        public int nextSetBit()