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
  • Constructor Details

    • WrappedBitSetBitmap

      public WrappedBitSetBitmap()
    • WrappedBitSetBitmap

      public WrappedBitSetBitmap(BitSet bitSet)
    • WrappedBitSetBitmap

      public WrappedBitSetBitmap(ByteBuffer byteBuffer)
  • Method Details

    • cloneBitSet

      protected BitSet cloneBitSet()
    • clear

      public void clear()
      Description copied from interface: MutableBitmap
      Empties the content of this bitmap.
      Specified by:
      clear in interface MutableBitmap
    • 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 interface MutableBitmap
      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 interface MutableBitmap
      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 interface MutableBitmap
      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 interface MutableBitmap
      Parameters:
      entry - integer to be remove
    • serialize

      public void serialize(ByteBuffer buffer)