Class OperatorSwitch<T>

java.lang.Object
rx.internal.operators.OperatorSwitch<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
Func1<Subscriber<? super T>,Subscriber<? super Observable<? extends T>>>, Function, Observable.Operator<T,Observable<? extends T>>

public final class OperatorSwitch<T> extends Object implements Observable.Operator<T,Observable<? extends T>>
Transforms an Observable that emits Observables into a single Observable that emits the items emitted by the most recently published of those Observables.

  • Field Details

    • delayError

      final boolean delayError
  • Constructor Details

    • OperatorSwitch

      OperatorSwitch(boolean delayError)
  • Method Details

    • instance

      public static <T> OperatorSwitch<T> instance(boolean delayError)
      Returns a singleton instance of the operator based on the delayError parameter.
      Type Parameters:
      T - the value type
      Parameters:
      delayError - should the errors of the inner sources delayed until the main sequence completes?
      Returns:
      a singleton instance of this stateless operator.
    • call

      public Subscriber<? super Observable<? extends T>> call(Subscriber<? super T> child)
      Specified by:
      call in interface Func1<Subscriber<? super T>,Subscriber<? super Observable<? extends T>>>