Package org.roaringbitmap
Class BitmapContainerCharRankIterator
- java.lang.Object
-
- org.roaringbitmap.BitmapContainerCharIterator
-
- org.roaringbitmap.BitmapContainerCharRankIterator
-
- All Implemented Interfaces:
java.lang.Cloneable
,CharIterator
,PeekableCharIterator
,PeekableCharRankIterator
final class BitmapContainerCharRankIterator extends BitmapContainerCharIterator implements PeekableCharRankIterator
-
-
Field Summary
Fields Modifier and Type Field Description private int
nextRank
-
Fields inherited from class org.roaringbitmap.BitmapContainerCharIterator
bitmap, w, x
-
-
Constructor Summary
Constructors Constructor Description BitmapContainerCharRankIterator(long[] p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
advanceIfNeeded(char minval)
If needed, when iterating forward through the chars it will advance as long as the next value is smaller than val (as an unsigned short) when iterating in reverse through the chars it will advance as long as the next value is larger than val (as an unsigned short)PeekableCharRankIterator
clone()
Creates a copy of the iterator.char
next()
int
peekNextRank()
peek in-container rank of the next value Uses integer because internal representation of rank is int and in-container rank lies in range 1-65536-
Methods inherited from class org.roaringbitmap.BitmapContainerCharIterator
hasNext, nextAsInt, peekNext, remove, wrap
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.roaringbitmap.CharIterator
hasNext, nextAsInt, remove
-
Methods inherited from interface org.roaringbitmap.PeekableCharIterator
peekNext
-
-
-
-
Method Detail
-
peekNextRank
public int peekNextRank()
Description copied from interface:PeekableCharRankIterator
peek in-container rank of the next value Uses integer because internal representation of rank is int and in-container rank lies in range 1-65536- Specified by:
peekNextRank
in interfacePeekableCharRankIterator
- Returns:
- rank of the next value
-
next
public char next()
- Specified by:
next
in interfaceCharIterator
- Overrides:
next
in classBitmapContainerCharIterator
- Returns:
- next char value
-
advanceIfNeeded
public void advanceIfNeeded(char minval)
Description copied from interface:PeekableCharIterator
If needed, when iterating forward through the chars it will advance as long as the next value is smaller than val (as an unsigned short) when iterating in reverse through the chars it will advance as long as the next value is larger than val (as an unsigned short)- Specified by:
advanceIfNeeded
in interfacePeekableCharIterator
- Overrides:
advanceIfNeeded
in classBitmapContainerCharIterator
- Parameters:
minval
- threshold
-
clone
public PeekableCharRankIterator clone()
Description copied from interface:PeekableCharIterator
Creates a copy of the iterator.- Specified by:
clone
in interfaceCharIterator
- Specified by:
clone
in interfacePeekableCharIterator
- Specified by:
clone
in interfacePeekableCharRankIterator
- Overrides:
clone
in classBitmapContainerCharIterator
- Returns:
- a clone of the current iterator
-
-