Class MaybeFromSingle<T>

java.lang.Object
io.reactivex.rxjava3.core.Maybe<T>
io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
MaybeSource<T>, HasUpstreamSingleSource<T>

public final class MaybeFromSingle<T> extends Maybe<T> implements HasUpstreamSingleSource<T>
Wrap a Single into a Maybe.
  • Field Details

  • Constructor Details

    • MaybeFromSingle

      public MaybeFromSingle(SingleSource<T> source)
  • Method Details

    • source

      public SingleSource<T> source()
      Description copied from interface: HasUpstreamSingleSource
      Returns the upstream source of this Single.

      Allows discovering the chain of observables.

      Specified by:
      source in interface HasUpstreamSingleSource<T>
      Returns:
      the source SingleSource
    • subscribeActual

      protected void subscribeActual(MaybeObserver<? super T> observer)
      Description copied from class: Maybe
      Implement this method in subclasses to handle the incoming MaybeObservers.

      There is no need to call any of the plugin hooks on the current Maybe instance or the MaybeObserver; all hooks and basic safeguards have been applied by Maybe.subscribe(MaybeObserver) before this method gets called.

      Specified by:
      subscribeActual in class Maybe<T>
      Parameters:
      observer - the MaybeObserver to handle, not null