Class BitbucketPageStreamUtil

java.lang.Object
com.atlassian.bitbucket.jenkins.internal.client.paging.BitbucketPageStreamUtil

public final class BitbucketPageStreamUtil extends Object
Provides a way to return Stream of page based on first page and NextPageFetcher.
  • Constructor Details

    • BitbucketPageStreamUtil

      public BitbucketPageStreamUtil()
  • Method Details

    • toStream

      public static <T> Stream<BitbucketPage<T>> toStream(BitbucketPage<T> firstPage, NextPageFetcher<T> nextPageFetcher)
      Returns a Stream of Bitbucket Pages. NextPageFetcher provides a way for individual client to provide a way to fetch next page.
      Type Parameters:
      T - Type for Page
      Parameters:
      firstPage - First Page
      nextPageFetcher - Used for fetching next page
      Returns:
      Stream of pages.