Class Page<T,​R>

  • Type Parameters:
    T - item type
    R - low level result type
    All Implemented Interfaces:
    Iterable<T>

    public abstract class Page<T,​R>
    extends Object
    implements Iterable<T>
    A page contains a list of items; accessing methods on the list are guaranteed to be purely in-memory operations that will not block or throw exceptions because of transient network issues. A page also knows whether it has a "next page", and if so knows how to retrieve it (which will almost certainly involve a remote network call that may block or fail).
    • Constructor Detail

      • Page

        public Page​(List<T> content,
                    R lowLevelResult)
        Parameters:
        content - an unmodifiable list of content
        lowLevelResult - the low level (response) result from AWSS
    • Method Detail

      • hasNextPage

        public abstract boolean hasNextPage()
        Checks whether this page has a "next page." If this method returns true, the next page can be retrieved by calling next. If it returns false, any call to next will be guaranteed to throw an IllegalStateException.
        Returns:
        true if there is next page; false otherwise
      • size

        public final int size()
      • getLowLevelResult

        public final R getLowLevelResult()