RxJava



rx.operators
Class OperationToObservableList<T>

java.lang.Object
  extended by rx.operators.OperationToObservableList<T>

public final class OperationToObservableList<T>
extends java.lang.Object

Returns an Observable that emits a single item, a list composed of all the items emitted by the source Observable.

Normally, an Observable that returns multiple items will do so by invoking its Observer's onNext method for each such item. You can change this behavior, instructing the Observable to compose a list of all of these multiple items and then to invoke the Observer's onNext method once, passing it the entire list, by using the toList operator.

Be careful not to use this operator on Observables that emit infinite or very large numbers of items, as you do not have the option to unsubscribe.


Constructor Summary
OperationToObservableList()
           
 
Method Summary
static
<T> Observable.OnSubscribeFunc<java.util.List<T>>
toObservableList(Observable<? extends T> that)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationToObservableList

public OperationToObservableList()
Method Detail

toObservableList

public static <T> Observable.OnSubscribeFunc<java.util.List<T>> toObservableList(Observable<? extends T> that)