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