public IntIterator intIterator ( ) { return new IntIterator ( ) { @ Override public boolean hasNext ( ) { return this . i >= 0 ; } @ Override public int next ( ) { this . j = this . i ; this . i = ImmutableBitSet . this . nextSetBit ( this . i + 1 ) ; return this . j ; } private int i = ImmutableBitSet . this . nextSetBit ( 0 ) ; private int j ; } ; }
Iterate over the set bits