Package com.googlecode.javaewah32
Class EWAHIterator32
- java.lang.Object
-
- com.googlecode.javaewah32.EWAHIterator32
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class EWAHIterator32 extends java.lang.Object implements java.lang.Cloneable
The class EWAHIterator represents a special type of efficient iterator iterating over (uncompressed) words of bits.- Since:
- 0.5.0
- Author:
- Daniel Lemire
-
-
Constructor Summary
Constructors Constructor Description EWAHIterator32(EWAHCompressedBitmap32 a, int sizeinwords)
Instantiates a new eWAH iterator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
buffer()
Access to the array of wordsEWAHIterator32
clone()
static EWAHIterator32
getEWAHIterator(EWAHCompressedBitmap32 bitmap)
Allow expert developers to instantiate an EWAHIterator.boolean
hasNext()
Checks for next.int
literalWords()
Position of the literal words represented by this running length word.RunningLengthWord32
next()
Next running length word.
-
-
-
Constructor Detail
-
EWAHIterator32
public EWAHIterator32(EWAHCompressedBitmap32 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 EWAHIterator32 getEWAHIterator(EWAHCompressedBitmap32 bitmap)
Allow expert developers to instantiate an EWAHIterator.- Parameters:
bitmap
- we want to iterate over- Returns:
- an iterator
-
buffer
public int[] buffer()
Access to the array of words- Returns:
- the int[]
-
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 RunningLengthWord32 next()
Next running length word.- Returns:
- the running length word
-
clone
public EWAHIterator32 clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
-