Class WrappedImmutableBitSetBitmap
java.lang.Object
org.apache.druid.collections.bitmap.WrappedImmutableBitSetBitmap
- All Implemented Interfaces:
ImmutableBitmap
- Direct Known Subclasses:
WrappedBitSetBitmap
WrappedImmutableBitSetBitmap implements ImmutableBitmap for java.util.BitSet
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWrappedImmutableBitSetBitmap(ByteBuffer byteBuffer) WrappedImmutableBitSetBitmap(BitSet bitmap) -
Method Summary
Modifier and TypeMethodDescriptionbooleanget(int value) Returns true if the bit at position value is setintersection(ImmutableBitmap otherBitmap) Compute the bitwise-and of this bitmap with another bitmap.booleanisEmpty()org.roaringbitmap.IntIteratoriterator()intsize()byte[]toBytes()union(ImmutableBitmap otherBitmap) Compute the bitwise-or of this bitmap with another bitmap.Methods 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, peekableIterator
-
Field Details
-
bitmap
-
-
Constructor Details
-
WrappedImmutableBitSetBitmap
-
WrappedImmutableBitSetBitmap
public WrappedImmutableBitSetBitmap() -
WrappedImmutableBitSetBitmap
-
-
Method Details
-
iterator
public org.roaringbitmap.IntIterator iterator()- Specified by:
iteratorin interfaceImmutableBitmap- Returns:
- an iterator over the set bits of this bitmap
-
get
public boolean get(int value) Description copied from interface:ImmutableBitmapReturns true if the bit at position value is set- Specified by:
getin interfaceImmutableBitmap- Parameters:
value- the position to check- Returns:
- true if bit is set
-
size
public int size()- Specified by:
sizein interfaceImmutableBitmap- Returns:
- The number of bits set to true in this bitmap
-
toBytes
public byte[] toBytes()- Specified by:
toBytesin interfaceImmutableBitmap
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceImmutableBitmap- Returns:
- True if this bitmap is empty (contains no set bit)
-
union
Description copied from interface:ImmutableBitmapCompute the bitwise-or of this bitmap with another bitmap. A new bitmap is generated. Note that the other bitmap should be of the same class instance.- Specified by:
unionin interfaceImmutableBitmap- Parameters:
otherBitmap- other bitmap
-
intersection
Description copied from interface:ImmutableBitmapCompute the bitwise-and of this bitmap with another bitmap. A new bitmap is generated. Note that the other bitmap should be of the same class instance.- Specified by:
intersectionin interfaceImmutableBitmap- Parameters:
otherBitmap- other bitmap
-