Package com.googlecode.javaewah
Class IntIteratorImpl
- java.lang.Object
-
- com.googlecode.javaewah.IntIteratorImpl
-
- All Implemented Interfaces:
IntIterator
final class IntIteratorImpl extends java.lang.Object implements IntIterator
The IntIteratorImpl is the 64 bit implementation of the IntIterator interface, which efficiently returns the stream of integers represented by an EWAHIterator.- Since:
- 0.5.6
-
-
Field Summary
Fields Modifier and Type Field Description private Bufferbufferprivate EWAHIteratorewahIterprivate booleanhasNextprivate intliteralPositionprivate intpositionprivate intrunningLengthprivate longwordprivate intwordLengthprivate intwordPosition
-
Constructor Summary
Constructors Constructor Description IntIteratorImpl(EWAHIterator ewahIter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Is there more?private booleanliteralHasNext()booleanmoveToNext()intnext()Return the next integerprivate booleanrunningHasNext()private voidsetRunningLengthWord(RunningLengthWord rlw)
-
-
-
Field Detail
-
ewahIter
private final EWAHIterator ewahIter
-
buffer
private final Buffer buffer
-
position
private int position
-
runningLength
private int runningLength
-
word
private long word
-
wordPosition
private int wordPosition
-
wordLength
private int wordLength
-
literalPosition
private int literalPosition
-
hasNext
private boolean hasNext
-
-
Constructor Detail
-
IntIteratorImpl
IntIteratorImpl(EWAHIterator ewahIter)
-
-
Method Detail
-
moveToNext
public boolean moveToNext()
-
hasNext
public boolean hasNext()
Description copied from interface:IntIteratorIs there more?- Specified by:
hasNextin interfaceIntIterator- Returns:
- true, if there is more, false otherwise
-
next
public int next()
Description copied from interface:IntIteratorReturn the next integer- Specified by:
nextin interfaceIntIterator- Returns:
- the integer
-
setRunningLengthWord
private void setRunningLengthWord(RunningLengthWord rlw)
-
runningHasNext
private boolean runningHasNext()
-
literalHasNext
private boolean literalHasNext()
-
-