Class PageImpl<T>

    • Constructor Detail

      • PageImpl

        public PageImpl​(PageImpl.NextPageFetcher<T> pageFetcher,
                        String cursor,
                        Iterable<T> results)
        Creates a PageImpl object. In order for the object to be serializable the results parameter must be serializable.
    • Method Detail

      • hasNextPage

        public boolean hasNextPage()
        Specified by:
        hasNextPage in interface Page<T>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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 of T should be Serializable
        Parameters:
        pageTokenOption - the key for the next page cursor option in the options map
        cursor - the cursor for the next page
        optionMap - the previous options map
        Returns:
        the options map for the next page request