REQUESTBUILDER
- the type of a builder which can produce requests for a list operationREQUEST
- the type of a request to a list operation. This type must match the type
produced by REQUESTBUILDERRESPONSE
- the type of the response from a list operationpublic class ResponseIterator<REQUESTBUILDER,REQUEST,RESPONSE> extends AbstractResponseIterator<REQUESTBUILDER,REQUEST,RESPONSE> implements Iterator<RESPONSE>
An iterator for iterating over response objects returned from a list operation. Each time we
advance the iterator (via its next()
method) we will call the list operation of the
service for the next response.
This iterator does not support removal of elements.
currentResponse, nextPageToken, nextPageTokenRetrievalFunction, pageRetrievalFunction, requestBuilder, requestBuilderFunction
Constructor and Description |
---|
ResponseIterator(REQUESTBUILDER requestBuilder,
Function<RESPONSE,String> nextPageTokenRetrievalFunction,
Function<RequestBuilderAndToken<REQUESTBUILDER>,REQUEST> requestBuilderFunction,
Function<REQUEST,RESPONSE> pageRetrievalFunction)
Constructs a new ResponseIterator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
RESPONSE |
next() |
void |
remove() |
fetchNextPage, getNextPageToken, getNextRequest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ResponseIterator(REQUESTBUILDER requestBuilder, Function<RESPONSE,String> nextPageTokenRetrievalFunction, Function<RequestBuilderAndToken<REQUESTBUILDER>,REQUEST> requestBuilderFunction, Function<REQUEST,RESPONSE> pageRetrievalFunction)
Constructs a new ResponseIterator.
requestBuilder
- a builder object which can create requests for a list operationnextPageTokenRetrievalFunction
- a function which can extract the next page token from a
response produced by a list operationrequestBuilderFunction
- a function which can build a request for a list operation based
on a builder object and a pagination token to usepageRetrievalFunction
- a function which will call a list operation with a request and
return the response of the callCopyright © 2016–2024. All rights reserved.