Package org.roaringbitmap
Class RunContainerCharRankIterator
- java.lang.Object
-
- org.roaringbitmap.RunContainerCharIterator
-
- org.roaringbitmap.RunContainerCharRankIterator
-
- All Implemented Interfaces:
java.lang.Cloneable
,CharIterator
,PeekableCharIterator
,PeekableCharRankIterator
class RunContainerCharRankIterator extends RunContainerCharIterator implements PeekableCharRankIterator
-
-
Constructor Summary
Constructors Constructor Description RunContainerCharRankIterator(RunContainer 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)RunContainerCharRankIterator
clone()
Creates a copy of the iterator.char
next()
int
nextAsInt()
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.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
-
-
-
-
Constructor Detail
-
RunContainerCharRankIterator
RunContainerCharRankIterator(RunContainer p)
-
-
Method Detail
-
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
public RunContainerCharRankIterator 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
-
-