Package org.roaringbitmap
Interface ContainerPointer
-
- All Superinterfaces:
Cloneable
,Comparable<ContainerPointer>
public interface ContainerPointer extends Comparable<ContainerPointer>, Cloneable
This interface allows you to iterate over the containers in a roaring bitmap.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
advance()
Move to the next containerContainerPointer
clone()
Create a copyint
getCardinality()
Return the cardinality of the current containerContainer
getContainer()
This method can be used to check whether there is current a valid container as it returns null when there is not.boolean
isBitmapContainer()
Check whether the current container is a bitmap container.boolean
isRunContainer()
Check whether the current container is a run container.short
key()
The key is a 16-bit integer that indicates the position of the container in the roaring bitmap.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
advance
void advance()
Move to the next container
-
clone
ContainerPointer clone()
Create a copy- Returns:
- return a clone of this pointer
-
getCardinality
int getCardinality()
Return the cardinality of the current container- Returns:
- the cardinality
-
getContainer
Container 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
-
isBitmapContainer
boolean isBitmapContainer()
Check whether the current container is a bitmap container.- Returns:
- whether it is a bitmap container
-
isRunContainer
boolean isRunContainer()
Check whether the current container is a run container.- Returns:
- whether 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
-
-