Package com.googlecode.javaewah32
Class IntIteratorOverIteratingRLW32
- java.lang.Object
-
- com.googlecode.javaewah32.IntIteratorOverIteratingRLW32
-
- All Implemented Interfaces:
IntIterator
public class IntIteratorOverIteratingRLW32 extends java.lang.Object implements IntIterator
Implementation of an IntIterator over an IteratingRLW.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanhasNextprivate intliteralPosition(package private) IteratingRLW32parentprivate intpositionprivate intrunningLengthprivate intwordprivate intwordLengthprivate intwordPosition
-
Constructor Summary
Constructors Constructor Description IntIteratorOverIteratingRLW32(IteratingRLW32 p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Is there more?private booleanliteralHasNext()private booleanmoveToNext()intnext()Return the next integerprivate booleanrunningHasNext()private voidsetupForCurrentRunningLengthWord()
-
-
-
Field Detail
-
parent
final IteratingRLW32 parent
-
position
private int position
-
runningLength
private int runningLength
-
word
private int word
-
wordPosition
private int wordPosition
-
wordLength
private int wordLength
-
literalPosition
private int literalPosition
-
hasNext
private boolean hasNext
-
-
Constructor Detail
-
IntIteratorOverIteratingRLW32
public IntIteratorOverIteratingRLW32(IteratingRLW32 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:IntIteratorIs there more?- Specified by:
hasNextin interfaceIntIterator- Returns:
- true, if there is more, false otherwise
-
next
public final int next()
Description copied from interface:IntIteratorReturn the next integer- Specified by:
nextin interfaceIntIterator- Returns:
- the integer
-
setupForCurrentRunningLengthWord
private void setupForCurrentRunningLengthWord()
-
runningHasNext
private boolean runningHasNext()
-
literalHasNext
private boolean literalHasNext()
-
-