Class WrappedImmutableConciseBitmap
- java.lang.Object
-
- org.apache.druid.collections.bitmap.WrappedImmutableConciseBitmap
-
- All Implemented Interfaces:
ImmutableBitmap
public class WrappedImmutableConciseBitmap extends Object implements ImmutableBitmap
-
-
Constructor Summary
Constructors Constructor Description WrappedImmutableConciseBitmap(IntBuffer buffer)WrappedImmutableConciseBitmap(ImmutableConciseSet immutableConciseSet)Wrap an ImmutableConciseSet
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanget(int value)Returns true if the bit at position value is setImmutableConciseSetgetBitmap()ImmutableBitmapintersection(ImmutableBitmap otherBitmap)Compute the bitwise-and of this bitmap with another bitmap.booleanisEmpty()org.roaringbitmap.IntIteratoriterator()org.roaringbitmap.PeekableIntIteratorpeekableIterator()intsize()byte[]toBytes()StringtoString()ImmutableBitmapunion(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, wait, wait, wait
-
Methods inherited from interface org.apache.druid.collections.bitmap.ImmutableBitmap
batchIterator
-
-
-
-
Constructor Detail
-
WrappedImmutableConciseBitmap
public WrappedImmutableConciseBitmap(IntBuffer buffer)
-
WrappedImmutableConciseBitmap
public WrappedImmutableConciseBitmap(ImmutableConciseSet immutableConciseSet)
Wrap an ImmutableConciseSet- Parameters:
immutableConciseSet- bitmap to be wrapped
-
-
Method Detail
-
getBitmap
public ImmutableConciseSet getBitmap()
-
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
-
toBytes
public byte[] toBytes()
- Specified by:
toBytesin interfaceImmutableBitmap
-
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
-
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)
-
intersection
public ImmutableBitmap intersection(ImmutableBitmap otherBitmap)
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
public ImmutableBitmap union(ImmutableBitmap otherBitmap)
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
-
-