Top Description Inners Fields Constructors Methods
com.googlecode.javaewah

public Class NonEmptyVirtualStorage

extends Object
implements BitmapStorage
Class Inheritance
All Implemented Interfaces
com.googlecode.javaewah.BitmapStorage

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.
Author
Daniel Lemire and Veronika Zenz
Since
0.4.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final NonEmptyVirtualStorage.NonEmptyException

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addLiteralWord(long
the word
newData
)

Implements com.googlecode.javaewah.BitmapStorage.addLiteralWord.

If the word to be added is non-zero, a NonEmptyException exception is thrown.

public void
addStreamOfEmptyWords(boolean
zeros or ones
v
,
long
how many to words add
number
)

Implements com.googlecode.javaewah.BitmapStorage.addStreamOfEmptyWords.

If the boolean value is true and number is greater than 0, then it throws a NonEmptyException exception, otherwise, nothing happens.

public void
addStreamOfLiteralWords(Buffer
the buffer wrapping the literal words
buffer
,
int
the starting point in the array
start
,
int
the number of literal words to add
number
)

Implements com.googlecode.javaewah.BitmapStorage.addStreamOfLiteralWords.

throws a NonEmptyException exception when number is greater than 0

public void
addStreamOfNegatedLiteralWords(Buffer
the buffer wrapping the literal words
buffer
,
int
the starting point in the array
start
,
int
the number of literal words to add
number
)

Implements com.googlecode.javaewah.BitmapStorage.addStreamOfNegatedLiteralWords.

throws a NonEmptyException exception when number is greater than 0

public void
addWord(long
the word
newData
)

Implements com.googlecode.javaewah.BitmapStorage.addWord.

If the word to be added is non-zero, a NonEmptyException exception is thrown.

public void
clear()

Implements com.googlecode.javaewah.BitmapStorage.clear.

Empties the container.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nonEmptyExceptionback to summary
private static final NonEmptyVirtualStorage.NonEmptyException nonEmptyException

Constructor Detail

NonEmptyVirtualStorageback to summary
public NonEmptyVirtualStorage()

Method Detail

addLiteralWordback to summary
public void addLiteralWord(long newData)

Implements com.googlecode.javaewah.BitmapStorage.addLiteralWord.

If the word to be added is non-zero, a NonEmptyException exception is thrown.

Parameters
newData:long

Doc from com.googlecode.javaewah.BitmapStorage.addLiteralWord.

the word

Annotations
@Override
See Also
com.googlecode.javaewah.BitmapStorage#addWord(long)
addStreamOfEmptyWordsback to summary
public void addStreamOfEmptyWords(boolean v, long number)

Implements com.googlecode.javaewah.BitmapStorage.addStreamOfEmptyWords.

If the boolean value is true and number is greater than 0, then it throws a NonEmptyException exception, otherwise, nothing happens.

Parameters
v:boolean

Doc from com.googlecode.javaewah.BitmapStorage.addStreamOfEmptyWords.

zeros or ones

number:long

Doc from com.googlecode.javaewah.BitmapStorage.addStreamOfEmptyWords.

how many to words add

Annotations
@Override
See Also
com.googlecode.javaewah.BitmapStorage#addStreamOfEmptyWords(boolean, long)
addStreamOfLiteralWordsback to summary
public void addStreamOfLiteralWords(Buffer buffer, int start, int number)

Implements com.googlecode.javaewah.BitmapStorage.addStreamOfLiteralWords.

throws a NonEmptyException exception when number is greater than 0

Parameters
buffer:Buffer

Doc from com.googlecode.javaewah.BitmapStorage.addStreamOfLiteralWords.

the buffer wrapping the literal words

start:int

Doc from com.googlecode.javaewah.BitmapStorage.addStreamOfLiteralWords.

the starting point in the array

number:int

Doc from com.googlecode.javaewah.BitmapStorage.addStreamOfLiteralWords.

the number of literal words to add

Annotations
@Override
addStreamOfNegatedLiteralWordsback to summary
public void addStreamOfNegatedLiteralWords(Buffer buffer, int start, int number)

Implements com.googlecode.javaewah.BitmapStorage.addStreamOfNegatedLiteralWords.

throws a NonEmptyException exception when number is greater than 0

Parameters
buffer:Buffer

Doc from com.googlecode.javaewah.BitmapStorage.addStreamOfNegatedLiteralWords.

the buffer wrapping the literal words

start:int

Doc from com.googlecode.javaewah.BitmapStorage.addStreamOfNegatedLiteralWords.

the starting point in the array

number:int

Doc from com.googlecode.javaewah.BitmapStorage.addStreamOfNegatedLiteralWords.

the number of literal words to add

Annotations
@Override
addWordback to summary
public void addWord(long newData)

Implements com.googlecode.javaewah.BitmapStorage.addWord.

If the word to be added is non-zero, a NonEmptyException exception is thrown.

Parameters
newData:long

Doc from com.googlecode.javaewah.BitmapStorage.addWord.

the word

Annotations
@Override
See Also
com.googlecode.javaewah.BitmapStorage#addWord(long)
clearback to summary
public void clear()

Implements com.googlecode.javaewah.BitmapStorage.clear.

Doc from com.googlecode.javaewah.BitmapStorage.clear.

Empties the container.

Annotations
@Override
setSizeInBitsWithinLastWordback to summary
public void setSizeInBitsWithinLastWord(int bits)

Implements com.googlecode.javaewah.BitmapStorage.setSizeInBitsWithinLastWord.

Does nothing.

Parameters
bits:int

Doc from com.googlecode.javaewah.BitmapStorage.setSizeInBitsWithinLastWord.

the size in bits

Annotations
@Override
See Also
com.googlecode.javaewah.BitmapStorage#setSizeInBitsWithinLastWord(int)
com.googlecode.javaewah back to summary

pack-priv Class NonEmptyVirtualStorage.NonEmptyException

extends RuntimeException
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public synchronized Throwable

Returns:

this instance
fillInStackTrace
()

Overrides java.lang.Throwable.fillInStackTrace.

Do not fill in the stack trace for this exception for performance reasons.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Constructor Detail

NonEmptyExceptionback to summary
pack-priv NonEmptyException()

Method Detail

fillInStackTraceback to summary
public synchronized Throwable fillInStackTrace()

Overrides java.lang.Throwable.fillInStackTrace.

Do not fill in the stack trace for this exception for performance reasons.

Returns:Throwable

this instance

Annotations
@Override
See Also
java.lang.Throwable#fillInStackTrace()