RxJava



rx.operators
Class OperationSwitch

java.lang.Object
  extended by rx.operators.OperationSwitch

public final class OperationSwitch
extends java.lang.Object

Transforms an Observable that emits Observables into a single Observable that emits the items emitted by the most recently published of those Observables.


Constructor Summary
OperationSwitch()
           
 
Method Summary
static
<T> Observable.OnSubscribeFunc<T>
switchDo(Observable<? extends Observable<? extends T>> sequences)
          This function transforms an Observable sequence of Observable sequences into a single Observable sequence which produces values from the most recently published Observable .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationSwitch

public OperationSwitch()
Method Detail

switchDo

public static <T> Observable.OnSubscribeFunc<T> switchDo(Observable<? extends Observable<? extends T>> sequences)
This function transforms an Observable sequence of Observable sequences into a single Observable sequence which produces values from the most recently published Observable .

Parameters:
sequences - The Observable sequence consisting of Observable sequences.
Returns:
A Func1 which does this transformation.