Top Description Fields Constructors Methods
com.googlecode.javaewah32

public final Class EWAHIterator32

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable

The class EWAHIterator represents a special type of efficient iterator iterating over (uncompressed) words of bits.
Author
Daniel Lemire
Since
0.5.0

Field Summary

Modifier and TypeField and Description
private int
pointer

The pointer represent the location of the current running length word in the array of words (embedded in the rlw attribute).

pack-priv final RunningLengthWord32
rlw

The current running length word.

private final int
size

The size in words.

Constructor Summary

AccessConstructor and Description
public
EWAHIterator32(final Buffer32
the buffer
buffer
)

Instantiates a new eWAH iterator.

private
EWAHIterator32(int pointer, RunningLengthWord32 rlw, int size)

Method Summary

Modifier and TypeMethod and Description
public Buffer32

Returns:

the buffer
buffer
()

Access to the buffer

public EWAHIterator32
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.

public static EWAHIterator32

Returns:

an iterator
getEWAHIterator
(EWAHCompressedBitmap32
we want to iterate over
bitmap
)

Allow expert developers to instantiate an EWAHIterator.

public boolean

Returns:

true, if successful
hasNext
()

Checks for next.

public int

Returns:

the int
literalWords
()

Position of the literal words represented by this running length word.

public RunningLengthWord32

Returns:

the running length word
next
()

Next running length word.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pointerback to summary
private int pointer

The pointer represent the location of the current running length word in the array of words (embedded in the rlw attribute).

rlwback to summary
pack-priv final RunningLengthWord32 rlw

The current running length word.

sizeback to summary
private final int size

The size in words.

Constructor Detail

EWAHIterator32back to summary
public EWAHIterator32(final Buffer32 buffer)

Instantiates a new eWAH iterator.

Parameters
buffer:Buffer32

the buffer

EWAHIterator32back to summary
private EWAHIterator32(int pointer, RunningLengthWord32 rlw, int size)

Method Detail

bufferback to summary
public Buffer32 buffer()

Access to the buffer

Returns:Buffer32

the buffer

cloneback to summary
public EWAHIterator32 clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:EWAHIterator32

a clone of this instance.

Annotations
@Override
Exceptions
CloneNotSupportedException:
if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
getEWAHIteratorback to summary
public static EWAHIterator32 getEWAHIterator(EWAHCompressedBitmap32 bitmap)

Allow expert developers to instantiate an EWAHIterator.

Parameters
bitmap:EWAHCompressedBitmap32

we want to iterate over

Returns:EWAHIterator32

an iterator

hasNextback to summary
public boolean hasNext()

Checks for next.

Returns:boolean

true, if successful

literalWordsback to summary
public int literalWords()

Position of the literal words represented by this running length word.

Returns:int

the int

nextback to summary
public RunningLengthWord32 next()

Next running length word.

Returns:RunningLengthWord32

the running length word