Module mutiny.zero
Package mutiny.zero

Interface PublisherHelpers


  • public interface PublisherHelpers
    • Method Summary

      All Methods Static Methods Deprecated Methods 
      Modifier and Type Method Description
      static <T> java.util.concurrent.CompletionStage<java.util.List<T>> collectToList​(java.util.concurrent.Flow.Publisher<T> publisher)
      Collect all items as a list.
      static <I,​O>
      java.util.concurrent.Flow.Publisher<O>
      map​(java.util.concurrent.Flow.Publisher<I> source, java.util.function.Function<I,​O> mapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Transform instead
    • Method Detail

      • collectToList

        static <T> java.util.concurrent.CompletionStage<java.util.List<T>> collectToList​(java.util.concurrent.Flow.Publisher<T> publisher)
        Collect all items as a list.
        Type Parameters:
        T - the emitted type
        Parameters:
        publisher - the publisher
        Returns:
        the future accumulating the items into a list.
      • map

        @Deprecated(forRemoval=true,
                    since="0.5.0")
        static <I,​O> java.util.concurrent.Flow.Publisher<O> map​(java.util.concurrent.Flow.Publisher<I> source,
                                                                      java.util.function.Function<I,​O> mapper)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use Transform instead
        Simple map implementation.
        Type Parameters:
        I - the input type
        O - the output type
        Parameters:
        source - the upstream
        mapper - the mapper
        Returns:
        the mapped publisher.