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 BitmapStoragenewData - the wordpublic void addLiteralWord(long newData)
addLiteralWord in interface BitmapStoragenewData - the wordpublic void addStreamOfLiteralWords(com.googlecode.javaewah.Buffer buffer,
int start,
int number)
addStreamOfLiteralWords in interface BitmapStoragebuffer - 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 BitmapStoragev - zeros or onesnumber - how many to words addpublic void addStreamOfNegatedLiteralWords(com.googlecode.javaewah.Buffer buffer,
int start,
int number)
addStreamOfNegatedLiteralWords in interface BitmapStoragebuffer - the buffer wrapping the literal wordsstart - the starting point in the arraynumber - the number of literal words to addpublic void clear()
BitmapStorageclear in interface BitmapStoragepublic int getCount()
public void setSizeInBitsWithinLastWord(int bits)
setSizeInBitsWithinLastWord in interface BitmapStoragebits - number of bitsCopyright © 2015. All Rights Reserved.