Interface MappeableContainerPointer

  • All Superinterfaces:
    java.lang.Cloneable, java.lang.Comparable<MappeableContainerPointer>

    public interface MappeableContainerPointer
    extends java.lang.Comparable<MappeableContainerPointer>, java.lang.Cloneable
    This interface allows you to iterate over the containers in a roaring bitmap.
    • Method Summary

      Modifier and Type Method Description
      void advance()
      Move to the next container
      MappeableContainerPointer clone()
      Create a copy
      int getCardinality()
      Returns the cardinality of the current container.
      MappeableContainer getContainer()
      This method can be used to check whether there is current a valid container as it returns null when there is not.
      int getSizeInBytes()
      Get the size in bytes of the container.
      boolean hasContainer()  
      boolean isBitmapContainer()
      Returns true if it is a bitmap container (MappeableBitmapContainer).
      boolean isRunContainer()
      Returns true if it is a run container (MappeableRunContainer).
      short key()
      The key is a 16-bit integer that indicates the position of the container in the roaring bitmap.
      void previous()
      Move to the previous container
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Method Detail

      • advance

        void advance()
        Move to the next container
      • getCardinality

        int getCardinality()
        Returns the cardinality of the current container. Can be faster than loading the container first.
        Returns:
        cardinality of the current container
      • getContainer

        MappeableContainer getContainer()
        This method can be used to check whether there is current a valid container as it returns null when there is not.
        Returns:
        null or the current container
      • getSizeInBytes

        int getSizeInBytes()
        Get the size in bytes of the container. Used for sorting.
        Returns:
        the size in bytes
      • hasContainer

        boolean hasContainer()
        Returns:
        whether there is a container at the current position
      • isBitmapContainer

        boolean isBitmapContainer()
        Returns true if it is a bitmap container (MappeableBitmapContainer).
        Returns:
        boolean indicated if it is a bitmap container
      • isRunContainer

        boolean isRunContainer()
        Returns true if it is a run container (MappeableRunContainer).
        Returns:
        boolean indicated if it is a run container
      • key

        short key()
        The key is a 16-bit integer that indicates the position of the container in the roaring bitmap. To be interpreted as an unsigned integer.
        Returns:
        the key
      • previous

        void previous()
        Move to the previous container