Package org.roaringbitmap.buffer
Class RawMappeableRunContainerCharIterator
- java.lang.Object
-
- org.roaringbitmap.buffer.RawMappeableRunContainerCharIterator
-
- All Implemented Interfaces:
java.lang.Cloneable
,CharIterator
,PeekableCharIterator
final class RawMappeableRunContainerCharIterator extends java.lang.Object implements PeekableCharIterator
-
-
Constructor Summary
Constructors Constructor Description RawMappeableRunContainerCharIterator(MappeableRunContainer 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)PeekableCharIterator
clone()
Creates a copy of the iterator.private char
getLength(int index)
private char
getValue(int index)
boolean
hasNext()
char
next()
int
nextAsInt()
char
peekNext()
Look at the next value without advancingvoid
remove()
If possible, remove the current valueprivate void
wrap(MappeableRunContainer p)
-
-
-
Field Detail
-
pos
private int pos
-
le
private int le
-
maxlength
private int maxlength
-
base
private int base
-
parent
private MappeableRunContainer parent
-
vl
private char[] vl
-
-
Constructor Detail
-
RawMappeableRunContainerCharIterator
RawMappeableRunContainerCharIterator(MappeableRunContainer p)
-
-
Method Detail
-
clone
public PeekableCharIterator clone()
Description copied from interface:PeekableCharIterator
Creates a copy of the iterator.- Specified by:
clone
in interfaceCharIterator
- Specified by:
clone
in interfacePeekableCharIterator
- Overrides:
clone
in classjava.lang.Object
- Returns:
- a clone of the current iterator
-
getLength
private char getLength(int index)
-
getValue
private char getValue(int index)
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceCharIterator
- Returns:
- whether there is another value
-
next
public char next()
- Specified by:
next
in interfaceCharIterator
- Returns:
- next char value
-
nextAsInt
public int nextAsInt()
- Specified by:
nextAsInt
in interfaceCharIterator
- Returns:
- next short value as int value (using the least significant 16 bits)
-
remove
public void remove()
Description copied from interface:CharIterator
If possible, remove the current value- Specified by:
remove
in interfaceCharIterator
-
wrap
private void wrap(MappeableRunContainer p)
-
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
- Parameters:
minval
- threshold
-
peekNext
public char peekNext()
Description copied from interface:PeekableCharIterator
Look at the next value without advancing- Specified by:
peekNext
in interfacePeekableCharIterator
- Returns:
- next value
-
-