Top Description Fields Constructors Methods
com.googlecode.javaewah.symmetric

public final Class EWAHPointer

extends Object
implements Comparable<EWAHPointer>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
com.googlecode.javaewah.IteratingBufferedRunningLengthWord

Wrapper around an IteratingBufferedRunningLengthWord used by the RunningBitmapMerge class.
Author
Daniel Lemire
Since
0.8.0

Field Summary

Modifier and TypeField and Description
private boolean
private int
private boolean
public final IteratingBufferedRunningLengthWord
iterator

Underlying iterator

private final int
private boolean

Constructor Summary

AccessConstructor and Description
public
EWAHPointer(final int
word where the previous run ended
previousEndRun
,
final IteratingBufferedRunningLengthWord
the iterator
rw
,
final int
current position (in word)
pos
)

Construct a pointer over an IteratingBufferedRunningLengthWord.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the beginning of the current run
beginOfRun
()

public void
callbackUpdate(final UpdateableBitmapFunction
call the function with the current information
f
)

public int
compareTo(EWAHPointer
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public int

Returns:

the end of the current run
endOfRun
()

public boolean

Returns:

true if there is no more data
hasNoData
()

public void
parseNextRun()

Process the next run

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

deadback to summary
private boolean dead
endrunback to summary
private int endrun
isLiteralback to summary
private boolean isLiteral
iteratorback to summary
public final IteratingBufferedRunningLengthWord iterator

Underlying iterator

posback to summary
private final int pos
valueback to summary
private boolean value

Constructor Detail

EWAHPointerback to summary
public EWAHPointer(final int previousEndRun, final IteratingBufferedRunningLengthWord rw, final int pos)

Construct a pointer over an IteratingBufferedRunningLengthWord.

Parameters
previousEndRun:int

word where the previous run ended

rw:IteratingBufferedRunningLengthWord

the iterator

pos:int

current position (in word)

Method Detail

beginOfRunback to summary
public int beginOfRun()
Returns:int

the beginning of the current run

callbackUpdateback to summary
public void callbackUpdate(final UpdateableBitmapFunction f)
Parameters
f:UpdateableBitmapFunction

call the function with the current information

compareToback to summary
public int compareTo(EWAHPointer other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:EWAHPointer

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
endOfRunback to summary
public int endOfRun()
Returns:int

the end of the current run

hasNoDataback to summary
public boolean hasNoData()
Returns:boolean

true if there is no more data

parseNextRunback to summary
public void parseNextRun()

Process the next run