Class FlowableReduceSeedSingle<T,​R>

  • Type Parameters:
    T - the source value type
    R - the accumulated result type
    All Implemented Interfaces:
    SingleSource<R>

    public final class FlowableReduceSeedSingle<T,​R>
    extends Single<R>
    Reduce a sequence of values, starting from a seed value and by using an accumulator function and return the last accumulated value.
    • Field Detail

      • source

        final org.reactivestreams.Publisher<T> source
      • seed

        final R seed
    • Constructor Detail

      • FlowableReduceSeedSingle

        public FlowableReduceSeedSingle​(org.reactivestreams.Publisher<T> source,
                                        R seed,
                                        BiFunction<R,​? super T,​R> reducer)
    • Method Detail

      • subscribeActual

        protected void subscribeActual​(SingleObserver<? super R> observer)
        Description copied from class: Single
        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 Single.subscribe(SingleObserver) before this method gets called.

        Specified by:
        subscribeActual in class Single<R>
        Parameters:
        observer - the SingleObserver to handle, not null