Class WrappedImmutableRoaringBitmap
java.lang.Object
org.apache.druid.collections.bitmap.WrappedImmutableRoaringBitmap
- All Implemented Interfaces:
ImmutableBitmap
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWrappedImmutableRoaringBitmap(ByteBuffer byteBuffer) WrappedImmutableRoaringBitmap(org.roaringbitmap.buffer.ImmutableRoaringBitmap immutableRoaringBitmap) Wrap an ImmutableRoaringBitmap -
Method Summary
Modifier and TypeMethodDescriptionorg.roaringbitmap.BatchIteratorbooleanget(int value) Returns true if the bit at position value is setorg.roaringbitmap.buffer.ImmutableRoaringBitmapintersection(ImmutableBitmap otherBitmap) Compute the bitwise-and of this bitmap with another bitmap.booleanisEmpty()org.roaringbitmap.IntIteratoriterator()org.roaringbitmap.PeekableIntIteratorintsize()byte[]toBytes()toString()union(ImmutableBitmap otherBitmap) Compute the bitwise-or of this bitmap with another bitmap.
-
Constructor Details
-
WrappedImmutableRoaringBitmap
-
WrappedImmutableRoaringBitmap
public WrappedImmutableRoaringBitmap(org.roaringbitmap.buffer.ImmutableRoaringBitmap immutableRoaringBitmap) Wrap an ImmutableRoaringBitmap- Parameters:
immutableRoaringBitmap- bitmap to be wrapped
-
-
Method Details
-
getBitmap
public org.roaringbitmap.buffer.ImmutableRoaringBitmap getBitmap() -
toBytes
public byte[] toBytes()- Specified by:
toBytesin interfaceImmutableBitmap
-
toString
-
iterator
public org.roaringbitmap.IntIterator iterator()- Specified by:
iteratorin interfaceImmutableBitmap- Returns:
- an iterator over the set bits of this bitmap
-
peekableIterator
public org.roaringbitmap.PeekableIntIterator peekableIterator()- Specified by:
peekableIteratorin interfaceImmutableBitmap- Returns:
- a peekable iterator which can skip to a position
-
batchIterator
public org.roaringbitmap.BatchIterator batchIterator()- Specified by:
batchIteratorin interfaceImmutableBitmap- Returns:
- a batched iterator over the set bits of this bitmap
-
size
public int size()- Specified by:
sizein interfaceImmutableBitmap- Returns:
- The number of bits set to true in this bitmap
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceImmutableBitmap- Returns:
- True if this bitmap is empty (contains no set bit)
-
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
-
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
-
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
-