java.lang.Object
com.azure.resourcemanager.resources.fluentcore.utils.PagedConverter

public final class PagedConverter extends Object
Utility class for conversion of PagedResponse.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> com.azure.core.http.rest.PagedFlux<T>
    convertListToPagedFlux(Mono<com.azure.core.http.rest.Response<List<T>>> responseMono)
    Converts Response of List to PagedFlux.
    static <T, S> com.azure.core.http.rest.PagedFlux<S>
    flatMapPage(com.azure.core.http.rest.PagedFlux<T> pagedFlux, Function<? super T,? extends org.reactivestreams.Publisher<? extends S>> mapper)
    Applies flatMap transform to elements of PagedFlux.
    static <T, S> com.azure.core.http.rest.PagedFlux<S>
    mapPage(com.azure.core.http.rest.PagedFlux<T> pagedFlux, Function<T,S> mapper)
    Applies map transform to elements of PagedFlux.
    static <T, S> com.azure.core.http.rest.PagedIterable<S>
    mapPage(com.azure.core.http.rest.PagedIterable<T> pageIterable, Function<T,S> mapper)
    Applies map transform to elements of PagedIterable.
    static <T, S> com.azure.core.http.rest.PagedFlux<S>
    mergePagedFlux(com.azure.core.http.rest.PagedFlux<T> pagedFlux, Function<? super T,com.azure.core.http.rest.PagedFlux<S>> transformer)
    Merge collection of all PagedFlux transformed from elements of PagedFlux to a single PagedFlux.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • mapPage

      public static <T, S> com.azure.core.http.rest.PagedIterable<S> mapPage(com.azure.core.http.rest.PagedIterable<T> pageIterable, Function<T,S> mapper)
      Applies map transform to elements of PagedIterable.
      Type Parameters:
      T - input type of PagedFlux.
      S - return type of PagedFlux.
      Parameters:
      pageIterable - the input of PagedIterable.
      mapper - the map transform of element T to element S.
      Returns:
      the PagedFlux with elements in PagedResponse transformed.
    • mapPage

      public static <T, S> com.azure.core.http.rest.PagedFlux<S> mapPage(com.azure.core.http.rest.PagedFlux<T> pagedFlux, Function<T,S> mapper)
      Applies map transform to elements of PagedFlux.
      Type Parameters:
      T - input type of PagedFlux.
      S - return type of PagedFlux.
      Parameters:
      pagedFlux - the input of PagedFlux.
      mapper - the map transform of element T to element S.
      Returns:
      the PagedFlux with elements in PagedResponse transformed.
    • flatMapPage

      public static <T, S> com.azure.core.http.rest.PagedFlux<S> flatMapPage(com.azure.core.http.rest.PagedFlux<T> pagedFlux, Function<? super T,? extends org.reactivestreams.Publisher<? extends S>> mapper)
      Applies flatMap transform to elements of PagedFlux.
      Type Parameters:
      T - input type of PagedFlux.
      S - return type of PagedFlux.
      Parameters:
      pagedFlux - the input of PagedFlux.
      mapper - the flatMap transform of element T to Publisher of S.
      Returns:
      the PagedFlux with elements in PagedResponse transformed.
    • mergePagedFlux

      public static <T, S> com.azure.core.http.rest.PagedFlux<S> mergePagedFlux(com.azure.core.http.rest.PagedFlux<T> pagedFlux, Function<? super T,com.azure.core.http.rest.PagedFlux<S>> transformer)
      Merge collection of all PagedFlux transformed from elements of PagedFlux to a single PagedFlux.
      Type Parameters:
      T - input type of PagedFlux.
      S - return type of PagedFlux.
      Parameters:
      pagedFlux - the input of PagedFlux.
      transformer - the transform of element T to PagedFlux of S.
      Returns:
      the merged PagedFlux.
    • convertListToPagedFlux

      public static <T> com.azure.core.http.rest.PagedFlux<T> convertListToPagedFlux(Mono<com.azure.core.http.rest.Response<List<T>>> responseMono)
      Converts Response of List to PagedFlux.
      Type Parameters:
      T - type of element.
      Parameters:
      responseMono - the Response of List to convert.
      Returns:
      the PagedFlux.