public SkippableIterator getSkippableIterator ( ) { return new SkippableIterator ( ) { int pos = 0 ; int p = 0 ; public SkippableIterator init ( ) { this . p = SparseBitmap . this . buffer . get ( 0 ) ; return this ; } @ Override public void advance ( ) { this . pos += 2 ; if ( this . pos < SparseBitmap . this . buffer . size ( ) ) this . p += SparseBitmap . this . buffer . get ( this . pos ) + 1 ; } @ Override public void advanceUntil ( int min ) { advance ( ) ; while ( hasValue ( ) && ( getCurrentWordOffset ( ) < min ) ) { advance ( ) ; } } @ Override public int getCurrentWord ( ) { return SparseBitmap . this . buffer . get ( this . pos + 1 ) ; } @ Override public int getCurrentWordOffset ( ) { return this . p ; } @ Override public boolean hasValue ( ) { return this . pos < SparseBitmap . this . buffer . size ( ) ; } } . init ( ) ; }
Gets the skippable iterator .