Package org.roaringbitmap
Class RunBatchIterator
- java.lang.Object
-
- org.roaringbitmap.RunBatchIterator
-
- All Implemented Interfaces:
Cloneable
,ContainerBatchIterator
public class RunBatchIterator extends Object implements ContainerBatchIterator
-
-
Constructor Summary
Constructors Constructor Description RunBatchIterator(RunContainer 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.
-
-
-
Constructor Detail
-
RunBatchIterator
public RunBatchIterator(RunContainer 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 classObject
- Returns:
- a clone of the current iterator
-
-