Top Description Fields Constructors Methods
com.googlecode.javaewah32

public Class BufferedIterator32

extends Object
implements IteratingRLW32, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, com.googlecode.javaewah32.IteratingRLW32
Imports
com.googlecode.javaewah.CloneableIterator

This class can be used to iterate over blocks of bitmap data.
Author
Daniel Lemire

Field Summary

Modifier and TypeField and Description
private IteratingBufferedRunningLengthWord32
private CloneableIterator<EWAHIterator32>

Constructor Summary

AccessConstructor and Description
public
BufferedIterator32(final CloneableIterator<EWAHIterator32>
iterator
iterator
)

Instantiates a new iterating buffered running length word.

Method Summary

Modifier and TypeMethod and Description
public BufferedIterator32
clone()

Overrides java.lang.Object.clone.

Implements com.googlecode.javaewah32.IteratingRLW32.clone.

Creates and returns a copy of this object.

public void
discardFirstWords(int
the number of words to be discarded
x
)

Implements com.googlecode.javaewah32.IteratingRLW32.discardFirstWords.

Discard first words, iterating to the next running length word if needed.

public void
discardLiteralWords(int
the number of words to discard
x
)

Implements com.googlecode.javaewah32.IteratingRLW32.discardLiteralWords.

Discard x literal words (assumes that there is no running word)

public void
public int

Returns:

the literal word
getLiteralWordAt
(int
zero based index
index
)

Implements com.googlecode.javaewah32.IteratingRLW32.getLiteralWordAt.

Get the nth literal word for the current running length word

public int

Returns:

the number of literal words
getNumberOfLiteralWords
()

Implements com.googlecode.javaewah32.IteratingRLW32.getNumberOfLiteralWords.

Gets the number of literal words for the current running length word.

public boolean

Returns:

the running bit
getRunningBit
()

Implements com.googlecode.javaewah32.IteratingRLW32.getRunningBit.

Gets the running bit.

public int

Returns:

the running length
getRunningLength
()

Implements com.googlecode.javaewah32.IteratingRLW32.getRunningLength.

Gets the running length.

public boolean

Returns:

whether the move was possible
next
()

Implements com.googlecode.javaewah32.IteratingRLW32.next.

Move to the next RunningLengthWord

public int

Returns:

the size
size
()

Implements com.googlecode.javaewah32.IteratingRLW32.size.

Size in uncompressed words of the current running length word.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

iteratingBrlwback to summary
private IteratingBufferedRunningLengthWord32 iteratingBrlw
masterIteratorback to summary
private CloneableIterator<EWAHIterator32> masterIterator

Constructor Detail

BufferedIterator32back to summary
public BufferedIterator32(final CloneableIterator<EWAHIterator32> iterator)

Instantiates a new iterating buffered running length word.

Parameters
iterator:CloneableIterator<EWAHIterator32>

iterator

Method Detail

cloneback to summary
public BufferedIterator32 clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Implements com.googlecode.javaewah32.IteratingRLW32.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:BufferedIterator32

Doc from com.googlecode.javaewah32.IteratingRLW32.clone.

a copy of the iterator

Annotations
@Override
Exceptions
CloneNotSupportedException:

Doc from com.googlecode.javaewah32.IteratingRLW32.clone.

this should not be thrown in theory

discardFirstWordsback to summary
public void discardFirstWords(int x)

Implements com.googlecode.javaewah32.IteratingRLW32.discardFirstWords.

Discard first words, iterating to the next running length word if needed.

Parameters
x:int

the number of words to be discarded

Annotations
@Override
discardLiteralWordsback to summary
public void discardLiteralWords(int x)

Implements com.googlecode.javaewah32.IteratingRLW32.discardLiteralWords.

Doc from com.googlecode.javaewah32.IteratingRLW32.discardLiteralWords.

Discard x literal words (assumes that there is no running word)

Parameters
x:int

the number of words to discard

Annotations
@Override
discardRunningWordsback to summary
public void discardRunningWords()

Implements com.googlecode.javaewah32.IteratingRLW32.discardRunningWords.

Doc from com.googlecode.javaewah32.IteratingRLW32.discardRunningWords.

Discard all running words

Annotations
@Override
getLiteralWordAtback to summary
public int getLiteralWordAt(int index)

Implements com.googlecode.javaewah32.IteratingRLW32.getLiteralWordAt.

Get the nth literal word for the current running length word

Parameters
index:int

zero based index

Returns:int

the literal word

Annotations
@Override
getNumberOfLiteralWordsback to summary
public int getNumberOfLiteralWords()

Implements com.googlecode.javaewah32.IteratingRLW32.getNumberOfLiteralWords.

Gets the number of literal words for the current running length word.

Returns:int

the number of literal words

Annotations
@Override
getRunningBitback to summary
public boolean getRunningBit()

Implements com.googlecode.javaewah32.IteratingRLW32.getRunningBit.

Gets the running bit. RunningBit

Returns:boolean

the running bit

Annotations
@Override
getRunningLengthback to summary
public int getRunningLength()

Implements com.googlecode.javaewah32.IteratingRLW32.getRunningLength.

Gets the running length.

Returns:int

the running length

Annotations
@Override
nextback to summary
public boolean next()

Implements com.googlecode.javaewah32.IteratingRLW32.next.

Move to the next RunningLengthWord

Returns:boolean

whether the move was possible

Annotations
@Override
sizeback to summary
public int size()

Implements com.googlecode.javaewah32.IteratingRLW32.size.

Size in uncompressed words of the current running length word.

Returns:int

the size

Annotations
@Override