Class FlowableLastStageSubscriber<T>

java.lang.Object
java.util.concurrent.CompletableFuture<T>
io.reactivex.rxjava3.internal.jdk8.FlowableStageSubscriber<T>
io.reactivex.rxjava3.internal.jdk8.FlowableLastStageSubscriber<T>
Type Parameters:
T - the element type
All Implemented Interfaces:
FlowableSubscriber<T>, CompletionStage<T>, Future<T>, org.reactivestreams.Subscriber<T>

public final class FlowableLastStageSubscriber<T> extends FlowableStageSubscriber<T>
Signals the last element of the source via the underlying CompletableFuture, signals the a default item if the upstream is empty or signals NoSuchElementException.
Since:
3.0.0
  • Field Details

    • hasDefault

      final boolean hasDefault
    • defaultItem

      final T defaultItem
  • Constructor Details

    • FlowableLastStageSubscriber

      public FlowableLastStageSubscriber(boolean hasDefault, T defaultItem)
  • Method Details

    • onNext

      public void onNext(T t)
    • onComplete

      public void onComplete()
    • afterSubscribe

      protected void afterSubscribe(org.reactivestreams.Subscription s)
      Specified by:
      afterSubscribe in class FlowableStageSubscriber<T>