Package com.couchbase.lite
Class ResultSet
- java.lang.Object
-
- com.couchbase.lite.ResultSet
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Result>allResults()Return a List of all Results.voidclose()java.util.Iterator<Result>iterator()Return Iterator of Results.Resultnext()Move the cursor forward one row from its current row position.
-
-
-
Method Detail
-
next
@Nullable public Result next()
Move the cursor forward one row from its current row position.Caution:
next(),iterator()anditerator()method share same data structure. They cannot be used together.Caution: When a ResultSet is obtained from a QueryChangeListener and the QueryChangeListener is removed from Query, the ResultSet will be freed and this method will return null.
- Returns:
- the Result after moving the cursor forward. Returns
nullvalue if there are no more rows, or ResultSet is freed already.
-
allResults
@NonNull public java.util.List<Result> allResults()
Return a List of all Results.Caution:
next(),iterator()anditerator()method share same data structure. They cannot be used together.- Returns:
- List of Results
-
iterator
@NonNull public java.util.Iterator<Result> iterator()
Return Iterator of Results.Caution:
next(),iterator()anditerator()method share same data structure. They cannot be used together.- Specified by:
iteratorin interfacejava.lang.Iterable<Result>- Returns:
- an iterator over the elements in this list in proper sequence
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-