Top Description Fields Constructors Methods
io.reactivex.internal.operators.flowable

public final Class FlowableReduceWithSingle<T, R>

extends Single<R>
Class Inheritance
Type Parameters
<T>
the source value type
<R>
the accumulated result type
Imports
java.util.concurrent.Callable, org.reactivestreams.Publisher, io.reactivex.*, io.reactivex.exceptions.Exceptions, io.reactivex.functions.BiFunction, io.reactivex.internal.disposables.EmptyDisposable, io.reactivex.internal.functions.ObjectHelper, io.reactivex.internal.operators.flowable.FlowableReduceSeedSingle.ReduceSeedObserver

Reduce a sequence of values, starting from a generated seed value and by using an accumulator function and return the last accumulated value.

Field Summary

Modifier and TypeField and Description
pack-priv final BiFunction<R, ? super T, R>
pack-priv final Callable<R>
pack-priv final Publisher<T>

Constructor Summary

AccessConstructor and Description
public
FlowableReduceWithSingle(Publisher<T> source, Callable<R> seedSupplier, BiFunction<R, ? super T, R> reducer)

Method Summary

Modifier and TypeMethod and Description
protected void
subscribeActual(SingleObserver<? super R>
the SingleObserver to handle, not null
observer
)

Implements abstract io.reactivex.Single.subscribeActual.

Implement this method in subclasses to handle the incoming SingleObservers.
Inherited from io.reactivex.Single:
ambambArrayambWithasblockingGetcachecastcomposeconcatconcatconcatconcatconcatconcatconcatconcatArrayconcatArrayEagerconcatEagerconcatEagerconcatWithcontainscontainscreatedeferdelaydelaydelaydelaydelaySubscriptiondelaySubscriptiondelaySubscriptiondelaySubscriptiondelaySubscriptiondelaySubscriptiondematerializedoAfterSuccessdoAfterTerminatedoFinallydoOnDisposedoOnErrordoOnEventdoOnSubscribedoOnSuccessdoOnTerminateequalserrorerrorfilterflatMapflatMapCompletableflatMapMaybeflatMapObservableflatMapPublisherflattenAsFlowableflattenAsObservablefromCallablefromFuturefromFuturefromFuturefromFuturefromObservablefromPublisherhideignoreElementjustliftmapmaterializemergemergemergemergemergemergemergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeWithneverobserveOnonErrorResumeNextonErrorResumeNextonErrorReturnonErrorReturnItemonTerminateDetachrepeatrepeatrepeatUntilrepeatWhenretryretryretryretryretryretryWhensubscribesubscribesubscribesubscribesubscribesubscribeOnsubscribeWithtakeUntiltakeUntiltakeUntiltesttesttimeouttimeouttimeouttimeouttimertimertotoCompletabletoFlowabletoFuturetoMaybetoObservableunsafeCreateunsubscribeOnusingusingwrapzipzipzipzipzipzipzipzipzipzipArrayzipWith

Field Detail

reducerback to summary
pack-priv final BiFunction<R, ? super T, R> reducer
seedSupplierback to summary
pack-priv final Callable<R> seedSupplier
sourceback to summary
pack-priv final Publisher<T> source

Constructor Detail

FlowableReduceWithSingleback to summary
public FlowableReduceWithSingle(Publisher<T> source, Callable<R> seedSupplier, BiFunction<R, ? super T, R> reducer)

Method Detail

subscribeActualback to summary
protected void subscribeActual(SingleObserver<? super R> observer)

Implements abstract io.reactivex.Single.subscribeActual.

Doc from io.reactivex.Single.subscribeActual.

Implement this method in subclasses to handle the incoming SingleObservers.

There is no need to call any of the plugin hooks on the current Single instance or the SingleObserver; all hooks and basic safeguards have been applied by subscribe(SingleObserver) before this method gets called.

Parameters
observer:SingleObserver<? super R>

the SingleObserver to handle, not null

Annotations
@Override