Package org.roaringbitmap
Class BatchIntIterator
- java.lang.Object
-
- org.roaringbitmap.BatchIntIterator
-
- All Implemented Interfaces:
java.lang.Cloneable
,IntIterator
public class BatchIntIterator extends java.lang.Object implements IntIterator
Wraps a batch iterator for use as an IntIterator
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
buffer
private BatchIterator
delegate
private int
i
private int
mark
-
Constructor Summary
Constructors Modifier Constructor Description (package private)
BatchIntIterator(BatchIterator delegate, int[] buffer)
Wraps the batch iterator.private
BatchIntIterator(BatchIterator delegate, int i, int mark, int[] buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntIterator
clone()
Creates a copy of the iterator.boolean
hasNext()
int
next()
-
-
-
Field Detail
-
i
private int i
-
mark
private int mark
-
buffer
private int[] buffer
-
delegate
private BatchIterator delegate
-
-
Constructor Detail
-
BatchIntIterator
private BatchIntIterator(BatchIterator delegate, int i, int mark, int[] buffer)
-
BatchIntIterator
BatchIntIterator(BatchIterator delegate, int[] buffer)
Wraps the batch iterator.- Parameters:
delegate
- the batch iterator to do the actual iterationbuffer
- the buffer
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIntIterator
- Returns:
- whether there is another value
-
next
public int next()
- Specified by:
next
in interfaceIntIterator
- Returns:
- next integer value
-
clone
public IntIterator clone()
Description copied from interface:IntIterator
Creates a copy of the iterator.- Specified by:
clone
in interfaceIntIterator
- Overrides:
clone
in classjava.lang.Object
- Returns:
- a clone of the current iterator
-
-