Package com.googlecode.javaewah
Class IntIteratorOverIteratingRLW
- java.lang.Object
-
- com.googlecode.javaewah.IntIteratorOverIteratingRLW
-
- All Implemented Interfaces:
IntIterator
public class IntIteratorOverIteratingRLW extends java.lang.Object implements IntIterator
Implementation of an IntIterator over an IteratingRLW.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
hasNext
private int
literalPosition
(package private) IteratingRLW
parent
private int
position
private int
runningLength
private long
word
private int
wordLength
private int
wordPosition
-
Constructor Summary
Constructors Constructor Description IntIteratorOverIteratingRLW(IteratingRLW p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Is there more?private boolean
literalHasNext()
private boolean
moveToNext()
int
next()
Return the next integerprivate boolean
runningHasNext()
private void
setupForCurrentRunningLengthWord()
-
-
-
Field Detail
-
parent
final IteratingRLW parent
-
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
-
IntIteratorOverIteratingRLW
public IntIteratorOverIteratingRLW(IteratingRLW p)
- Parameters:
p
- iterator we wish to iterate over
-
-
Method Detail
-
moveToNext
private boolean moveToNext()
- Returns:
- whether we could find another set bit; don't move if there is an unprocessed value
-
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 final int next()
Description copied from interface:IntIterator
Return the next integer- Specified by:
next
in interfaceIntIterator
- Returns:
- the integer
-
setupForCurrentRunningLengthWord
private void setupForCurrentRunningLengthWord()
-
runningHasNext
private boolean runningHasNext()
-
literalHasNext
private boolean literalHasNext()
-
-