-
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.UseTransform
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.UseTransform
insteadSimple map implementation.- Type Parameters:
I
- the input typeO
- the output type- Parameters:
source
- the upstreammapper
- the mapper- Returns:
- the mapped publisher.
-
-