public class ResultSetIteration<E> extends Object implements info.aduna.iteration.CloseableIteration<E,SQLException>
Constructor and Description |
---|
ResultSetIteration(ResultSet result,
boolean closeStatement,
ResultTransformerFunction<E> transformer) |
ResultSetIteration(ResultSet result,
ResultTransformerFunction<E> transformer) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this iteration, freeing any resources that it is holding.
|
protected void |
finalize() |
boolean |
hasNext()
Returns true if the iteration has more elements.
|
E |
next()
Returns the next element in the iteration.
|
void |
remove() |
public ResultSetIteration(ResultSet result, ResultTransformerFunction<E> transformer)
public ResultSetIteration(ResultSet result, boolean closeStatement, ResultTransformerFunction<E> transformer)
public void close() throws SQLException
close
in interface info.aduna.iteration.CloseableIteration<E,SQLException>
SQLException
public boolean hasNext() throws SQLException
next()
would return an element
rather than throwing a NoSuchElementException.)hasNext
in interface info.aduna.iteration.Iteration<E,SQLException>
SQLException
public E next() throws SQLException
next
in interface info.aduna.iteration.Iteration<E,SQLException>
NoSuchElementException
- if the iteration has no more elements or if it has been closed.SQLException
public void remove() throws SQLException
remove
in interface info.aduna.iteration.Iteration<E,SQLException>
SQLException
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.