Class ContinuablePagedIterable<C,T,P extends ContinuablePage<C,T>>

java.lang.Object
com.azure.core.util.IterableStream<T>
com.azure.core.util.paging.ContinuablePagedIterable<C,T,P>
Type Parameters:
C - the type of the continuation token
T - The type of elements in a ContinuablePage
P - The ContinuablePage holding items of type T.
All Implemented Interfaces:
Iterable<T>
Direct Known Subclasses:
AnalyzeActionsResultPagedIterable, AnalyzeHealthcareEntitiesPagedIterable, BlobChangefeedPagedIterable, CosmosPagedIterable, PagedIterableBase

public class ContinuablePagedIterable<C,T,P extends ContinuablePage<C,T>> extends IterableStream<T>
This class provides utility to iterate over ContinuablePage using Stream Iterable interfaces.
See Also:
  • Constructor Details

  • Method Details

    • stream

      public Stream<T> stream()
      Description copied from class: IterableStream
      Utility function to provide Stream of value T.
      Overrides:
      stream in class IterableStream<T>
      Returns:
      Stream of value T.
    • streamByPage

      public Stream<P> streamByPage()
      Retrieve the Stream, one page at a time. It will provide same Stream of T values from starting if called multiple times.
      Returns:
      Stream of a pages
    • streamByPage

      public Stream<P> streamByPage(C continuationToken)
      Retrieve the Stream, one page at a time, starting from the next page associated with the given continuation token. To start from first page, use streamByPage() instead.
      Parameters:
      continuationToken - The continuation token used to fetch the next page
      Returns:
      Stream of a pages
    • streamByPage

      public Stream<P> streamByPage(int preferredPageSize)
      Retrieve the Stream, one page at a time, with each page containing preferredPageSize items. It will provide same Stream of T values from starting if called multiple times.
      Parameters:
      preferredPageSize - the preferred page size, service may or may not honor the page size preference hence client MUST be prepared to handle pages with different page size.
      Returns:
      Stream of a pages
    • streamByPage

      public Stream<P> streamByPage(C continuationToken, int preferredPageSize)
      Retrieve the Stream, one page at a time, with each page containing preferredPageSize items, starting from the next page associated with the given continuation token. To start from first page, use streamByPage() or streamByPage(int) instead.
      Parameters:
      preferredPageSize - the preferred page size, service may or may not honor the page size preference hence client MUST be prepared to handle pages with different page size.
      continuationToken - The continuation token used to fetch the next page
      Returns:
      Stream of a pages
    • iterator

      public Iterator<T> iterator()
      Description copied from class: IterableStream
      Utility function to provide Iterator of value T.
      Specified by:
      iterator in interface Iterable<C>
      Overrides:
      iterator in class IterableStream<T>
      Returns:
      Iterator of value T.
    • iterableByPage

      public Iterable<P> iterableByPage()
      Retrieve the Iterable, one page at a time. It will provide same Iterable of T values from starting if called multiple times.
      Returns:
      Stream of a pages
    • iterableByPage

      public Iterable<P> iterableByPage(C continuationToken)
      Retrieve the Iterable, one page at a time, starting from the next page associated with the given continuation token. To start from first page, use iterableByPage() instead.
      Parameters:
      continuationToken - The continuation token used to fetch the next page
      Returns:
      Iterable of a pages
    • iterableByPage

      public Iterable<P> iterableByPage(int preferredPageSize)
      Retrieve the Iterable, one page at a time, with each page containing preferredPageSize items. It will provide same Iterable of T values from starting if called multiple times.
      Parameters:
      preferredPageSize - the preferred page size, service may or may not honor the page size preference hence client MUST be prepared to handle pages with different page size.
      Returns:
      Iterable of a pages
    • iterableByPage

      public Iterable<P> iterableByPage(C continuationToken, int preferredPageSize)
      Retrieve the Iterable, one page at a time, with each page containing preferredPageSize items, starting from the next page associated with the given continuation token. To start from first page, use iterableByPage() or iterableByPage(int) instead.
      Parameters:
      preferredPageSize - the preferred page size, service may or may not honor the page size preference hence client MUST be prepared to handle pages with different page size.
      continuationToken - The continuation token used to fetch the next page
      Returns:
      Iterable of a pages