public abstract class ColumnarIterator extends com.oracle.labs.mlrg.olcut.util.IOSpliterator<ColumnarIterator.Row> implements Iterator<ColumnarIterator.Row>
Note: the fields
field must be set in the constructor of implementing classes.
Modifier and Type | Class and Description |
---|---|
static class |
ColumnarIterator.Row
A representation of a row of untyped data from a columnar data source.
|
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
Modifier and Type | Field and Description |
---|---|
protected Optional<ColumnarIterator.Row> |
currentRow |
protected List<String> |
fields |
DEFAULT_BATCH_SIZE, DEFAULT_CHARACTERISTICS
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
Modifier | Constructor and Description |
---|---|
protected |
ColumnarIterator()
Constructs a ColumnarIterator wrapped around a buffering spliterator.
|
protected |
ColumnarIterator(int characteristics,
int batchsize,
long estimatedSize)
Constructs a ColumnarIterator wrapped around a buffering spliterator.
|
Modifier and Type | Method and Description |
---|---|
void |
forEachRemaining(Consumer<? super ColumnarIterator.Row> action) |
List<String> |
getFields()
The immutable list of field names.
|
protected abstract Optional<ColumnarIterator.Row> |
getRow()
Returns the next row of data based on internal state stored by the implementor, or
Optional.empty()
if there is no more data. |
boolean |
hasNext() |
ColumnarIterator.Row |
next() |
boolean |
tryAdvance(Consumer<? super ColumnarIterator.Row> action) |
characteristics, estimateSize, trySplit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComparator, getExactSizeIfKnown, hasCharacteristics
protected Optional<ColumnarIterator.Row> currentRow
protected ColumnarIterator()
Note when using this constructor you must set the fields
field to
the appropriate value after you've called super(). It must be immutable.
protected ColumnarIterator(int characteristics, int batchsize, long estimatedSize)
Note when using this constructor you must set the fields
field to
the appropriate value after you've called super(). It must be immutable.
characteristics
- The spliterator characteristics.batchsize
- The buffer size.estimatedSize
- The estimated size of this iterator.public List<String> getFields()
public boolean hasNext()
hasNext
in interface Iterator<ColumnarIterator.Row>
public ColumnarIterator.Row next()
next
in interface Iterator<ColumnarIterator.Row>
public boolean tryAdvance(Consumer<? super ColumnarIterator.Row> action)
tryAdvance
in interface Spliterator<ColumnarIterator.Row>
public void forEachRemaining(Consumer<? super ColumnarIterator.Row> action)
forEachRemaining
in interface Iterator<ColumnarIterator.Row>
forEachRemaining
in interface Spliterator<ColumnarIterator.Row>
protected abstract Optional<ColumnarIterator.Row> getRow()
Optional.empty()
if there is no more data.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.