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 void
add(int entry)
Add the specified integer to the bitmap.void
and(MutableBitmap mutableBitmap)
void
andNot(MutableBitmap mutableBitmap)
void
clear()
Empties the content of this bitmap.protected BitSet
cloneBitSet()
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.void
serialize(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
-
-
-
-
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:MutableBitmap
Empties the content of this bitmap.- Specified by:
clear
in interfaceMutableBitmap
-
or
public void or(MutableBitmap mutableBitmap)
Description copied from interface: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.- Specified by:
or
in 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:MutableBitmap
Return the size in bytes for the purpose of serialization to a ByteBuffer. Note that this is distinct from the memory usage.- Specified by:
getSizeInBytes
in interfaceMutableBitmap
- Returns:
- the total set in bytes
-
add
public void add(int entry)
Description copied from interface:MutableBitmap
Add the specified integer to the bitmap. This is equivalent to setting the ith bit to the value 1.- Specified by:
add
in interfaceMutableBitmap
- Parameters:
entry
- integer to be added
-
remove
public void remove(int entry)
Description copied from interface:MutableBitmap
Remove the specified integer to the bitmap. This is equivalent to setting the ith bit to the value 1.- Specified by:
remove
in interfaceMutableBitmap
- Parameters:
entry
- integer to be remove
-
serialize
public void serialize(ByteBuffer buffer)
-
-