Class PaginatedList<E>

  • Type Parameters:
    E - type of the elements
    All Implemented Interfaces:
    Iterable<E>, Collection<E>, List<E>

    public class PaginatedList<E>
    extends AbstractList<E>
    Paginated list on Bitbucket Cloud.
    Since:
    5.0
    Author:
    Kaz Nishimura
    See Also:
    Pagination
    • Constructor Detail

      • PaginatedList

        public PaginatedList​(URI firstPage,
                             BitbucketClient bitbucketClient,
                             Function<JsonObject,​? extends E> creator)
        Initializes this object.
        Parameters:
        firstPage - the URI of the first page
        bitbucketClient - a Bitbucket API client
        creator - a function to create each element
    • Method Detail

      • fetchNext

        protected final void fetchNext()
        Fetches the next page.
      • get

        public final E get​(int index)
        Specified by:
        get in interface List<E>
        Specified by:
        get in class AbstractList<E>