public interface Cursor extends Row
DataFrame that allows the programmer to
traverse the rows in either direction.
The difference between a cursor and an iterator is that an iterator returns a
Row on a call to next() or previous(), while a cursor
is a row.
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if this dataframe cursor has more rows to traverse in
the forward direction. |
boolean |
hasPrevious()
Returns
true if this dataframe cursor has more rows to traverse in
the backward direction. |
void |
next()
Moves the cursor to the next
Row in the dataframe. |
void |
previous()
Returns the previous element in the dataframe and moves the cursor position
backwards.
|
columnCount, get, get, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getDate, getDate, getDateTime, getDateTime, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getOrDefaultDouble, getOrDefaultDouble, getOrDefaultFloat, getOrDefaultFloat, getOrDefaultInt, getOrDefaultInt, getOrDefaultLong, getOrDefaultLong, getOrDefaultShort, getOrDefaultShort, getShort, getShort, getString, getString, isNull, isNull, rowIndex, yyyymmdd, yyyymmddboolean hasNext()
true if this dataframe cursor has more rows to traverse in
the forward direction. (In other words, returns true if next()
would move to a valid row rather than throwing an exception.)true if the cursor has more rows when traversing the
dataframe in the forward directionvoid next()
Row in the dataframe. This method may be
called repeatedly to iterate through the dataframe, or intermixed with calls
to previous() to go back and forth. (Note that alternating calls to
next and previous will land on the same row repeatedly.)NoSuchElementException - if the dataframe has no next rowboolean hasPrevious()
true if this dataframe cursor has more rows to traverse in
the backward direction. (In other words, returns true if
previous() would move to a valid row rather than throwing an
exception.)true if the cursor has more rows when traversing the
dataframe in the backward directionvoid previous()
next() to go back and
forth. (Note that alternating calls to next and previous will
return the same element repeatedly.)NoSuchElementException - if the dataframe has no previous rowCopyright © 2020. All rights reserved.