Package org.roaringbitmap
Class ReverseArrayContainerCharIterator
java.lang.Object
org.roaringbitmap.ReverseArrayContainerCharIterator
- All Implemented Interfaces:
Cloneable
,CharIterator
,PeekableCharIterator
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid
advanceIfNeeded
(char maxval) 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.boolean
hasNext()
char
next()
int
char
peekNext()
Look at the next value without advancingvoid
remove()
If possible, remove the current value(package private) void
-
Field Details
-
pos
int pos -
parent
-
-
Constructor Details
-
ReverseArrayContainerCharIterator
ReverseArrayContainerCharIterator() -
ReverseArrayContainerCharIterator
ReverseArrayContainerCharIterator(ArrayContainer p)
-
-
Method Details
-
advanceIfNeeded
public void advanceIfNeeded(char maxval) 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:
maxval
- threshold
-
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 classObject
- Returns:
- a clone of the current iterator
-
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)
-
peekNext
public char peekNext()Description copied from interface:PeekableCharIterator
Look at the next value without advancing- Specified by:
peekNext
in interfacePeekableCharIterator
- Returns:
- next value
-
remove
public void remove()Description copied from interface:CharIterator
If possible, remove the current value- Specified by:
remove
in interfaceCharIterator
-
wrap
-