Package com.googlecode.javaewah
Class RunningLengthWord
- java.lang.Object
-
- com.googlecode.javaewah.RunningLengthWord
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class RunningLengthWord extends java.lang.Object implements java.lang.CloneableMostly for internal use.- Since:
- 0.1.0
- Author:
- Daniel Lemire
-
-
Field Summary
Fields Modifier and Type Field Description static intlargestliteralcountlargest number of literal words in a run.static longlargestrunninglengthcountlargest number of clean words in a runEWAHCompressedBitmapparentThe array of words.intpositionThe position in array.static intrunninglengthbitsnumber of bits dedicated to marking of the running length of clean words
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RunningLengthWordclone()intgetNumberOfLiteralWords()Gets the number of literal words.booleangetRunningBit()Gets the running bit.longgetRunningLength()Gets the running length.voidsetNumberOfLiteralWords(long number)Sets the number of literal words.voidsetRunningBit(boolean b)Sets the running bit.voidsetRunningLength(long number)Sets the running length.longsize()Return the size in uncompressed words represented by this running length word.java.lang.StringtoString()
-
-
-
Field Detail
-
parent
public EWAHCompressedBitmap parent
The array of words.
-
position
public int position
The position in array.
-
runninglengthbits
public static final int runninglengthbits
number of bits dedicated to marking of the running length of clean words- See Also:
- Constant Field Values
-
largestliteralcount
public static final int largestliteralcount
largest number of literal words in a run.- See Also:
- Constant Field Values
-
largestrunninglengthcount
public static final long largestrunninglengthcount
largest number of clean words in a run- See Also:
- Constant Field Values
-
-
Method Detail
-
getNumberOfLiteralWords
public int getNumberOfLiteralWords()
Gets the number of literal words.- Returns:
- the number of literal words
-
getRunningBit
public boolean getRunningBit()
Gets the running bit.- Returns:
- the running bit
-
getRunningLength
public long getRunningLength()
Gets the running length.- Returns:
- the running length
-
setNumberOfLiteralWords
public void setNumberOfLiteralWords(long number)
Sets the number of literal words.- Parameters:
number- the new number of literal words
-
setRunningBit
public void setRunningBit(boolean b)
Sets the running bit.- Parameters:
b- the new running bit
-
setRunningLength
public void setRunningLength(long number)
Sets the running length.- Parameters:
number- the new running length
-
size
public long size()
Return the size in uncompressed words represented by this running length word.- Returns:
- the size
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
clone
public RunningLengthWord clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-