Class NonEmptyVirtualStorage32
java.lang.Object
com.googlecode.javaewah32.NonEmptyVirtualStorage32
- All Implemented Interfaces:
BitmapStorage32
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.
- Since:
- 0.5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLiteralWord(int newData) If the word to be added is non-zero, a NonEmptyException exception is thrown.voidaddStreamOfEmptyWords(boolean v, int number) If the boolean value is true and number is greater than 0, then it throws a NonEmptyException exception, otherwise, nothing happens.voidaddStreamOfLiteralWords(Buffer32 buffer, int start, int number) throws a NonEmptyException exception when number is greater than 0voidaddStreamOfNegatedLiteralWords(Buffer32 buffer, int start, int number) throws a NonEmptyException exception when number is greater than 0voidaddWord(int newData) If the word to be added is non-zero, a NonEmptyException exception is thrown.voidclear()Empties the container.voidsetSizeInBitsWithinLastWord(int bits) Does nothing.
-
Field Details
-
nonEmptyException
-
-
Constructor Details
-
NonEmptyVirtualStorage32
public NonEmptyVirtualStorage32()
-
-
Method Details
-
addWord
public void addWord(int newData) If the word to be added is non-zero, a NonEmptyException exception is thrown.- Specified by:
addWordin interfaceBitmapStorage32- Parameters:
newData- the word
-
addLiteralWord
public void addLiteralWord(int newData) If the word to be added is non-zero, a NonEmptyException exception is thrown.- Specified by:
addLiteralWordin interfaceBitmapStorage32- Parameters:
newData- the word
-
addStreamOfLiteralWords
throws a NonEmptyException exception when number is greater than 0- Specified by:
addStreamOfLiteralWordsin interfaceBitmapStorage32- Parameters:
buffer- the buffer wrapping the literal wordsstart- the starting point in the arraynumber- the number of literal words to add
-
addStreamOfEmptyWords
public void addStreamOfEmptyWords(boolean v, int number) If the boolean value is true and number is greater than 0, then it throws a NonEmptyException exception, otherwise, nothing happens.- Specified by:
addStreamOfEmptyWordsin interfaceBitmapStorage32- Parameters:
v- zeros or onesnumber- how many to words add
-
addStreamOfNegatedLiteralWords
throws a NonEmptyException exception when number is greater than 0- Specified by:
addStreamOfNegatedLiteralWordsin interfaceBitmapStorage32- Parameters:
buffer- the buffer wrapping the literal wordsstart- the starting point in the arraynumber- the number of literal words to add
-
clear
public void clear()Description copied from interface:BitmapStorage32Empties the container.- Specified by:
clearin interfaceBitmapStorage32
-
setSizeInBitsWithinLastWord
public void setSizeInBitsWithinLastWord(int bits) Does nothing.- Specified by:
setSizeInBitsWithinLastWordin interfaceBitmapStorage32- Parameters:
bits- the size in bits- See Also:
-