Class OperatorSwitchIfEmpty<T>

  • All Implemented Interfaces:
    Func1<Subscriber<? super T>,Subscriber<? super T>>, Function, Observable.Operator<T,T>


    public final class OperatorSwitchIfEmpty<T>
    extends Object
    implements Observable.Operator<T,T>
    If the Observable completes without emitting any items, subscribe to an alternate Observable. Allows for similar functionality to rx.internal.operators.OperatorDefaultIfEmpty except instead of one item being emitted when empty, the results of the given Observable will be emitted.
    • Constructor Detail

      • OperatorSwitchIfEmpty

        public OperatorSwitchIfEmpty(Observable<? extends T> alternate)