Top Description Fields Constructors Methods
com.googlecode.javaewah

pack-priv final Class ChunkIteratorImpl

extends Object
implements ChunkIterator
Class Inheritance
All Implemented Interfaces
com.googlecode.javaewah.ChunkIterator
Static Imports
com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS

The ChunkIteratorImpl is the 64 bit implementation of the ChunkIterator interface, which efficiently returns the chunks of ones and zeros represented by an EWAHIterator.
Author
Gregory Ssi-Yan-Kai

Field Summary

Modifier and TypeField and Description
private final Buffer
private final EWAHIterator
private boolean
private Boolean
private int
private int
private boolean
private int
private final int
private long
private int
private long
private int

Constructor Summary

AccessConstructor and Description
pack-priv
ChunkIteratorImpl(EWAHIterator ewahIter, int sizeInBits)

Method Summary

Modifier and TypeMethod and Description
private boolean
public boolean
private boolean
private boolean
public void
move()

Implements com.googlecode.javaewah.ChunkIterator.move.

Move the iterator at the next different bit

public void
move(int
the number of bits to skip
bits
)

Implements com.googlecode.javaewah.ChunkIterator.move.

Move the iterator at the next ith bit

private void
movePosition(int offset)

private boolean
public boolean
nextBit()

Implements com.googlecode.javaewah.ChunkIterator.nextBit.

Return the next bit

public int
nextLength()

Implements com.googlecode.javaewah.ChunkIterator.nextLength.

Return the length of the next bit

private RunningLengthWord
private boolean
private int
private void
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private final Buffer buffer
ewahIterback to summary
private final EWAHIterator ewahIter
hasNextback to summary
private boolean hasNext
nextBitback to summary
private Boolean nextBit
nextLengthback to summary
private int nextLength
positionback to summary
private int position
runningBitback to summary
private boolean runningBit
runningLengthback to summary
private int runningLength
sizeInBitsback to summary
private final int sizeInBits
wordback to summary
private long word
wordLengthback to summary
private int wordLength
wordMaskback to summary
private long wordMask
wordPositionback to summary
private int wordPosition

Constructor Detail

ChunkIteratorImplback to summary
pack-priv ChunkIteratorImpl(EWAHIterator ewahIter, int sizeInBits)

Method Detail

currentWordBitback to summary
private boolean currentWordBit()
hasNextback to summary
public boolean hasNext()

Implements com.googlecode.javaewah.ChunkIterator.hasNext.

Doc from com.googlecode.javaewah.ChunkIterator.hasNext.

Is there more?

Returns:boolean

true, if there is more, false otherwise

Annotations
@Override
hasNextRLWback to summary
private boolean hasNextRLW()
literalHasNextback to summary
private boolean literalHasNext()
moveback to summary
public void move()

Implements com.googlecode.javaewah.ChunkIterator.move.

Doc from com.googlecode.javaewah.ChunkIterator.move.

Move the iterator at the next different bit

Annotations
@Override
moveback to summary
public void move(int bits)

Implements com.googlecode.javaewah.ChunkIterator.move.

Doc from com.googlecode.javaewah.ChunkIterator.move.

Move the iterator at the next ith bit

Parameters
bits:int

the number of bits to skip

Annotations
@Override
movePositionback to summary
private void movePosition(int offset)
moveToNextRLWback to summary
private boolean moveToNextRLW()
nextBitback to summary
public boolean nextBit()

Implements com.googlecode.javaewah.ChunkIterator.nextBit.

Doc from com.googlecode.javaewah.ChunkIterator.nextBit.

Return the next bit

Returns:boolean

the bit

Annotations
@Override
nextLengthback to summary
public int nextLength()

Implements com.googlecode.javaewah.ChunkIterator.nextLength.

Doc from com.googlecode.javaewah.ChunkIterator.nextLength.

Return the length of the next bit

Returns:int

the length

Annotations
@Override
nextRLWback to summary
private RunningLengthWord nextRLW()
runningHasNextback to summary
private boolean runningHasNext()
runningOffsetback to summary
private int runningOffset()
setRLWback to summary
private void setRLW(RunningLengthWord rlw)
shiftWordMaskback to summary
private void shiftWordMask()
updateNextback to summary
private void updateNext()