Package org.roaringbitmap
Class BitmapContainerCharRankIterator
java.lang.Object
org.roaringbitmap.BitmapContainerCharIterator
org.roaringbitmap.BitmapContainerCharRankIterator
- All Implemented Interfaces:
Cloneable
,CharIterator
,PeekableCharIterator
,PeekableCharRankIterator
final class BitmapContainerCharRankIterator
extends BitmapContainerCharIterator
implements PeekableCharRankIterator
-
Field Summary
FieldsFields inherited from class org.roaringbitmap.BitmapContainerCharIterator
bitmap, w, x
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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)clone()
Creates a copy of the iterator.char
next()
int
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-65536Methods 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
-
Field Details
-
nextRank
private int nextRank
-
-
Constructor Details
-
BitmapContainerCharRankIterator
BitmapContainerCharRankIterator(long[] p)
-
-
Method Details
-
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
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
-