Class FlowableCollectWithCollectorSingle<T,​A,​R>

  • Type Parameters:
    T - the upstream value type
    A - the intermediate accumulator type
    R - the result type
    All Implemented Interfaces:
    SingleSource<R>, FuseToFlowable<R>

    public final class FlowableCollectWithCollectorSingle<T,​A,​R>
    extends Single<R>
    implements FuseToFlowable<R>
    Collect items into a container defined by a Stream Collector callback set.
    Since:
    3.0.0
    • Field Detail

      • collector

        final java.util.stream.Collector<? super T,​A,​R> collector
    • Constructor Detail

      • FlowableCollectWithCollectorSingle

        public FlowableCollectWithCollectorSingle​(Flowable<T> source,
                                                  java.util.stream.Collector<? super T,​A,​R> collector)
    • Method Detail

      • fuseToFlowable

        public Flowable<R> fuseToFlowable()
        Description copied from interface: FuseToFlowable
        Returns a (direct) Flowable for the operator.

        The implementation should handle the necessary RxJavaPlugins wrapping.

        Specified by:
        fuseToFlowable in interface FuseToFlowable<T>
        Returns:
        the Flowable instance
      • subscribeActual

        protected void subscribeActual​(@NonNull
                                       @NonNull 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