Class WrappedConciseBitmap

    • Constructor Detail

      • WrappedConciseBitmap

        public WrappedConciseBitmap()
        Create a new WrappedConciseBitmap wrapping an empty ConciseSet
      • WrappedConciseBitmap

        public WrappedConciseBitmap​(ConciseSet conciseSet)
        Create a bitmap wrapping the given bitmap
        Parameters:
        conciseSet - bitmap to be wrapped
    • Method Detail

      • 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
      • 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
      • size

        public int size()
        Specified by:
        size in interface ImmutableBitmap
        Returns:
        The number of bits set to true in this bitmap
      • 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
      • iterator

        public org.roaringbitmap.IntIterator iterator()
        Specified by:
        iterator in interface ImmutableBitmap
        Returns:
        an iterator over the set bits of this bitmap
      • peekableIterator

        public org.roaringbitmap.PeekableIntIterator peekableIterator()
        Specified by:
        peekableIterator in interface ImmutableBitmap
        Returns:
        a peekable iterator which can skip to a position
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface ImmutableBitmap
        Returns:
        True if this bitmap is empty (contains no set bit)
      • intersection

        public ImmutableBitmap intersection​(ImmutableBitmap otherBitmap)
        Description copied from interface: ImmutableBitmap
        Compute 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:
        intersection in interface ImmutableBitmap
        Parameters:
        otherBitmap - other bitmap
      • get

        public boolean get​(int value)
        Description copied from interface: ImmutableBitmap
        Returns true if the bit at position value is set
        Specified by:
        get in interface ImmutableBitmap
        Parameters:
        value - the position to check
        Returns:
        true if bit is set