Top Description Fields Constructors Methods
com.googlecode.javaewah32

public final Class BufferedRunningLengthWord32

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

Mostly for internal use. Similar to RunningLengthWord, but can be modified without access to the array, and has faster access.
Author
Daniel Lemire
Since
0.5.0

Field Summary

Modifier and TypeField and Description
public int
literalWordOffset

how many literal words have we read so far?

protected int
NumberOfLiteralWords

The Number of literal words.

public boolean
RunningBit

The Running bit.

public int
RunningLength

The Running length.

Constructor Summary

AccessConstructor and Description
public
BufferedRunningLengthWord32(final int
the word
a
)

Instantiates a new buffered running length word.

public
BufferedRunningLengthWord32(final RunningLengthWord32
the rlw
rlw
)

Instantiates a new buffered running length word.

Method Summary

Modifier and TypeMethod and Description
public BufferedRunningLengthWord32
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.

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

Discard first words.

public int

Returns:

the number of literal words
getNumberOfLiteralWords
()

Gets the number of literal words.

public boolean

Returns:

the running bit
getRunningBit
()

Gets the running bit.

public int

Returns:

the running length
getRunningLength
()

Gets the running length.

public void
reset(final int
the word
a
)

Reset the values using the provided word.

public void
reset(final RunningLengthWord32
the other running length word
rlw
)

Reset the values of this running length word so that it has the same values as the other running length word.

public void
setNumberOfLiteralWords(final int
the new number of literal words
number
)

Sets the number of literal words.

public void
setRunningBit(final boolean
the new running bit
b
)

Sets the running bit.

public void
setRunningLength(final int
the new running length
number
)

Sets the running length.

public int

Returns:

the int
size
()

Size in uncompressed words.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

literalWordOffsetback to summary
public int literalWordOffset

how many literal words have we read so far?

NumberOfLiteralWordsback to summary
protected int NumberOfLiteralWords

The Number of literal words.

RunningBitback to summary
public boolean RunningBit

The Running bit.

RunningLengthback to summary
public int RunningLength

The Running length.

Constructor Detail

BufferedRunningLengthWord32back to summary
public BufferedRunningLengthWord32(final int a)

Instantiates a new buffered running length word.

Parameters
a:int

the word

BufferedRunningLengthWord32back to summary
public BufferedRunningLengthWord32(final RunningLengthWord32 rlw)

Instantiates a new buffered running length word.

Parameters
rlw:RunningLengthWord32

the rlw

Method Detail

cloneback to summary
public BufferedRunningLengthWord32 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:BufferedRunningLengthWord32

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.
discardFirstWordsback to summary
public void discardFirstWords(int x)

Discard first words.

Parameters
x:int

the number of words to be discarded

getNumberOfLiteralWordsback to summary
public int getNumberOfLiteralWords()

Gets the number of literal words.

Returns:int

the number of literal words

getRunningBitback to summary
public boolean getRunningBit()

Gets the running bit.

Returns:boolean

the running bit

getRunningLengthback to summary
public int getRunningLength()

Gets the running length.

Returns:int

the running length

resetback to summary
public void reset(final int a)

Reset the values using the provided word.

Parameters
a:int

the word

resetback to summary
public void reset(final RunningLengthWord32 rlw)

Reset the values of this running length word so that it has the same values as the other running length word.

Parameters
rlw:RunningLengthWord32

the other running length word

setNumberOfLiteralWordsback to summary
public void setNumberOfLiteralWords(final int number)

Sets the number of literal words.

Parameters
number:int

the new number of literal words

setRunningBitback to summary
public void setRunningBit(final boolean b)

Sets the running bit.

Parameters
b:boolean

the new running bit

setRunningLengthback to summary
public void setRunningLength(final int number)

Sets the running length.

Parameters
number:int

the new running length

sizeback to summary
public int size()

Size in uncompressed words.

Returns:int

the int

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override