T
- The type of value returned by this cursor.public abstract class AbstractCursor<T> extends Object implements Cursor<T>
Cursor
s easier to implement.Constructor and Description |
---|
AbstractCursor()
Construct a cursor of unknown size.
|
AbstractCursor(int nrows)
Construct a cursor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
No-op implementation of the
Cursor.close() method. |
Iterable<T> |
fast()
Deprecated.
|
T |
fastNext()
Deprecated.
|
int |
getRowCount()
Get an upper bound on the number of rows available from the cursor.
|
Iterator<T> |
iterator()
Get the iterator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public AbstractCursor()
public AbstractCursor(int nrows)
nrows
- The number of rows, or -1 for unknown size.public int getRowCount()
Cursor
getRowCount
in interface Cursor<T>
Cursor.next()
,
or -1 if that count is not available.public void close()
Cursor.close()
method.@Nonnull @Deprecated public T fastNext()
Cursor.next()
that may mutate and return the same object
avoid excess allocations. Since many loops don't do anything with the
object after the iteration in which it is retrieved, using this iteration
method can improve both speed and memory use.
This implementation delegates to Cursor.next()
.
fastNext
in interface Cursor<T>
Cursor.next()
@Deprecated public Iterable<T> fast()
Cursor
Iterator.next()
method is
implemented in terms of Cursor.fastNext()
.