public final class BitCounter extends Object implements BitmapStorage
Constructor and Description |
---|
BitCounter() |
Modifier and Type | Method and Description |
---|---|
void |
addLiteralWord(long newData)
Virtually add literal words directly to the bitmap
|
void |
addStreamOfEmptyWords(boolean v,
long number)
virtually add many zeroes or ones.
|
void |
addStreamOfLiteralWords(com.googlecode.javaewah.Buffer buffer,
int start,
int number)
virtually add several literal words.
|
void |
addStreamOfNegatedLiteralWords(com.googlecode.javaewah.Buffer buffer,
int start,
int number)
virtually add several negated literal words.
|
void |
addWord(long newData)
Virtually add words directly to the bitmap
|
void |
clear()
Empties the container.
|
int |
getCount()
As you act on this class, it records the number of set (true) bits.
|
void |
setSizeInBitsWithinLastWord(int bits)
should directly set the sizeInBits field, but is effectively ignored
in this class.
|
public void addWord(long newData)
addWord
in interface BitmapStorage
newData
- the wordpublic void addLiteralWord(long newData)
addLiteralWord
in interface BitmapStorage
newData
- the wordpublic void addStreamOfLiteralWords(com.googlecode.javaewah.Buffer buffer, int start, int number)
addStreamOfLiteralWords
in interface BitmapStorage
buffer
- the buffer wrapping the literal wordsstart
- the starting point in the arraynumber
- the number of literal words to addpublic void addStreamOfEmptyWords(boolean v, long number)
addStreamOfEmptyWords
in interface BitmapStorage
v
- zeros or onesnumber
- how many to words addpublic void addStreamOfNegatedLiteralWords(com.googlecode.javaewah.Buffer buffer, int start, int number)
addStreamOfNegatedLiteralWords
in interface BitmapStorage
buffer
- the buffer wrapping the literal wordsstart
- the starting point in the arraynumber
- the number of literal words to addpublic void clear()
BitmapStorage
clear
in interface BitmapStorage
public int getCount()
public void setSizeInBitsWithinLastWord(int bits)
setSizeInBitsWithinLastWord
in interface BitmapStorage
bits
- number of bitsCopyright © 2016. All Rights Reserved.