Package com.google.gerrit.index.query
Class ListResultSet<T>
- java.lang.Object
-
- com.google.gerrit.index.query.ListResultSet<T>
-
-
Constructor Summary
Constructors Constructor Description ListResultSet(List<T> r)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the result, discarding any further results.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
iterator
public Iterator<T> iterator()
Description copied from interface:ResultSetObtain an iterator to loop through the results.The iterator can be obtained only once. When the iterator completes (
hasNext()returns false)ResultSet.close()will be automatically called.
-
toList
public com.google.common.collect.ImmutableList<T> toList()
Description copied from interface:ResultSetMaterialize all results as a single list.Prior to returning
ResultSet.close()is invoked. This method must not be combined withResultSet.iterator()on the same instance.
-
-