T - Element typepublic abstract class EnumeratorCursor<T> extends PositionedCursor<T>
Cursor on top of an
Enumerator that
returns a record for each row. The returned record is cached to avoid
multiple computations of current row.
For instance,
EnumerableCalc
computes result just in current() method, thus it makes sense to
cache the result and make it available for all the accessors.PositionedCursor.ArrayGetter, PositionedCursor.FieldGetter, PositionedCursor.ListGetter, PositionedCursor.MapGetter<K>, PositionedCursor.ObjectGetterAbstractCursor.AbstractGetter, AbstractCursor.GetterCursor.AccessorwasNull| Modifier | Constructor and Description |
|---|---|
protected |
EnumeratorCursor(Enumerator<T> enumerator)
Creates a
EnumeratorCursor |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected T |
current() |
boolean |
next() |
createAccessor, createAccessors, createGetter, wasNullprotected EnumeratorCursor(Enumerator<T> enumerator)
EnumeratorCursorenumerator - input enumeratorprotected T current()
current in class PositionedCursor<T>public boolean next()
next in interface Cursornext in class AbstractCursorpublic void close()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.