|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.javaewah.NonEmptyVirtualStorage
public class NonEmptyVirtualStorage
This is a BitmapStorage that can be used to determine quickly if the result of an operation is non-trivial... that is, whether there will be at least on set bit.
Constructor Summary | |
---|---|
NonEmptyVirtualStorage()
|
Method Summary | |
---|---|
void |
addStreamOfEmptyWords(boolean v,
long number)
If the boolean value is true and number is greater than 0, then it throws a NonEmptyException exception, otherwise, nothing happens. |
void |
addStreamOfLiteralWords(long[] data,
int start,
int number)
throws a NonEmptyException exception when number is greater than 0 |
void |
addStreamOfNegatedLiteralWords(long[] data,
int start,
int number)
throws a NonEmptyException exception when number is greater than 0 |
void |
addWord(long newdata)
If the word to be added is non-zero, a NonEmptyException exception is thrown. |
void |
clear()
Empties the container. |
void |
setSizeInBits(int bits)
Does nothing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NonEmptyVirtualStorage()
Method Detail |
---|
public void addWord(long newdata)
addWord
in interface BitmapStorage
newdata
- the wordBitmapStorage.addWord(long)
public void addStreamOfLiteralWords(long[] data, int start, int number)
addStreamOfLiteralWords
in interface BitmapStorage
data
- 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 addBitmapStorage.addStreamOfEmptyWords(boolean,
long)
public void addStreamOfNegatedLiteralWords(long[] data, int start, int number)
addStreamOfNegatedLiteralWords
in interface BitmapStorage
data
- the literal wordsstart
- the starting point in the arraynumber
- the number of literal words to addpublic void clear()
BitmapStorage
clear
in interface BitmapStorage
public void setSizeInBits(int bits)
setSizeInBits
in interface BitmapStorage
bits
- number of bitsBitmapStorage.setSizeInBits(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |