Package com.googlecode.javaewah
Class ClearIntIterator
- java.lang.Object
-
- com.googlecode.javaewah.ClearIntIterator
-
- All Implemented Interfaces:
IntIterator
final class ClearIntIterator extends java.lang.Object implements IntIterator
This class is equivalent to IntIteratorImpl, except that it allows use to iterate over "clear" bits (bits set to 0).
-
-
Field Summary
Fields Modifier and Type Field Description private Buffer
buffer
private EWAHIterator
ewahIter
private boolean
hasNext
private int
literalPosition
private int
position
private int
runningLength
private int
sizeInBits
private long
word
private int
wordLength
private int
wordPosition
-
Constructor Summary
Constructors Constructor Description ClearIntIterator(EWAHIterator ewahIter, int sizeInBits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Is there more?private boolean
literalHasNext()
boolean
moveToNext()
int
next()
Return the next integerprivate boolean
runningHasNext()
private void
setRunningLengthWord(RunningLengthWord rlw)
-
-
-
Field Detail
-
ewahIter
private final EWAHIterator ewahIter
-
sizeInBits
private final int sizeInBits
-
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
-
ClearIntIterator
ClearIntIterator(EWAHIterator ewahIter, int sizeInBits)
-
-
Method Detail
-
moveToNext
public boolean moveToNext()
-
hasNext
public boolean hasNext()
Description copied from interface:IntIterator
Is there more?- Specified by:
hasNext
in interfaceIntIterator
- Returns:
- true, if there is more, false otherwise
-
next
public int next()
Description copied from interface:IntIterator
Return the next integer- Specified by:
next
in interfaceIntIterator
- Returns:
- the integer
-
setRunningLengthWord
private void setRunningLengthWord(RunningLengthWord rlw)
-
runningHasNext
private boolean runningHasNext()
-
literalHasNext
private boolean literalHasNext()
-
-