public class PublisherReducers extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PublisherReducers.PublisherReducersExternalizer |
Modifier and Type | Method and Description |
---|---|
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> |
accumulate(BiConsumer<E,E> biConsumer) |
static Function<org.reactivestreams.Publisher<Long>,CompletionStage<Long>> |
add() |
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<Boolean>> |
allMatch(Predicate<? super E> predicate) |
static Function<org.reactivestreams.Publisher<Boolean>,CompletionStage<Boolean>> |
and() |
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<Boolean>> |
anyMatch(Predicate<? super E> predicate) |
static <I,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E>> |
collect(Supplier<E> supplier,
BiConsumer<E,? super I> consumer) |
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> |
collectorFinalizer(Collector<?,E,?> collector) |
static <I,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E>> |
collectorReducer(Collector<? super I,E,?> collector) |
static Function<org.reactivestreams.Publisher<?>,CompletionStage<Long>> |
count() |
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> |
findFirst() |
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> |
max(Comparator<? super E> comparator) |
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> |
min(Comparator<? super E> comparator) |
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<Boolean>> |
noneMatch(Predicate<? super E> predicate) |
static Function<org.reactivestreams.Publisher<Boolean>,CompletionStage<Boolean>> |
or() |
static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> |
reduce(BinaryOperator<E> operator) |
static <I,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E>> |
reduce(E identity,
BiFunction<E,? super I,E> biFunction)
Provides a reduction where the initial value must be the identity value that is not modified via the provided
biFunction.
|
static <I,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E>> |
reduceWith(Callable<? extends E> initialSupplier,
BiFunction<E,? super I,E> biFunction) |
static <E> Function<org.reactivestreams.Publisher<E[]>,CompletionStage<E[]>> |
toArrayFinalizer() |
static <E> Function<org.reactivestreams.Publisher<E[]>,CompletionStage<E[]>> |
toArrayFinalizer(IntFunction<E[]> generator) |
static <I> Function<org.reactivestreams.Publisher<I>,CompletionStage<Object[]>> |
toArrayReducer() |
static <I extends E,E> |
toArrayReducer(IntFunction<E[]> generator) |
public static Function<org.reactivestreams.Publisher<Boolean>,CompletionStage<Boolean>> and()
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<Boolean>> allMatch(Predicate<? super E> predicate)
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<Boolean>> anyMatch(Predicate<? super E> predicate)
public static <I,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E>> collect(Supplier<E> supplier, BiConsumer<E,? super I> consumer)
public static <I,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E>> collectorReducer(Collector<? super I,E,?> collector)
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> collectorFinalizer(Collector<?,E,?> collector)
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> accumulate(BiConsumer<E,E> biConsumer)
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> findFirst()
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> max(Comparator<? super E> comparator)
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> min(Comparator<? super E> comparator)
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<Boolean>> noneMatch(Predicate<? super E> predicate)
public static Function<org.reactivestreams.Publisher<Boolean>,CompletionStage<Boolean>> or()
public static <I,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E>> reduce(E identity, BiFunction<E,? super I,E> biFunction)
If the initial value needs to be modified, you should use reduceWith(Callable, BiFunction)
instead.
I
- input typeE
- output reduced typeidentity
- initial identity value to use (this value must not be modified by the provide biFunction)biFunction
- biFunction used to reduce the values into a single onepublic static <I,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E>> reduceWith(Callable<? extends E> initialSupplier, BiFunction<E,? super I,E> biFunction)
public static <E> Function<org.reactivestreams.Publisher<E>,CompletionStage<E>> reduce(BinaryOperator<E> operator)
public static Function<org.reactivestreams.Publisher<?>,CompletionStage<Long>> count()
public static Function<org.reactivestreams.Publisher<Long>,CompletionStage<Long>> add()
public static <I> Function<org.reactivestreams.Publisher<I>,CompletionStage<Object[]>> toArrayReducer()
public static <I extends E,E> Function<org.reactivestreams.Publisher<I>,CompletionStage<E[]>> toArrayReducer(IntFunction<E[]> generator)
public static <E> Function<org.reactivestreams.Publisher<E[]>,CompletionStage<E[]>> toArrayFinalizer()
public static <E> Function<org.reactivestreams.Publisher<E[]>,CompletionStage<E[]>> toArrayFinalizer(IntFunction<E[]> generator)
Copyright © 2021 JBoss by Red Hat. All rights reserved.