Class FlowableLastSingle<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    SingleSource<T>

    public final class FlowableLastSingle<T>
    extends Single<T>
    Consumes the source Publisher and emits its last item or the defaultItem if empty.
    • Field Detail

      • source

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

        final T defaultItem
    • Constructor Detail

      • FlowableLastSingle

        public FlowableLastSingle​(org.reactivestreams.Publisher<T> source,
                                  T defaultItem)
    • Method Detail

      • subscribeActual

        protected void subscribeActual​(SingleObserver<? super T> 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<T>
        Parameters:
        observer - the SingleObserver to handle, not null