Constructor and Description |
---|
ListResultSet(java.util.List<T> r) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the result, discarding any further results.
|
java.util.Iterator<T> |
iterator()
Obtain an iterator to loop through the results.
|
com.google.common.collect.ImmutableList<T> |
toList()
Materialize all results as a single list.
|
public ListResultSet(java.util.List<T> r)
public java.util.Iterator<T> iterator()
ResultSet
The iterator can be obtained only once. When the iterator completes ( hasNext()
returns false) ResultSet.close()
will be automatically called.
public com.google.common.collect.ImmutableList<T> toList()
ResultSet
Prior to returning ResultSet.close()
is invoked. This method must not be combined with ResultSet.iterator()
on the same instance.