Package com.googlecode.javaewah
Class EWAHIterator
- java.lang.Object
-
- com.googlecode.javaewah.EWAHIterator
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class EWAHIterator extends java.lang.Object implements java.lang.CloneableThe class EWAHIterator represents a special type of efficient iterator iterating over (uncompressed) words of bits. It is not meant for end users.- Since:
- 0.1.0
- Author:
- Daniel Lemire
-
-
Constructor Summary
Constructors Constructor Description EWAHIterator(EWAHCompressedBitmap a, int sizeinwords)Instantiates a new EWAH iterator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long[]buffer()Access to the array of wordsEWAHIteratorclone()static EWAHIteratorgetEWAHIterator(EWAHCompressedBitmap bitmap)Allow expert developers to instantiate an EWAHIterator.booleanhasNext()Checks for next.intliteralWords()Position of the literal words represented by this running length word.RunningLengthWordnext()Next running length word.
-
-
-
Constructor Detail
-
EWAHIterator
public EWAHIterator(EWAHCompressedBitmap a, int sizeinwords)
Instantiates a new EWAH iterator.- Parameters:
a- the array of wordssizeinwords- the number of words that are significant in the array of words
-
-
Method Detail
-
getEWAHIterator
public static EWAHIterator getEWAHIterator(EWAHCompressedBitmap bitmap)
Allow expert developers to instantiate an EWAHIterator.- Parameters:
bitmap- we want to iterate over- Returns:
- an iterator
-
buffer
public long[] buffer()
Access to the array of words- Returns:
- the long[]
-
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
public RunningLengthWord next()
Next running length word.- Returns:
- the running length word
-
clone
public EWAHIterator clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-