Package org.roaringbitmap.buffer
Class BitmapBatchIterator
java.lang.Object
org.roaringbitmap.buffer.BitmapBatchIterator
- All Implemented Interfaces:
Cloneable,ContainerBatchIterator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadvanceIfNeeded(char target)Advance until the value.clone()Creates a copy of the iterator.booleanhasNext()Whether the underlying container is exhausted or notintnext(int key, int[] buffer)Fills the buffer with values prefixed by the key, and returns how much of the buffer was used.voidDiscard the reference to the container
-
Constructor Details
-
BitmapBatchIterator
-
-
Method Details
-
next
public int next(int key, int[] buffer)Description copied from interface:ContainerBatchIteratorFills the buffer with values prefixed by the key, and returns how much of the buffer was used.- Specified by:
nextin interfaceContainerBatchIterator- Parameters:
key- the prefix of the valuesbuffer- the buffer to write values onto- Returns:
- how many values were written.
-
hasNext
public boolean hasNext()Description copied from interface:ContainerBatchIteratorWhether the underlying container is exhausted or not- Specified by:
hasNextin interfaceContainerBatchIterator- Returns:
- true if there is data remaining
-
clone
Description copied from interface:ContainerBatchIteratorCreates a copy of the iterator.- Specified by:
clonein interfaceContainerBatchIterator- Overrides:
clonein classObject- Returns:
- a clone of the current iterator
-
releaseContainer
public void releaseContainer()Description copied from interface:ContainerBatchIteratorDiscard the reference to the container- Specified by:
releaseContainerin interfaceContainerBatchIterator
-
advanceIfNeeded
public void advanceIfNeeded(char target)Description copied from interface:ContainerBatchIteratorAdvance until the value.- Specified by:
advanceIfNeededin interfaceContainerBatchIterator- Parameters:
target- the value to advance to.
-