Class WrappedBitSetBitmap
java.lang.Object
org.apache.druid.collections.bitmap.WrappedImmutableBitSetBitmap
org.apache.druid.collections.bitmap.WrappedBitSetBitmap
- All Implemented Interfaces:
ImmutableBitmap,MutableBitmap
WrappedBitSetBitmap implements MutableBitmap for java.util.BitSet
-
Field Summary
Fields inherited from class org.apache.druid.collections.bitmap.WrappedImmutableBitSetBitmap
bitmap -
Constructor Summary
ConstructorsConstructorDescriptionWrappedBitSetBitmap(ByteBuffer byteBuffer) WrappedBitSetBitmap(BitSet bitSet) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int entry) Add the specified integer to the bitmap.voidand(MutableBitmap mutableBitmap) voidandNot(MutableBitmap mutableBitmap) voidclear()Empties the content of this bitmap.protected BitSetintReturn 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.voidserialize(ByteBuffer buffer) Methods inherited from class org.apache.druid.collections.bitmap.WrappedImmutableBitSetBitmap
get, intersection, isEmpty, iterator, size, toBytes, unionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.collections.bitmap.ImmutableBitmap
batchIterator, get, intersection, isEmpty, iterator, peekableIterator, size, toBytes, union
-
Constructor Details
-
WrappedBitSetBitmap
public WrappedBitSetBitmap() -
WrappedBitSetBitmap
-
WrappedBitSetBitmap
-
-
Method Details
-
cloneBitSet
-
clear
public void clear()Description copied from interface:MutableBitmapEmpties the content of this bitmap.- Specified by:
clearin interfaceMutableBitmap
-
or
Description copied from interface:MutableBitmapCompute 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.- Specified by:
orin interfaceMutableBitmap- Parameters:
mutableBitmap- other bitmap
-
and
-
andNot
-
getSizeInBytes
public int getSizeInBytes()Description copied from interface:MutableBitmapReturn the size in bytes for the purpose of serialization to a ByteBuffer. Note that this is distinct from the memory usage.- Specified by:
getSizeInBytesin interfaceMutableBitmap- Returns:
- the total set in bytes
-
add
public void add(int entry) Description copied from interface:MutableBitmapAdd the specified integer to the bitmap. This is equivalent to setting the ith bit to the value 1.- Specified by:
addin interfaceMutableBitmap- Parameters:
entry- integer to be added
-
remove
public void remove(int entry) Description copied from interface:MutableBitmapRemove the specified integer to the bitmap. This is equivalent to setting the ith bit to the value 1.- Specified by:
removein interfaceMutableBitmap- Parameters:
entry- integer to be remove
-
serialize
-