-
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 typeO
- the output type- Parameters:
source
- the upstreammapper
- the mapper- Returns:
- the mapped publisher.
-
-