Item
's.
*
* An ItemCollection
object maintains a cursor pointing to its
* current pages of data. Initially the cursor is positioned before the first page.
* The next method moves the cursor to the next row, and because it returns
* false when there are no more rows in the ItemCollection
object,
* it can be used in a while loop to iterate through the collection.
*
* Network calls can be triggered when the collection is iterated across page
* boundaries.
*
* @param
*
* ItemCollection<QueryResult> collection = ...;
* for (Page<Item> page : collection.pages()) {
* processItems(page);
*
* ConsumedCapacity consumedCapacity =
* page.getLowLevelResult().getConsumedCapacity();
*
* Thread.sleep(getBackoff(consumedCapacity.getCapacityUnits()));
* }
*
*
* The use of the internal/undocumented {@code PageIterable} class instead
* of {@code Iterable} in the public interface here is retained for
* backwards compatibility. It doesn't expose any methods beyond those
* of the {@code Iterable} interface. This method will be changed to return
* an {@code Iterable