Interface MutableBitmap
-
- All Superinterfaces:
ImmutableBitmap
- All Known Implementing Classes:
WrappedBitSetBitmap
,WrappedConciseBitmap
,WrappedRoaringBitmap
public interface MutableBitmap extends ImmutableBitmap
This class is meant to represent a simple wrapper around a bitmap class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(int entry)
Add the specified integer to the bitmap.void
clear()
Empties the content of this bitmap.int
getSizeInBytes()
Return the size in bytes for the purpose of serialization to a ByteBuffer.void
or(MutableBitmap mutableBitmap)
Compute the bitwise-or of this bitmap with another bitmap.void
remove(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 Detail
-
clear
void clear()
Empties the content of this bitmap.
-
or
void or(MutableBitmap mutableBitmap)
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
-
-