|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavaewah.BitCounter
public final class BitCounter
BitCounter is a fake bitset data structure. Instead of storing the actual data, it only records the number of set bits.
| Constructor Summary | |
|---|---|
BitCounter()
|
|
| Method Summary | |
|---|---|
int |
add(long newdata)
Virtually add words directly to the bitmap |
long |
addStreamOfDirtyWords(long[] data,
long start,
long number)
virtually add several dirty words. |
int |
addStreamOfEmptyWords(boolean v,
long number)
virtually add many zeroes or ones. |
long |
addStreamOfNegatedDirtyWords(long[] data,
long start,
long number)
virtually add several negated dirty words. |
int |
getCount()
As you act on this class, it records the number of set (true) bits. |
void |
setSizeInBits(int bits)
should directly set the sizeinbits field, but is effectively ignored in this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitCounter()
| Method Detail |
|---|
public int add(long newdata)
add in interface BitmapStoragenewdata - the word
public int addStreamOfEmptyWords(boolean v,
long number)
addStreamOfEmptyWords in interface BitmapStoragev - zeros or onesnumber - how many to words add
public long addStreamOfDirtyWords(long[] data,
long start,
long number)
addStreamOfDirtyWords in interface BitmapStoragedata - the dirty wordsstart - the starting point in the arraynumber - the number of dirty words to add
public long addStreamOfNegatedDirtyWords(long[] data,
long start,
long number)
addStreamOfNegatedDirtyWords in interface BitmapStoragedata - the dirty wordsstart - the starting point in the arraynumber - the number of dirty words to add
public void setSizeInBits(int bits)
setSizeInBits in interface BitmapStoragebits - number of bitspublic int getCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||