Interface MutableBitmap
- All Superinterfaces:
ImmutableBitmap
- All Known Implementing Classes:
WrappedBitSetBitmap,WrappedConciseBitmap,WrappedRoaringBitmap
This class is meant to represent a simple wrapper around a bitmap class.
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int entry) Add the specified integer to the bitmap.voidclear()Empties the content of this bitmap.intReturn the size in bytes for the purpose of serialization to a ByteBuffer.voidor(MutableBitmap mutableBitmap) Compute the bitwise-or of this bitmap with another bitmap.voidremove(int entry) Remove the specified integer to the bitmap.Methods inherited from interface org.apache.druid.collections.bitmap.ImmutableBitmap
batchIterator, get, intersection, isEmpty, iterator, peekableIterator, size, toBytes, union
-
Method Details
-
clear
void clear()Empties the content of this bitmap. -
or
Compute the bitwise-or of this bitmap with another bitmap. The current bitmap is modified whereas the other bitmap is left intact. Note that the other bitmap should be of the same class instance.- Parameters:
mutableBitmap- other bitmap
-
getSizeInBytes
int getSizeInBytes()Return the size in bytes for the purpose of serialization to a ByteBuffer. Note that this is distinct from the memory usage.- Returns:
- the total set in bytes
-
add
void add(int entry) Add the specified integer to the bitmap. This is equivalent to setting the ith bit to the value 1.- Parameters:
entry- integer to be added
-
remove
void remove(int entry) Remove the specified integer to the bitmap. This is equivalent to setting the ith bit to the value 1.- Parameters:
entry- integer to be remove
-