Package org.aksw.commons.rx.op
Class FlowableOperatorConditionalConcat<T,C>
java.lang.Object
org.aksw.commons.rx.op.FlowableOperatorConditionalConcat<T,C>
- Type Parameters:
T- Item typeK- Group key typeV- Accumulator type
- All Implemented Interfaces:
io.reactivex.rxjava3.core.FlowableOperator<T,T>
public final class FlowableOperatorConditionalConcat<T,C>
extends Object
implements io.reactivex.rxjava3.core.FlowableOperator<T,T>
Track all seen items of the downstream flowable. When the downstream completes,
invoke an action that creates a new publisher based on the seen items that
will be concatenated.
Flowable<Entry<Integer, List<Integer>>> list = Flowable
.range(0, 10)
.map(i -> Maps.immutableEntry((int)(i / 3), i))
.lift(FlowableOperatorSequentialGroupBy.<Entry<Integer, Integer>, Integer, List<Integer>>create(Entry::getKey, ArrayList::new, (acc, e) -> acc.add(e.getValue())));
- Author:
- raven
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThis subscriber first consumes the initial upstream and caches all seen items. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFlowableOperatorConditionalConcat(Aggregator<T, ?, C> aggregator, Function<? super C, io.reactivex.rxjava3.core.Flowable<T>> tailFlowFactory) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Subscriber<? super T>static <T,C> FlowableOperatorConditionalConcat<T, C> create(Aggregator<T, ?, C> aggregator, Function<C, io.reactivex.rxjava3.core.Flowable<T>> tailFlowFactory) Create method with the following characteristics: the accumulator constructor is a mere supplier (and thus neither depends on the accumulator count nor the group Key) Group keys are compared using Objects::equals
-
Field Details
-
aggregator
The amount of items to read ahead -
tailFlowFactory
-
-
Constructor Details
-
FlowableOperatorConditionalConcat
-
-
Method Details
-
create
public static <T,C> FlowableOperatorConditionalConcat<T,C> create(Aggregator<T, ?, C> aggregator, Function<C, io.reactivex.rxjava3.core.Flowable<T>> tailFlowFactory) Create method with the following characteristics:- the accumulator constructor is a mere supplier (and thus neither depends on the accumulator count nor the group Key)
- Group keys are compared using Objects::equals
-
apply
-