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 ContainerBatchIterator
clone()
Creates a copy of the iterator.boolean
hasNext()
Whether the underlying container is exhausted or notint
next(int key, int[] buffer)
Fills the buffer with values prefixed by the key, and returns how much of the buffer was used.void
releaseContainer()
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:ContainerBatchIterator
Fills the buffer with values prefixed by the key, and returns how much of the buffer was used.- Specified by:
next
in 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:ContainerBatchIterator
Whether the underlying container is exhausted or not- Specified by:
hasNext
in interfaceContainerBatchIterator
- Returns:
- true if there is data remaining
-
clone
public ContainerBatchIterator clone()
Description copied from interface:ContainerBatchIterator
Creates a copy of the iterator.- Specified by:
clone
in interfaceContainerBatchIterator
- Overrides:
clone
in classjava.lang.Object
- Returns:
- a clone of the current iterator
-
releaseContainer
public void releaseContainer()
Description copied from interface:ContainerBatchIterator
Discard the reference to the container- Specified by:
releaseContainer
in interfaceContainerBatchIterator
-
-