Package com.googlecode.javaewah
Class ReverseEWAHIterator
- java.lang.Object
-
- com.googlecode.javaewah.ReverseEWAHIterator
-
final class ReverseEWAHIterator extends java.lang.Object
The class ReverseEWAHIterator represents a special type of efficient iterator iterating over (uncompressed) words of bits in reverse order.
-
-
Field Summary
Fields Modifier and Type Field Description private int
pointer
The pointer representing the location of the current running length word in the array of words (embedded in the rlw attribute).private java.util.Stack<java.lang.Integer>
positions
The positions of running length words (embedded in the rlw attribute).protected RunningLengthWord
rlw
The current running length word.
-
Constructor Summary
Constructors Constructor Description ReverseEWAHIterator(Buffer buffer)
Instantiates a new reverse EWAH iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Buffer
buffer()
Access to the bufferboolean
hasPrevious()
Checks for previous.int
position()
Position of the current running length word.RunningLengthWord
previous()
Previous running length word.
-
-
-
Field Detail
-
positions
private java.util.Stack<java.lang.Integer> positions
The positions of running length words (embedded in the rlw attribute).
-
pointer
private int pointer
The pointer representing the location of the current running length word in the array of words (embedded in the rlw attribute).
-
rlw
protected RunningLengthWord rlw
The current running length word.
-
-
Constructor Detail
-
ReverseEWAHIterator
public ReverseEWAHIterator(Buffer buffer)
Instantiates a new reverse EWAH iterator.- Parameters:
buffer
- the buffer
-
-
Method Detail
-
buffer
public Buffer buffer()
Access to the buffer- Returns:
- the buffer
-
position
public int position()
Position of the current running length word.- Returns:
- the int
-
hasPrevious
public boolean hasPrevious()
Checks for previous.- Returns:
- true, if successful
-
previous
public RunningLengthWord previous()
Previous running length word.- Returns:
- the running length word
-
-