Package org.roaringbitmap
Class RunContainerCharRankIterator
java.lang.Object
org.roaringbitmap.RunContainerCharIterator
org.roaringbitmap.RunContainerCharRankIterator
- All Implemented Interfaces:
Cloneable
,CharIterator
,PeekableCharIterator
,PeekableCharRankIterator
class RunContainerCharRankIterator
extends RunContainerCharIterator
implements PeekableCharRankIterator
-
Field Summary
Fields -
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
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.RunContainerCharIterator
hasNext, 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, remove
Methods inherited from interface org.roaringbitmap.PeekableCharIterator
peekNext
-
Field Details
-
nextRank
private int nextRank
-
-
Constructor Details
-
RunContainerCharRankIterator
RunContainerCharRankIterator(RunContainer p)
-
-
Method Details
-
next
public char next()- Specified by:
next
in interfaceCharIterator
- Overrides:
next
in classRunContainerCharIterator
- Returns:
- next char value
-
nextAsInt
public int nextAsInt()- Specified by:
nextAsInt
in interfaceCharIterator
- Overrides:
nextAsInt
in classRunContainerCharIterator
- Returns:
- next short value as int value (using the least significant 16 bits)
-
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 classRunContainerCharIterator
- Parameters:
minval
- threshold
-
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
-
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 classRunContainerCharIterator
- Returns:
- a clone of the current iterator
-