Package org.roaringbitmap.buffer
Class RunBatchIterator
- java.lang.Object
-
- org.roaringbitmap.buffer.RunBatchIterator
-
- All Implemented Interfaces:
java.lang.Cloneable,ContainerBatchIterator
public final class RunBatchIterator extends java.lang.Object implements ContainerBatchIterator
-
-
Constructor Summary
Constructors Constructor Description RunBatchIterator(MappeableRunContainer runs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerBatchIteratorclone()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.voidreleaseContainer()Discard the reference to the container
-
-
-
Constructor Detail
-
RunBatchIterator
public RunBatchIterator(MappeableRunContainer runs)
-
-
Method Detail
-
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
public ContainerBatchIterator clone()
Description copied from interface:ContainerBatchIteratorCreates a copy of the iterator.- Specified by:
clonein interfaceContainerBatchIterator- Overrides:
clonein classjava.lang.Object- 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
-
-