Class PagedIterable<T>

    • Constructor Detail

      • PagedIterable

        public PagedIterable()
    • Method Detail

      • withPageSize

        public PagedIterable<T> withPageSize​(int size)
        Sets the pagination size.

        When set to non-zero, each API call will retrieve this many entries.

        Parameters:
        size - the size
        Returns:
        the paged iterable
      • _iterator

        public abstract PagedIterator<T> _iterator​(int pageSize)
        Iterator paged iterator.
        Parameters:
        pageSize - the page size
        Returns:
        the paged iterator
      • asList

        public List<T> asList()
        Eagerly walk Iterable and return the result in a list.
        Returns:
        the list
      • asSet

        public Set<T> asSet()
        Eagerly walk Iterable and return the result in a set.
        Returns:
        the set