Class ObservableCollectWithCollectorSingle<T,​A,​R>

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

    public final class ObservableCollectWithCollectorSingle<T,​A,​R>
    extends Single<R>
    implements FuseToObservable<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

      • ObservableCollectWithCollectorSingle

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

      • fuseToObservable

        public Observable<R> fuseToObservable()
        Description copied from interface: FuseToObservable
        Returns a (direct) Observable for the operator.

        The implementation should handle the necessary RxJavaPlugins wrapping.

        Specified by:
        fuseToObservable in interface FuseToObservable<T>
        Returns:
        the Observable 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