public class PageIterator<T extends WrapperDto<? extends SingleResourceTransportDto>>
extends com.google.common.collect.AbstractIterator<T>
Iterator that is capable of advancing between the pages of a paginated collection.
To create this iterator use the #flatten(ApiClient, WrapperDto) method.
| Modifier and Type | Class and Description |
|---|---|
static class |
PageIterator.AdvancingIterable<T extends SingleResourceTransportDto,W extends WrapperDto<T>>
An
Iterable that is capable of advancing between pages. |
| Modifier and Type | Method and Description |
|---|---|
protected T |
computeNext() |
static <T extends SingleResourceTransportDto,W extends WrapperDto<T>> |
flatten(RestClient api,
W dto)
Creates an iterator capable of advancing over the elements of a paginated collection, and
lazily fetch new pages as they are needed.
|
endOfData, hasNext, next, peekclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected T computeNext()
computeNext in class com.google.common.collect.AbstractIterator<T extends WrapperDto<? extends SingleResourceTransportDto>>public static <T extends SingleResourceTransportDto,W extends WrapperDto<T>> Iterable<T> flatten(RestClient api, W dto)
api - The rest client used to fetch new pages when needed.dto - The collection to iterate.Copyright © 2008–2020 Abiquo Holdings S.L.. All rights reserved.