Package org.roaringbitmap.buffer
Class RoaringBatchIterator
- java.lang.Object
-
- org.roaringbitmap.buffer.RoaringBatchIterator
-
- All Implemented Interfaces:
java.lang.Cloneable
,BatchIterator
public final class RoaringBatchIterator extends java.lang.Object implements BatchIterator
-
-
Constructor Summary
Constructors Constructor Description RoaringBatchIterator(MappeableContainerPointer containerPointer)
-
Method Summary
Modifier and Type Method Description BatchIterator
clone()
Creates a copy of the iterator.boolean
hasNext()
Returns true is there are more values to get.int
nextBatch(int[] buffer)
Writes the next batch of integers onto the buffer, and returns how many were written.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.roaringbitmap.BatchIterator
asIntIterator
-
-
-
-
Constructor Detail
-
RoaringBatchIterator
public RoaringBatchIterator(MappeableContainerPointer containerPointer)
-
-
Method Detail
-
nextBatch
public int nextBatch(int[] buffer)
Description copied from interface:BatchIterator
Writes the next batch of integers onto the buffer, and returns how many were written. Aims to fill the buffer.- Specified by:
nextBatch
in interfaceBatchIterator
- Parameters:
buffer
- - the target to write onto- Returns:
- how many values were written during the call.
-
hasNext
public boolean hasNext()
Description copied from interface:BatchIterator
Returns true is there are more values to get.- Specified by:
hasNext
in interfaceBatchIterator
- Returns:
- whether the iterator is exhaused or not.
-
clone
public BatchIterator clone()
Description copied from interface:BatchIterator
Creates a copy of the iterator.- Specified by:
clone
in interfaceBatchIterator
- Overrides:
clone
in classjava.lang.Object
- Returns:
- a clone of the current iterator
-
-