Module mutiny.zero
Package mutiny.zero

Interface PublisherHelpers


  • public interface PublisherHelpers
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static <T> java.util.concurrent.CompletionStage<java.util.List<T>> collectToList​(org.reactivestreams.Publisher<T> publisher)
      Collect all items as a list.
      static <I,​O>
      org.reactivestreams.Publisher<O>
      map​(org.reactivestreams.Publisher<I> source, java.util.function.Function<I,​O> mapper)
      Simple map implementation.
    • Method Detail

      • collectToList

        static <T> java.util.concurrent.CompletionStage<java.util.List<T>> collectToList​(org.reactivestreams.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

        static <I,​O> org.reactivestreams.Publisher<O> map​(org.reactivestreams.Publisher<I> source,
                                                                java.util.function.Function<I,​O> mapper)
        Simple map implementation.
        Type Parameters:
        I - the input type
        O - the output type
        Parameters:
        source - the upstream
        mapper - the mapper
        Returns:
        the mapped publisher.