Package com.google.cloud
Class PageImpl<T>
java.lang.Object
com.google.cloud.PageImpl<T>
- Type Parameters:
T- the value type that the page holds
- All Implemented Interfaces:
Page<T>,Serializable
- Direct Known Subclasses:
AsyncPageImpl
Base implementation for Google Cloud paginated results.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface for fetching the next page of results from the service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleannextRequestOptions(T pageTokenOption, String cursor, Map<T, ?> optionMap) Utility method to construct the options map for the next page request.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.api.gax.paging.Page
streamAll, streamValues
-
Constructor Details
-
PageImpl
Creates aPageImplobject. In order for the object to be serializable theresultsparameter must be serializable.
-
-
Method Details
-
getValues
-
iterateAll
- Specified by:
iterateAllin interfacePage<T>
-
hasNextPage
public boolean hasNextPage()- Specified by:
hasNextPagein interfacePage<T>
-
getNextPageToken
- Specified by:
getNextPageTokenin interfacePage<T>
-
getNextPage
- Specified by:
getNextPagein interfacePage<T>
-
hashCode
public int hashCode() -
equals
-
nextRequestOptions
public static <T> Map<T,Object> nextRequestOptions(T pageTokenOption, String cursor, Map<T, ?> optionMap) Utility method to construct the options map for the next page request.- Type Parameters:
T- the value type that the page holds. Instances ofTshould beSerializable- Parameters:
pageTokenOption- the key for the next page cursor option in the options mapcursor- the cursor for the next pageoptionMap- the previous options map- Returns:
- the options map for the next page request
-