- Type Parameters:
T
- the type to fetch from the ResultSet
- All Superinterfaces:
AutoCloseable
, Iterable<T>
Iterates through a
ResultSet
fetching instances of T.
Use try with resources or remember to call
close()
in order to close underlying resources.
-
Method Summary
void
Closes the underlying
ResultSet
and other resources held by this iterator
boolean
Returns true if a row is available in the underlying
ResultSet
.
-
Method Details
-
hasNext
Returns true if a row is available in the underlying
ResultSet
.
- Returns:
- true if a row is available in the underlying
ResultSet
- Throws:
SQLException
- in case of an exception
-
-
close
void close()
Closes the underlying
ResultSet
and other resources held by this iterator
- Specified by:
close
in interface AutoCloseable
-