Class WrappedBitSetBitmap
- java.lang.Object
-
- org.apache.druid.collections.bitmap.WrappedImmutableBitSetBitmap
-
- org.apache.druid.collections.bitmap.WrappedBitSetBitmap
-
- All Implemented Interfaces:
ImmutableBitmap,MutableBitmap
public class WrappedBitSetBitmap extends WrappedImmutableBitSetBitmap implements MutableBitmap
WrappedBitSetBitmap implements MutableBitmap for java.util.BitSet
-
-
Field Summary
-
Fields inherited from class org.apache.druid.collections.bitmap.WrappedImmutableBitSetBitmap
bitmap
-
-
Constructor Summary
Constructors Constructor Description WrappedBitSetBitmap()WrappedBitSetBitmap(ByteBuffer byteBuffer)WrappedBitSetBitmap(BitSet bitSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int entry)Add the specified integer to the bitmap.voidand(MutableBitmap mutableBitmap)voidandNot(MutableBitmap mutableBitmap)voidclear()Empties the content of this bitmap.protected BitSetcloneBitSet()intgetSizeInBytes()Return 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, union
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.collections.bitmap.ImmutableBitmap
batchIterator, get, intersection, isEmpty, iterator, peekableIterator, size, toBytes, union
-
-
-
-
Constructor Detail
-
WrappedBitSetBitmap
public WrappedBitSetBitmap()
-
WrappedBitSetBitmap
public WrappedBitSetBitmap(BitSet bitSet)
-
WrappedBitSetBitmap
public WrappedBitSetBitmap(ByteBuffer byteBuffer)
-
-
Method Detail
-
cloneBitSet
protected BitSet cloneBitSet()
-
clear
public void clear()
Description copied from interface:MutableBitmapEmpties the content of this bitmap.- Specified by:
clearin interfaceMutableBitmap
-
or
public void or(MutableBitmap mutableBitmap)
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
public void and(MutableBitmap mutableBitmap)
-
andNot
public void andNot(MutableBitmap mutableBitmap)
-
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
public void serialize(ByteBuffer buffer)
-
-