Class OperatorSwitchIfEmpty<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    Func1<Subscriber<? super T>,​Subscriber<? super T>>, Function, Observable.Operator<T,​T>

    public final class OperatorSwitchIfEmpty<T>
    extends java.lang.Object
    implements Observable.Operator<T,​T>
    If the Observable completes without emitting any items, subscribe to an alternate Observable. Allows for similar functionality to Observable.defaultIfEmpty(Object) except instead of one item being emitted when empty, the results of the given Observable will be emitted.