Package com.googlecode.javaewah32
Class EWAHIterator32
java.lang.Object
com.googlecode.javaewah32.EWAHIterator32
- All Implemented Interfaces:
Cloneable
The class EWAHIterator represents a special type of efficient iterator
iterating over (uncompressed) words of bits.
- Since:
- 0.5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The pointer represent the location of the current running length word in the array of words (embedded in the rlw attribute).(package private) final RunningLengthWord32
The current running length word.private final int
The size in words. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
EWAHIterator32
(int pointer, RunningLengthWord32 rlw, int size) EWAHIterator32
(Buffer32 buffer) Instantiates a new eWAH iterator. -
Method Summary
Modifier and TypeMethodDescriptionbuffer()
Access to the bufferclone()
static EWAHIterator32
Allow expert developers to instantiate an EWAHIterator.boolean
hasNext()
Checks for next.int
Position of the literal words represented by this running length word.next()
Next running length word.
-
Field Details
-
pointer
private int pointerThe pointer represent the location of the current running length word in the array of words (embedded in the rlw attribute). -
rlw
The current running length word. -
size
private final int sizeThe size in words.
-
-
Constructor Details
-
EWAHIterator32
Instantiates a new eWAH iterator.- Parameters:
buffer
- the buffer
-
EWAHIterator32
-
-
Method Details
-
getEWAHIterator
Allow expert developers to instantiate an EWAHIterator.- Parameters:
bitmap
- we want to iterate over- Returns:
- an iterator
-
buffer
Access to the buffer- Returns:
- the buffer
-
literalWords
public int literalWords()Position of the literal words represented by this running length word.- Returns:
- the int
-
hasNext
public boolean hasNext()Checks for next.- Returns:
- true, if successful
-
next
Next running length word.- Returns:
- the running length word
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-