Package org.roaringbitmap.buffer
Class ArrayBatchIterator
java.lang.Object
org.roaringbitmap.buffer.ArrayBatchIterator
- All Implemented Interfaces:
Cloneable
,ContainerBatchIterator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
advanceIfNeeded
(char target) Advance until the value.clone()
Creates a copy of the iterator.boolean
hasNext()
Whether the underlying container is exhausted or notint
next
(int key, int[] buffer, int offset) Fills the buffer with values prefixed by the key, and returns how much of the buffer was used.void
Discard the reference to the containervoid
wrap
(MappeableArrayContainer array) Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.roaringbitmap.ContainerBatchIterator
next
-
Constructor Details
-
ArrayBatchIterator
-
-
Method Details
-
next
public int next(int key, int[] buffer, int offset) 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 ontooffset
- the offset into 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
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
-
releaseContainer
public void releaseContainer()Description copied from interface:ContainerBatchIterator
Discard the reference to the container- Specified by:
releaseContainer
in interfaceContainerBatchIterator
-
advanceIfNeeded
public void advanceIfNeeded(char target) Description copied from interface:ContainerBatchIterator
Advance until the value.- Specified by:
advanceIfNeeded
in interfaceContainerBatchIterator
- Parameters:
target
- the value to advance to.
-
wrap
-