Class TwoValuesContainer.ContainerShortBatchIter
java.lang.Object
io.deephaven.engine.rowset.impl.rsp.container.TwoValuesContainer.ContainerShortBatchIter
- All Implemented Interfaces:
ContainerShortBatchIterator
- Enclosing class:
- TwoValuesContainer
public static final class TwoValuesContainer.ContainerShortBatchIter
extends Object
implements ContainerShortBatchIterator
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
advance
(int v) short
curr()
int
boolean
forEach
(ShortConsumer sc) Starting from the next iterator position (if any), feed values to the consumer until it returns false.boolean
hasNext()
int
next
(short[] buffer, int offset, int maxCount) Writes to buffer the next batch of values, and returns how much of the buffer was used.int
protected short
protected final void
nextPos()
void
remove()
protected int
v1AsInt()
protected int
v2AsInt()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.engine.rowset.impl.rsp.container.ContainerShortBatchIterator
hasNext
-
Field Details
-
v1
protected final short v1 -
v2
protected final short v2 -
pos
protected int pos
-
-
Constructor Details
-
ContainerShortBatchIter
-
-
Method Details
-
next
public int next(short[] buffer, int offset, int maxCount) Description copied from interface:ContainerShortBatchIterator
Writes to buffer the next batch of values, and returns how much of the buffer was used.- Specified by:
next
in interfaceContainerShortBatchIterator
- Parameters:
buffer
- the buffer to write values onto.offset
- first position to start writing in buffer.maxCount
- max number of elements to write to buffer.- Returns:
- how many values were written.
-
forEach
Description copied from interface:ContainerShortBatchIterator
Starting from the next iterator position (if any), feed values to the consumer until it returns false. After each value is consumed, the current iterator position is moving forward; eg, a call to forEach that consumes 4 elements effectively works as if next was called 4 times.- Specified by:
forEach
in interfaceContainerShortBatchIterator
- Parameters:
sc
- a ShortConsumer to feed values to.- Returns:
- false if the processing was stopped by the consumer returning false, true otherwise.
-
hasNext
public boolean hasNext() -
nextPos
protected final void nextPos() -
advance
public boolean advance(int v) -
remove
public void remove() -
curr
public short curr() -
currAsInt
public int currAsInt() -
nextAsShort
protected short nextAsShort() -
nextAsInt
public int nextAsInt() -
v1AsInt
protected int v1AsInt() -
v2AsInt
protected int v2AsInt()
-