R
- class type for rowpublic class SelectIterator<R>
extends java.lang.Object
implements java.util.Iterator<R>
ScalarSelectOperation
. Returned by ScalarSelectOperation.iterator()
or
may be instantiated and used stand-alone.Constructor and Description |
---|
SelectIterator(ScalarSelectOperation<R> selectOperation)
Constructs for a select operation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Tests if there is a row available for
next() . |
R |
next()
Reads the next row from the select operation or returns the row found
in most recent use of
hasNext() . |
void |
remove()
Throws
UnsupportedOperationException . |
public SelectIterator(ScalarSelectOperation<R> selectOperation)
hasNext()
. If ScalarSelectOperation.execute()
has not
be invoked, then it will be upon first invocation of hasNext()
.selectOperation
- operation to iterate overpublic boolean hasNext()
next()
. This method will invoke
ScalarSelectOperation.readNext()
to look ahead to find out if another row is
available if it does not already know about next row.public R next()
hasNext()
. This method advances cursor of reads
so that repeated invocations will iterate through all rows.next
in interface java.util.Iterator<R>
public void remove()
UnsupportedOperationException
.remove
in interface java.util.Iterator<R>