RxJava: Functional Reactive Programming on the JVM



rx
Class Observable<T>

java.lang.Object
  extended by rx.Observable<T>
Type Parameters:
T - the type of the items emitted by the Observable
Direct Known Subclasses:
ConnectableObservable, GroupedObservable, Subject

public class Observable<T>
extends java.lang.Object

The Observable class that implements the Reactive Pattern.

This class provides methods for subscribing to the Observable as well as delegate methods to the various Observers.

The documentation for this class makes use of marble diagrams. The following legend explains these diagrams:

For more information see the RxJava Wiki


Nested Class Summary
static interface Observable.OnSubscribe<T>
          Invoked when Obserable.subscribe is called.
static interface Observable.OnSubscribeFunc<T>
           
static interface Observable.Operator<R,T>
          Operator function for lifting into an Observable.
 
Constructor Summary
protected Observable(Observable.OnSubscribe<T> f)
          Observable with Function to execute when subscribed to.
 
Method Summary
 Observable<T> aggregate(Func2<T,T,T> accumulator)
          Deprecated. use Observable.reduce(Func2)
<R> Observable<R>
aggregate(R initialValue, Func2<R,? super T,R> accumulator)
          Deprecated. use Observable.reduce(Object, Func2)
 Observable<java.lang.Boolean> all(Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that emits a Boolean that indicates whether all of the items emitted by the source Observable satisfy a condition.
static
<T> Observable<T>
amb(java.lang.Iterable<? extends Observable<? extends T>> sources)
          Mirror the one Observable in an Iterable of several Observables that first emits an item.
static
<T> Observable<T>
amb(Observable<? extends T> o1, Observable<? extends T> o2)
          Given two Observables, mirror the one that first emits an item.
static
<T> Observable<T>
amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3)
          Given three Observables, mirror the one that first emits an item.
static
<T> Observable<T>
amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4)
          Given four Observables, mirror the one that first emits an item.
static
<T> Observable<T>
amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5)
          Given five Observables, mirror the one that first emits an item.
static
<T> Observable<T>
amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6)
          Given six Observables, mirror the one that first emits an item.
static
<T> Observable<T>
amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7)
          Given seven Observables, mirror the one that first emits an item.
static
<T> Observable<T>
amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7, Observable<? extends T> o8)
          Given eight Observables, mirror the one that first emits an item.
static
<T> Observable<T>
amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7, Observable<? extends T> o8, Observable<? extends T> o9)
          Given nine Observables, mirror the one that first emits an item.
<T2> rx.joins.Pattern2<T,T2>
and(Observable<T2> right)
          Returns a Pattern that matches when both Observables emit an item.
 Observable<T> asObservable()
          Hides the identity of this Observable.
static Observable<java.lang.Integer> average(Observable<java.lang.Integer> source)
          Deprecated. use Observable.averageInteger(rx.Observable)
 Observable<java.lang.Double> averageDouble(Func1<? super T,java.lang.Double> valueExtractor)
          Deprecated. Use rxjava-math module instead
static Observable<java.lang.Double> averageDouble(Observable<java.lang.Double> source)
          Deprecated. Use rxjava-math module instead
 Observable<java.lang.Float> averageFloat(Func1<? super T,java.lang.Float> valueExtractor)
          Deprecated. Use rxjava-math module instead
static Observable<java.lang.Float> averageFloat(Observable<java.lang.Float> source)
          Deprecated. Use rxjava-math module instead
 Observable<java.lang.Integer> averageInteger(Func1<? super T,java.lang.Integer> valueExtractor)
          Deprecated. Use rxjava-math module instead
static Observable<java.lang.Integer> averageInteger(Observable<java.lang.Integer> source)
          Deprecated. Use rxjava-math module instead
 Observable<java.lang.Long> averageLong(Func1<? super T,java.lang.Long> valueExtractor)
          Deprecated. Use rxjava-math module instead
static Observable<java.lang.Long> averageLong(Observable<java.lang.Long> source)
          Deprecated. Use rxjava-math module instead
<TClosing> Observable<java.util.List<T>>
buffer(Func0<? extends Observable<? extends TClosing>> bufferClosingSelector)
          Returns an Observable that emits buffers of items it collects from the source Observable.
 Observable<java.util.List<T>> buffer(int count)
          Returns an Observable that emits buffers of items it collects from the source Observable.
 Observable<java.util.List<T>> buffer(int count, int skip)
          Returns an Observable that emits buffers of items it collects from the source Observable.
 Observable<java.util.List<T>> buffer(long timespan, long timeshift, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits buffers of items it collects from the source Observable.
 Observable<java.util.List<T>> buffer(long timespan, long timeshift, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits buffers of items it collects from the source Observable.
 Observable<java.util.List<T>> buffer(long timespan, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits buffers of items it collects from the source Observable.
 Observable<java.util.List<T>> buffer(long timespan, java.util.concurrent.TimeUnit unit, int count)
          Returns an Observable that emits buffers of items it collects from the source Observable.
 Observable<java.util.List<T>> buffer(long timespan, java.util.concurrent.TimeUnit unit, int count, Scheduler scheduler)
          Returns an Observable that emits buffers of items it collects from the source Observable.
 Observable<java.util.List<T>> buffer(long timespan, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits buffers of items it collects from the source Observable.
<TOpening,TClosing>
Observable<java.util.List<T>>
buffer(Observable<? extends TOpening> bufferOpenings, Func1<? super TOpening,? extends Observable<? extends TClosing>> bufferClosingSelector)
          Returns an Observable that emits buffers of items it collects from the source Observable.
<B> Observable<java.util.List<T>>
buffer(Observable<B> boundary)
          Returns an Observable that emits non-overlapping buffered items from the source Observable each time the specified boundary Observable emits an item.
<B> Observable<java.util.List<T>>
buffer(Observable<B> boundary, int initialCapacity)
          Returns an Observable that emits non-overlapping buffered items from the source Observable each time the specified boundary Observable emits an item.
 Observable<T> cache()
          This method has similar behavior to Observable.replay() except that this auto-subscribes to the source Observable rather than returning a ConnectableObservable.
<R> Observable<R>
cast(java.lang.Class<R> klass)
          Returns an Observable that emits the items emitted by the source Observable, converted to the specified type.
<R> Observable<R>
collect(R state, Action2<R,? super T> collector)
          Collect values into a single mutable data structure.
static
<T1,T2,R> Observable<R>
combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Func2<? super T1,? super T2,? extends R> combineFunction)
          Combines two source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from either of the source Observables, where this aggregation is defined by a specified function.
static
<T1,T2,T3,R>
Observable<R>
combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Func3<? super T1,? super T2,? super T3,? extends R> combineFunction)
          Combines three source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
static
<T1,T2,T3,T4,R>
Observable<R>
combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Func4<? super T1,? super T2,? super T3,? super T4,? extends R> combineFunction)
          Combines four source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
static
<T1,T2,T3,T4,T5,R>
Observable<R>
combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Func5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> combineFunction)
          Combines five source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
static
<T1,T2,T3,T4,T5,T6,R>
Observable<R>
combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Func6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> combineFunction)
          Combines six source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
static
<T1,T2,T3,T4,T5,T6,T7,R>
Observable<R>
combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Func7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> combineFunction)
          Combines seven source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
static
<T1,T2,T3,T4,T5,T6,T7,T8,R>
Observable<R>
combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Observable<? extends T8> o8, Func8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> combineFunction)
          Combines eight source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
static
<T1,T2,T3,T4,T5,T6,T7,T8,T9,R>
Observable<R>
combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Observable<? extends T8> o8, Observable<? extends T9> o9, Func9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> combineFunction)
          Combines nine source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
static
<T> Observable<T>
concat(Observable<? extends Observable<? extends T>> observables)
          Returns an Observable that emits the items emitted by each of the Observables emitted by an Observable, one after the other, without interleaving them.
static
<T> Observable<T>
concat(Observable<? extends T> t1, Observable<? extends T> t2)
          Returns an Observable that emits the items emitted by two Observables, one after the other, without interleaving them.
static
<T> Observable<T>
concat(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3)
          Returns an Observable that emits the items emitted by three Observables, one after the other, without interleaving them.
static
<T> Observable<T>
concat(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4)
          Returns an Observable that emits the items emitted by four Observables, one after the other, without interleaving them.
static
<T> Observable<T>
concat(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5)
          Returns an Observable that emits the items emitted by five Observables, one after the other, without interleaving them.
static
<T> Observable<T>
concat(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6)
          Returns an Observable that emits the items emitted by six Observables, one after the other, without interleaving them.
static
<T> Observable<T>
concat(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7)
          Returns an Observable that emits the items emitted by seven Observables, one after the other, without interleaving them.
static
<T> Observable<T>
concat(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7, Observable<? extends T> t8)
          Returns an Observable that emits the items emitted by eight Observables, one after the other, without interleaving them.
static
<T> Observable<T>
concat(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7, Observable<? extends T> t8, Observable<? extends T> t9)
          Returns an Observable that emits the items emitted by nine Observables, one after the other, without interleaving them.
<R> Observable<R>
concatMap(Func1<? super T,? extends Observable<? extends R>> func)
          Returns a new Observable that emits items resulting from applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then emitting the items that result from concatinating those resulting Observables.
 Observable<java.lang.Boolean> contains(T element)
          Returns an Observable that emits a Boolean that indicates whether the source Observable emitted a specified item.
 Observable<java.lang.Integer> count()
          Returns an Observable that emits the count of the total number of items emitted by the source Observable.
static
<T> Observable<T>
create(Observable.OnSubscribe<T> f)
          Returns an Observable that will execute the specified function when a Subscriber subscribes to it.
static
<T> Observable<T>
create(Observable.OnSubscribeFunc<T> f)
          Deprecated. use Observable.create(OnSubscribe)
<U> Observable<T>
debounce(Func1<? super T,? extends Observable<U>> debounceSelector)
          Return an Observable that mirrors the source Observable, except that it drops items emitted by the source Observable that are followed by another item within a computed debounce duration.
 Observable<T> debounce(long timeout, java.util.concurrent.TimeUnit unit)
          Return an Observable that mirrors the source Observable, except that it drops items emitted by the source Observable that are followed by newer items before a timeout value expires.
 Observable<T> debounce(long timeout, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Return an Observable that mirrors the source Observable, except that it drops items emitted by the source Observable that are followed by newer items before a timeout value expires on a specified Scheduler.
 Observable<T> defaultIfEmpty(T defaultValue)
          Returns an Observable that emits the items emitted by the source Observable or a specified default item if the source Observable is empty.
static
<T> Observable<T>
defer(Func0<? extends Observable<? extends T>> observableFactory)
          Returns an Observable that calls an Observable factory to create its Observable for each new Observer that subscribes.
<U,V> Observable<T>
delay(Func0<? extends Observable<U>> subscriptionDelay, Func1<? super T,? extends Observable<V>> itemDelay)
          Returns an Observable that delays the subscription to and emissions from the souce Observable via another Observable on a per-item basis.
<U> Observable<T>
delay(Func1<? super T,? extends Observable<U>> itemDelay)
          Returns an Observable that delays the emissions of the source Observable via another Observable on a per-item basis.
 Observable<T> delay(long delay, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a specified delay.
 Observable<T> delay(long delay, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a specified delay.
 Observable<T> delaySubscription(long delay, java.util.concurrent.TimeUnit unit)
          Return an Observable that delays the subscription to the source Observable by a given amount of time.
 Observable<T> delaySubscription(long delay, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Return an Observable that delays the subscription to the source Observable by a given amount of time, both waiting and subscribing on a given Scheduler.
<T2> Observable<T2>
dematerialize()
          Returns an Observable that reverses the effect of materialize by transforming the Notification objects emitted by the source Observable into the items or notifications they represent.
 Observable<T> distinct()
          Returns an Observable that emits all items emitted by the source Observable that are distinct.
<U> Observable<T>
distinct(Func1<? super T,? extends U> keySelector)
          Returns an Observable that emits all items emitted by the source Observable that are distinct according to a key selector function.
 Observable<T> distinctUntilChanged()
          Returns an Observable that emits all items emitted by the source Observable that are distinct from their immediate predecessors.
<U> Observable<T>
distinctUntilChanged(Func1<? super T,? extends U> keySelector)
          Returns an Observable that emits all items emitted by the source Observable that are distinct from their immediate predecessors, according to a key selector function.
 Observable<T> doOnCompleted(Action0 onCompleted)
          Modifies an Observable so that it invokes an action when it calls onCompleted.
 Observable<T> doOnEach(Action1<Notification<? super T>> onNotification)
          Modifies an Observable so that it invokes an action for each item it emits.
 Observable<T> doOnEach(Observer<? super T> observer)
          Modifies an Observable so that it notifies an Observer for each item it emits.
 Observable<T> doOnError(Action1<java.lang.Throwable> onError)
          Modifies an Observable so that it invokes an action if it calls onError.
 Observable<T> doOnNext(Action1<? super T> onNext)
          Modifies an Observable so that it invokes an action when it calls onNext.
 Observable<T> doOnTerminate(Action0 onTerminate)
          Modifies an Observable so that it invokes an action when it calls onCompleted or onError.
 Observable<T> elementAt(int index)
          Returns an Observable that emits the single item at a specified index in a sequence of emissions from a source Observbable.
 Observable<T> elementAtOrDefault(int index, T defaultValue)
          Returns an Observable that emits the item found at a specified index in a sequence of emissions from a source Observable, or a default item if that index is out of range.
static
<T> Observable<T>
empty()
          Returns an Observable that emits no items to the Observer and immediately invokes its onCompleted method.
static
<T> Observable<T>
empty(Scheduler scheduler)
          Returns an Observable that emits no items to the Observer and immediately invokes its onCompleted method on the specified Scheduler.
static
<T> Observable<T>
error(java.lang.Throwable exception)
          Returns an Observable that invokes an Observer's onError method when the Observer subscribes to it.
static
<T> Observable<T>
error(java.lang.Throwable exception, Scheduler scheduler)
          Returns an Observable that invokes an Observer's onError method on the specified Scheduler.
 Observable<java.lang.Boolean> exists(Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that emits true if any item emitted by the source Observable satisfies a specified condition, otherwise false.
 Observable<T> filter(Func1<? super T,java.lang.Boolean> predicate)
          Filter items emitted by an Observable.
 Observable<T> finallyDo(Action0 action)
          Registers an Action0 to be called when this Observable invokes either onCompleted or onError.
 Observable<T> first()
          Returns an Observable that emits only the very first item emitted by the source Observable, or raises an IllegalArgumentException if the source Observable is empty.
 Observable<T> first(Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition, or raises an IllegalArgumentException if no such items are emitted.
 Observable<T> firstOrDefault(T defaultValue)
          Returns an Observable that emits only the very first item emitted by the source Observable, or a default item if the source Observable completes without emitting anything.
 Observable<T> firstOrDefault(T defaultValue, Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition, or a default item if the source Observable emits no such items.
<R> Observable<R>
flatMap(Func1<? super T,? extends Observable<? extends R>> func)
          Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.
static
<T> Observable<T>
from(java.util.concurrent.Future<? extends T> future)
          Converts a Future into an Observable.
static
<T> Observable<T>
from(java.util.concurrent.Future<? extends T> future, long timeout, java.util.concurrent.TimeUnit unit)
          Converts a Future into an Observable, with a timeout on the Future.
static
<T> Observable<T>
from(java.util.concurrent.Future<? extends T> future, Scheduler scheduler)
          Converts a Future, operating on a specified Scheduler, into an Observable.
static
<T> Observable<T>
from(java.lang.Iterable<? extends T> iterable)
          Converts an Iterable sequence into an Observable that emits the items in the sequence.
static
<T> Observable<T>
from(java.lang.Iterable<? extends T> iterable, Scheduler scheduler)
          Converts an Iterable sequence into an Observable that operates on the specified Scheduler, emitting each item from the sequence.
static
<T> Observable<T>
from(T... t1)
          Converts an Array into an Observable that emits the items in the Array.
static
<T> Observable<T>
from(T t1)
          Converts an item into an Observable that emits that item.
static
<T> Observable<T>
from(T[] items, Scheduler scheduler)
          Converts an Array into an Observable that emits the items in the Array on a specified Scheduler.
static
<T> Observable<T>
from(T t1, T t2)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2))
static
<T> Observable<T>
from(T t1, T t2, T t3)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3)).
static
<T> Observable<T>
from(T t1, T t2, T t3, T t4)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4)).
static
<T> Observable<T>
from(T t1, T t2, T t3, T t4, T t5)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5)).
static
<T> Observable<T>
from(T t1, T t2, T t3, T t4, T t5, T t6)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6)).
static
<T> Observable<T>
from(T t1, T t2, T t3, T t4, T t5, T t6, T t7)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6,t7)).
static
<T> Observable<T>
from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6,t7,t8)).
static
<T> Observable<T>
from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6,t7,t8,t9)).
static
<T> Observable<T>
from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9, T t10)
          Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)).
<K> Observable<GroupedObservable<K,T>>
groupBy(Func1<? super T,? extends K> keySelector)
          Groups the items emitted by an Observable according to a specified criterion, and emits these grouped items as GroupedObservables, one GroupedObservable per group.
<TKey,TDuration>
Observable<GroupedObservable<TKey,T>>
groupByUntil(Func1<? super T,? extends TKey> keySelector, Func1<? super GroupedObservable<TKey,T>,? extends Observable<? extends TDuration>> durationSelector)
          Groups the items emitted by an Observable according to a specified key selector function until the duration Observable expires for the key.
<TKey,TValue,TDuration>
Observable<GroupedObservable<TKey,TValue>>
groupByUntil(Func1<? super T,? extends TKey> keySelector, Func1<? super T,? extends TValue> valueSelector, Func1<? super GroupedObservable<TKey,TValue>,? extends Observable<? extends TDuration>> durationSelector)
          Groups the items emitted by an Observable (transformed by a selector) according to a specified key selector function until the duration Observable expires for the key.
<T2,D1,D2,R>
Observable<R>
groupJoin(Observable<T2> right, Func1<? super T,? extends Observable<D1>> leftDuration, Func1<? super T2,? extends Observable<D2>> rightDuration, Func2<? super T,? super Observable<T2>,? extends R> resultSelector)
          Return an Observable that correlates two Observables when they overlap in time and groups the results.
 Observable<T> ignoreElements()
          Ignores all items emitted by the source Observable and only calls onCompleted or onError.
static Observable<java.lang.Long> interval(long interval, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits a sequential number every specified interval of time.
static Observable<java.lang.Long> interval(long interval, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits a sequential number every specified interval of time, on a specified Scheduler.
 Observable<java.lang.Boolean> isEmpty()
          Returns an Observable that emits true if the source Observable is empty, otherwise false.
<TRight,TLeftDuration,TRightDuration,R>
Observable<R>
join(Observable<TRight> right, Func1<T,Observable<TLeftDuration>> leftDurationSelector, Func1<TRight,Observable<TRightDuration>> rightDurationSelector, Func2<T,TRight,R> resultSelector)
          Correlates the items emitted by two Observables based on overlapping durations.
static
<T> Observable<T>
just(T value)
          Returns an Observable that emits a single item and then completes.
static
<T> Observable<T>
just(T value, Scheduler scheduler)
          Deprecated. use #from(T)
 Observable<T> last()
          Returns an Observable that emits the last item emitted by the source Observable or notifies observers of an IllegalArgumentException if the source Observable is empty.
 Observable<T> last(Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that emits only the last item emitted by the source Observable that satisfies a given condition, or an IllegalArgumentException if no such items are emitted.
 Observable<T> lastOrDefault(T defaultValue)
          Returns an Observable that emits only the last item emitted by the source Observable, or a default item if the source Observable completes without emitting any items.
 Observable<T> lastOrDefault(T defaultValue, Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that emits only the last item emitted by the source Observable that satisfies a specified condition, or a default item if no such item is emitted by the source Observable.
<R> Observable<R>
lift(Observable.Operator<? extends R,? super T> lift)
          Lift a function to the current Observable and return a new Observable that when subscribed to will pass the values of the current Observable through the function.
 Observable<java.lang.Long> longCount()
          Returns an Observable that counts the total number of items emitted by the source Observable and emits this count as a 64-bit Long.
<R> Observable<R>
map(Func1<? super T,? extends R> func)
          Returns an Observable that applies a specified function to each item emitted by the source Observable and emits the results of these function applications.
<R> Observable<R>
mapMany(Func1<? super T,? extends Observable<R>> func)
          Deprecated. use Observable.flatMap(Func1)
 Observable<Notification<T>> materialize()
          Turns all of the emissions and notifications from a source Observable into emissions marked with their original types within Notification objects.
 Observable<T> max(java.util.Comparator<? super T> comparator)
          Deprecated. Use rxjava-math module instead
static
<T extends java.lang.Comparable<? super T>>
Observable<T>
max(Observable<T> source)
          Deprecated. use rxjava-math module instead
<R extends java.lang.Comparable<? super R>>
Observable<java.util.List<T>>
maxBy(Func1<T,R> selector)
          Returns an Observable that emits a List of items emitted by the source Observable that have the maximum key value.
<R> Observable<java.util.List<T>>
maxBy(Func1<T,R> selector, java.util.Comparator<? super R> comparator)
          Returns an Observable that emits a List of items emitted by the source Observable that have the maximum key value according to a specified comparator.
static
<T> Observable<T>
merge(java.lang.Iterable<? extends Observable<? extends T>> sequences)
          Flattens an Iterable of Observables into one Observable, without any transformation.
static
<T> Observable<T>
merge(java.lang.Iterable<? extends Observable<? extends T>> sequences, int maxConcurrent)
          Flattens an Iterable of Observables into one Observable, without any transformation, while limiting the number of concurrent subscriptions to these Observables.
static
<T> Observable<T>
merge(java.lang.Iterable<? extends Observable<? extends T>> sequences, int maxConcurrent, Scheduler scheduler)
          Flattens an Iterable of Observables into one Observable, without any transformation, while limiting the number of concurrent subscriptions to these Observables, and subscribing to these Observables on a specified Scheduler.
static
<T> Observable<T>
merge(java.lang.Iterable<? extends Observable<? extends T>> sequences, Scheduler scheduler)
          Flattens an Iterable of Observables into one Observable, without any transformation, subscribing to these Observables on a specified Scheduler.
static
<T> Observable<T>
merge(Observable<? extends Observable<? extends T>> source)
          Flattens an Observable that emits Observables into a single Observable that emits the items emitted by those Observables, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends Observable<? extends T>> source, int maxConcurrent)
          Flattens an Observable that emits Observables into a single Observable that emits the items emitted by those Observables, without any transformation, while limiting the maximum number of concurrent subscriptions to these Observables.
static
<T> Observable<T>
merge(Observable<? extends T>[] sequences)
          Flattens an Array of Observables into one Observable, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends T>[] sequences, Scheduler scheduler)
          Flattens an Array of Observables into one Observable, without any transformation, traversing the array on a specified Scheduler.
static
<T> Observable<T>
merge(Observable<? extends T> t1, Observable<? extends T> t2)
          Flattens two Observables into a single Observable, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3)
          Flattens three Observables into a single Observable, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4)
          Flattens four Observables into a single Observable, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5)
          Flattens five Observables into a single Observable, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6)
          Flattens six Observables into a single Observable, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7)
          Flattens seven Observables into a single Observable, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7, Observable<? extends T> t8)
          Flattens eight Observables into a single Observable, without any transformation.
static
<T> Observable<T>
merge(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7, Observable<? extends T> t8, Observable<? extends T> t9)
          Flattens nine Observables into a single Observable, without any transformation.
static
<T> Observable<T>
mergeDelayError(Observable<? extends Observable<? extends T>> source)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
static
<T> Observable<T>
mergeDelayError(Observable<? extends T> t1, Observable<? extends T> t2)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
static
<T> Observable<T>
mergeDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
static
<T> Observable<T>
mergeDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
static
<T> Observable<T>
mergeDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
static
<T> Observable<T>
mergeDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
static
<T> Observable<T>
mergeDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
static
<T> Observable<T>
mergeDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7, Observable<? extends T> t8)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
static
<T> Observable<T>
mergeDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7, Observable<? extends T> t8, Observable<? extends T> t9)
          A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.
<R> Observable<R>
mergeMap(Func1<? super T,? extends Observable<? extends R>> func)
          Returns an Observable that emits the results of applying a specified function to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.
<R> Observable<R>
mergeMap(Func1<? super T,? extends Observable<? extends R>> onNext, Func1<? super java.lang.Throwable,? extends Observable<? extends R>> onError, Func0<? extends Observable<? extends R>> onCompleted)
          Returns an Observable that applies a function to each item emitted or notification raised by the source Observable and then flattens the Observables returned from these functions and emits the resulting items.
<U,R> Observable<R>
mergeMap(Func1<? super T,? extends Observable<? extends U>> collectionSelector, Func2<? super T,? super U,? extends R> resultSelector)
          Returns an Observable that emits the results of a specified function to the pair of values emitted by the source Observable and a specified collection Observable.
<R> Observable<R>
mergeMapIterable(Func1<? super T,? extends java.lang.Iterable<? extends R>> collectionSelector)
          Returns an Observable that merges each item emitted by the source Observable with the values in an Iterable corresponding to that item that is generated by a selector.
<U,R> Observable<R>
mergeMapIterable(Func1<? super T,? extends java.lang.Iterable<? extends U>> collectionSelector, Func2<? super T,? super U,? extends R> resultSelector)
          Returns an Observable that emits the results of applying a function to the pair of values from the source Observable and an Iterable corresponding to that item that is generated by a selector.
 Observable<T> min(java.util.Comparator<? super T> comparator)
          Deprecated. Use rxjava-math module instead
static
<T extends java.lang.Comparable<? super T>>
Observable<T>
min(Observable<T> source)
          Deprecated. Use rxjava-math module instead
<R extends java.lang.Comparable<? super R>>
Observable<java.util.List<T>>
minBy(Func1<T,R> selector)
          Returns an Observable that emits a List of items emitted by the source Observable that have the minimum key value.
<R> Observable<java.util.List<T>>
minBy(Func1<T,R> selector, java.util.Comparator<? super R> comparator)
          Returns an Observable that emits a List of items emitted by the source Observable that have the minimum key value according to a given comparator function.
<TIntermediate,TResult>
Observable<TResult>
multicast(Func0<? extends Subject<? super T,? extends TIntermediate>> subjectFactory, Func1<? super Observable<TIntermediate>,? extends Observable<TResult>> selector)
          Returns an Observable that emits items produced by multicasting the source Observable within a selector function.
<R> ConnectableObservable<R>
multicast(Subject<? super T,? extends R> subject)
          Returns a ConnectableObservable that upon connection causes the source Observable to push results into the specified subject.
 Observable<Observable<T>> nest()
          Convert the current Observable<T> into an Observable<Observable<T>>.
static
<T> Observable<T>
never()
          Returns an Observable that never sends any items or notifications to an Observer.
 Observable<T> observeOn(Scheduler scheduler)
          Move notifications to the specified Scheduler asynchronously with an unbounded buffer.
<R> Observable<R>
ofType(java.lang.Class<R> klass)
          Filters the items emitted by an Observable, only emitting those of the specified type.
 Observable<T> onErrorFlatMap(Func1<OnErrorThrowable,? extends Observable<? extends T>> resumeFunction)
          Allows inserting onNext events into a stream when onError events are received and continuing the original sequence instead of terminating.
 Observable<T> onErrorResumeNext(Func1<java.lang.Throwable,? extends Observable<? extends T>> resumeFunction)
          Instruct an Observable to pass control to another Observable rather than invoking onError if it encounters an error.
 Observable<T> onErrorResumeNext(Observable<? extends T> resumeSequence)
          Instruct an Observable to pass control to another Observable rather than invoking onError if it encounters an error.
 Observable<T> onErrorReturn(Func1<java.lang.Throwable,? extends T> resumeFunction)
          Instruct an Observable to emit an item (returned by a specified function) rather than invoking onError if it encounters an error.
 Observable<T> onExceptionResumeNext(Observable<? extends T> resumeSequence)
          Instruct an Observable to pass control to another Observable rather than invoking onError if it encounters an Exception.
<R> Observable<R>
parallel(Func1<Observable<T>,Observable<R>> f)
          Perform work on the source Observable<T> in parallel by sharding it on a Schedulers.computation() Scheduler, and return the resulting Observable<R>.
<R> Observable<R>
parallel(Func1<Observable<T>,Observable<R>> f, Scheduler s)
          Perform work on the source Observable<T> in parallel by sharding it on a Scheduler, and return the resulting Observable<R>.
static
<T> Observable<Observable<T>>
parallelMerge(Observable<Observable<T>> source, int parallelObservables)
          Converts an Observable<Observable<T>> into another Observable<Observable<T>> whose emitted Observables emit the same items, but the number of such Observables is restricted by parallelObservables.
static
<T> Observable<Observable<T>>
parallelMerge(Observable<Observable<T>> source, int parallelObservables, Scheduler scheduler)
          Converts an Observable<Observable<T>> into another Observable<Observable<T>> whose emitted Observables emit the same items, but the number of such Observables is restricted by parallelObservables, and each runs on a defined Scheduler.
static
<K1,K2,T> Observable<GroupedObservable<K2,GroupedObservable<K1,T>>>
pivot(Observable<GroupedObservable<K1,GroupedObservable<K2,T>>> groups)
          Pivot GroupedObservable streams without serializing/synchronizing to a single stream first.
 ConnectableObservable<T> publish()
          Returns a ConnectableObservable, which waits until its connect method is called before it begins emitting items to those Observers that have subscribed to it.
<R> Observable<R>
publish(Func1<? super Observable<T>,? extends Observable<R>> selector)
          Returns an Observable that emits the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the underlying sequence.
<R> Observable<R>
publish(Func1<? super Observable<T>,? extends Observable<R>> selector, T initialValue)
          Returns an Observable that emits initialValue followed by the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable.
 ConnectableObservable<T> publish(T initialValue)
          Returns an Observable that emits initialValue followed by the items emitted by a ConnectableObservable that shares a single subscription to the source Observable.
 ConnectableObservable<T> publishLast()
          Returns a ConnectableObservable that emits only the last item emitted by the source Observable.
<R> Observable<R>
publishLast(Func1<? super Observable<T>,? extends Observable<R>> selector)
          Returns an Observable that emits an item that results from invoking a specified selector on the last item emitted by a ConnectableObservable that shares a single subscription to the source Observable.
static Observable<java.lang.Integer> range(int start, int count)
          Returns an Observable that emits a sequence of Integers within a specified range.
static Observable<java.lang.Integer> range(int start, int count, Scheduler scheduler)
          Returns an Observable that emits a sequence of Integers within a specified range, on a specified Scheduler.
 Observable<T> reduce(Func2<T,T,T> accumulator)
          Returns an Observable that applies a function of your choosing to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, and emits the final result from the final call to your function as its sole item.
<R> Observable<R>
reduce(R initialValue, Func2<R,? super T,R> accumulator)
          Returns an Observable that applies a function of your choosing to the first item emitted by a source Observable and a specified seed value, then feeds the result of that function along with the second item emitted by an Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the final result from the final call to your function as its sole item.
 Observable<T> repeat()
          Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely.
 Observable<T> repeat(long count)
          Returns an Observable that repeats the sequence of items emitted by the source Observable at most count times.
 Observable<T> repeat(long count, Scheduler scheduler)
          Returns an Observable that repeats the sequence of items emitted by the source Observable at most count times, on a particular Scheduler.
 Observable<T> repeat(Scheduler scheduler)
          Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely, on a particular Scheduler.
 ConnectableObservable<T> replay()
          Returns a ConnectableObservable that shares a single subscription to the underlying Observable that will replay all of its items and notifications to any future Observer.
<R> Observable<R>
replay(Func1<? super Observable<T>,? extends Observable<R>> selector)
          Returns an Observable that emits items that are the results of invoking a specified selector on the items emitted by a ConnectableObservable that shares a single subscription to the source Observable.
<R> Observable<R>
replay(Func1<? super Observable<T>,? extends Observable<R>> selector, int bufferSize)
          Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying bufferSize notifications.
<R> Observable<R>
replay(Func1<? super Observable<T>,? extends Observable<R>> selector, int bufferSize, long time, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying no more than bufferSize items that were emitted within a specified time window.
<R> Observable<R>
replay(Func1<? super Observable<T>,? extends Observable<R>> selector, int bufferSize, long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying no more than bufferSize items that were emitted within a specified time window.
<R> Observable<R>
replay(Func1<? super Observable<T>,? extends Observable<R>> selector, int bufferSize, Scheduler scheduler)
          Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying a maximum of bufferSize items.
<R> Observable<R>
replay(Func1<? super Observable<T>,? extends Observable<R>> selector, long time, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying all items that were emitted within a specified time window.
<R> Observable<R>
replay(Func1<? super Observable<T>,? extends Observable<R>> selector, long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying all items that were emitted within a specified time window.
<R> Observable<R>
replay(Func1<? super Observable<T>,? extends Observable<R>> selector, Scheduler scheduler)
          Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable.
 ConnectableObservable<T> replay(int bufferSize)
          Returns a ConnectableObservable that shares a single subscription to the source Observable that replays at most bufferSize items emitted by that Observable.
 ConnectableObservable<T> replay(int bufferSize, long time, java.util.concurrent.TimeUnit unit)
          Returns a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items that were emitted during a specified time window.
 ConnectableObservable<T> replay(int bufferSize, long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns a ConnectableObservable that shares a single subscription to the source Observable and that replays a maximum of bufferSize items that are emitted within a specified time window.
 ConnectableObservable<T> replay(int bufferSize, Scheduler scheduler)
          Returns a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items emitted by that Observable.
 ConnectableObservable<T> replay(long time, java.util.concurrent.TimeUnit unit)
          Returns a ConnectableObservable that shares a single subscription to the source Observable and replays all items emitted by that Observable within a specified time window.
 ConnectableObservable<T> replay(long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns a ConnectableObservable that shares a single subscription to the source Observable and replays all items emitted by that Observable within a specified time window.
 ConnectableObservable<T> replay(Scheduler scheduler)
          Returns a ConnectableObservable that shares a single subscription to the source Observable that will replay all of its items and notifications to any future Observer on the given Scheduler.
 Observable<T> retry()
          Return an Observable that mirrors the source Observable, resubscribing to it if it calls onError (infinite retry count).
 Observable<T> retry(int retryCount)
          Return an Observable that mirrors the source Observable, resubscribing to it if it calls onError up to a specified number of retries.
 Observable<T> sample(long period, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits the results of sampling the items emitted by the source Observable at a specified time interval.
 Observable<T> sample(long period, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits the results of sampling the items emitted by the source Observable at a specified time interval.
<U> Observable<T>
sample(Observable<U> sampler)
          Return an Observable that emits the results of sampling the items emitted by the source Observable whenever the specified sampler Observable emits an item or completes.
 Observable<T> scan(Func2<T,T,T> accumulator)
          Returns an Observable that applies a function of your choosing to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the result of each of these iterations.
<R> Observable<R>
scan(R initialValue, Func2<R,? super T,R> accumulator)
          Returns an Observable that applies a function of your choosing to the first item emitted by a source Observable and a seed value, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the result of each of these iterations.
static
<T> Observable<java.lang.Boolean>
sequenceEqual(Observable<? extends T> first, Observable<? extends T> second)
          Returns an Observable that emits a Boolean value that indicates whether two Observable sequences are the same by comparing the items emitted by each Observable pairwise.
static
<T> Observable<java.lang.Boolean>
sequenceEqual(Observable<? extends T> first, Observable<? extends T> second, Func2<? super T,? super T,java.lang.Boolean> equality)
          Returns an Observable that emits a Boolean value that indicates whether two Observable sequences are the same by comparing the items emitted by each Observable pairwise based on the results of a specified equality function.
 Observable<T> serialize()
           
 Observable<T> single()
          If the source Observable completes after emitting a single item, return an Observable that emits that item.
 Observable<T> single(Func1<? super T,java.lang.Boolean> predicate)
          If the Observable completes after emitting a single item that matches a specified predicate, return an Observable that emits that item.
 Observable<T> singleOrDefault(T defaultValue)
          If the source Observable completes after emitting a single item, return an Observable that emits that item; if the source Observable is empty, return an Observable that emits a default item.
 Observable<T> singleOrDefault(T defaultValue, Func1<? super T,java.lang.Boolean> predicate)
          If the Observable completes after emitting a single item that matches a predicate, return an Observable that emits that item; if the source Observable emits no such item, return an Observable that emits a default item.
 Observable<T> skip(int num)
          Returns an Observable that skips the first num items emitted by the source Observable and emits the remainder.
 Observable<T> skip(long time, java.util.concurrent.TimeUnit unit)
          Returns an Observable that skips values emitted by the source Observable before a specified time window elapses.
 Observable<T> skip(long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that skips values emitted by the source Observable before a specified time window on a specified Scheduler elapses.
 Observable<T> skipLast(int count)
          Returns an Observable that drops a specified number of items from the end of the sequence emitted by the source Observable.
 Observable<T> skipLast(long time, java.util.concurrent.TimeUnit unit)
          Returns an Observable that drops items emitted by the source Observable during a specified time window before the source completes.
 Observable<T> skipLast(long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that drops items emitted by the source Observable during a specified time window (defined on a specified scheduler) before the source completes.
<U> Observable<T>
skipUntil(Observable<U> other)
          Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.
 Observable<T> skipWhile(Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.
 Observable<T> skipWhileWithIndex(Func2<? super T,java.lang.Integer,java.lang.Boolean> predicate)
          Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.
 Observable<T> startWith(java.lang.Iterable<T> values)
          Returns an Observable that emits the items in a specified Iterable before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(java.lang.Iterable<T> values, Scheduler scheduler)
          Returns an Observable that emits the items in a specified Iterable, on a specified Scheduler, before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(Observable<T> values)
          Returns an Observable that emits the items in a specified Observable before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1)
          Returns an Observable that emits a specified item before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T[] values, Scheduler scheduler)
          Returns an Observable that emits the items from a specified array, on a specified Scheduler, before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1, T t2)
          Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1, T t2, T t3)
          Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1, T t2, T t3, T t4)
          Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1, T t2, T t3, T t4, T t5)
          Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1, T t2, T t3, T t4, T t5, T t6)
          Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7)
          Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8)
          Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.
 Observable<T> startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9)
          Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.
 Subscription subscribe()
          Subscribe and ignore all events.
 Subscription subscribe(Action1<? super T> onNext)
          An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.
 Subscription subscribe(Action1<? super T> onNext, Action1<java.lang.Throwable> onError)
          An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.
 Subscription subscribe(Action1<? super T> onNext, Action1<java.lang.Throwable> onError, Action0 onComplete)
          An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.
 Subscription subscribe(Action1<? super T> onNext, Action1<java.lang.Throwable> onError, Action0 onComplete, Scheduler scheduler)
          An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.
 Subscription subscribe(Action1<? super T> onNext, Action1<java.lang.Throwable> onError, Scheduler scheduler)
          An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.
 Subscription subscribe(Action1<? super T> onNext, Scheduler scheduler)
          An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.
 Subscription subscribe(Observer<? super T> observer)
          An Observer must subscribe to an Observable in order to receive items and notifications from the Observable.
 Subscription subscribe(Observer<? super T> observer, Scheduler scheduler)
          An Observer must subscribe to an Observable in order to receive items and notifications from the Observable.
 Subscription subscribe(Subscriber<? super T> subscriber)
          A Subscriber must call an Observable's subscribe method in order to receive items and notifications from the Observable.
 Subscription subscribe(Subscriber<? super T> observer, Scheduler scheduler)
          A Subscriber must call an Observable's subscribe method in order to receive items and notifications from the Observable.
 Observable<T> subscribeOn(Scheduler scheduler)
          Asynchronously subscribes Observers to this Observable on the specified Scheduler.
 Observable<java.lang.Double> sumDouble(Func1<? super T,java.lang.Double> valueExtractor)
          Deprecated. Use rxjava-math module instead
static Observable<java.lang.Double> sumDouble(Observable<java.lang.Double> source)
          Deprecated. Use rxjava-math module instead
 Observable<java.lang.Float> sumFloat(Func1<? super T,java.lang.Float> valueExtractor)
          Deprecated. Use rxjava-math module instead
static Observable<java.lang.Float> sumFloat(Observable<java.lang.Float> source)
          Deprecated. Use rxjava-math module instead
 Observable<java.lang.Integer> sumInteger(Func1<? super T,java.lang.Integer> valueExtractor)
          Deprecated. Use rxjava-math module instead
static Observable<java.lang.Integer> sumInteger(Observable<java.lang.Integer> source)
          Deprecated. Use rxjava-math module instead
 Observable<java.lang.Long> sumLong(Func1<? super T,java.lang.Long> valueExtractor)
          Deprecated. Use rxjava-math module instead
static Observable<java.lang.Long> sumLong(Observable<java.lang.Long> source)
          Deprecated. Use rxjava-math module instead
static
<T> Observable<T>
switchDo(Observable<? extends Observable<? extends T>> sequenceOfSequences)
          Deprecated. use Observable.switchOnNext(rx.Observable>)
static
<T> Observable<T>
switchLatest(Observable<? extends Observable<? extends T>> sequenceOfSequences)
          Given an Observable that emits Observables, returns an Observable that emits the items emitted by the most recently emitted of those Observables.
<R> Observable<R>
switchMap(Func1<? super T,? extends Observable<? extends R>> func)
          Returns a new Observable by applying a function that you supply to each item emitted by the source Observable that returns an Observable, and then emitting the items emitted by the most recently emitted of these Observables.
static
<T> Observable<T>
switchOnNext(Observable<? extends Observable<? extends T>> sequenceOfSequences)
          Given an Observable that emits Observables, returns an Observable that emits the items emitted by the most recently emitted of those Observables.
 Observable<T> synchronize()
          Deprecated. Use Observable.serialize() instead as it doesn't block threads while emitting notification.
 Observable<T> synchronize(java.lang.Object lock)
          Deprecated. Use Observable.serialize() instead as it doesn't block threads while emitting notification.
static
<T> Observable<T>
synchronize(Observable<T> source)
          Deprecated. use Observable.synchronize() or Observable.synchronize(Object)
 Observable<T> take(int num)
          Returns an Observable that emits only the first num items emitted by the source Observable.
 Observable<T> take(long time, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits those items emitted by source Observable before a specified time runs out.
 Observable<T> take(long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits those items emitted by source Observable before a specified time (on a specified Scheduler) runs out.
 Observable<T> takeFirst()
          Deprecated. use take(1) directly
 Observable<T> takeFirst(Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition.
 Observable<T> takeLast(int count)
          Returns an Observable that emits only the last count items emitted by the source Observable.
 Observable<T> takeLast(int count, long time, java.util.concurrent.TimeUnit unit)
          Return an Observable that emits at most a specified number of items from the source Observable that were emitted in a specified window of time before the Observable completed.
 Observable<T> takeLast(int count, long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Return an Observable that emits at most a specified number of items from the source Observable that were emitted in a specified window of time before the Observable completed, where the timing information is provided by a given Scheduler.
 Observable<T> takeLast(long time, java.util.concurrent.TimeUnit unit)
          Return an Observable that emits the items from the source Observable that were emitted in a specified window of time before the Observable completed.
 Observable<T> takeLast(long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Return an Observable that emits the items from the source Observable that were emitted in a specified window of time before the Observable completed, where the timing information is provided by a specified Scheduler.
 Observable<java.util.List<T>> takeLastBuffer(int count)
          Return an Observable that emits a single List containing the last count elements emitted by the source Observable.
 Observable<java.util.List<T>> takeLastBuffer(int count, long time, java.util.concurrent.TimeUnit unit)
          Return an Observable that emits a single List containing at most count items from the source Observable that were emitted during a specified window of time before the source Observable completed.
 Observable<java.util.List<T>> takeLastBuffer(int count, long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Return an Observable that emits a single List containing at most count items from the source Observable that were emitted during a specified window of time (on a specified Scheduler) before the source Observable completed.
 Observable<java.util.List<T>> takeLastBuffer(long time, java.util.concurrent.TimeUnit unit)
          Return an Observable that emits a single List containing those items from the source Observable that were emitted during a specified window of time before the source Observable completed.
 Observable<java.util.List<T>> takeLastBuffer(long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Return an Observable that emits a single List containing those items from the source Observable that were emitted during a specified window of time before the source Observable completed, where the timing information is provided by the given Scheduler.
<E> Observable<T>
takeUntil(Observable<? extends E> other)
          Returns an Observable that emits the items emitted by the source Observable until a second Observable emits an item.
 Observable<T> takeWhile(Func1<? super T,java.lang.Boolean> predicate)
          Returns an Observable that emits items emitted by the source Observable so long as each item satisfied a specified condition, and then completes as soon as this condition is not satisfied.
 Observable<T> takeWhileWithIndex(Func2<? super T,? super java.lang.Integer,java.lang.Boolean> predicate)
          Returns an Observable that emits the items emitted by a source Observable so long as a given predicate remains true, where the predicate operates on both the item and its index relative to the complete sequence of emitted items.
<R> rx.joins.Plan0<R>
then(Func1<T,R> selector)
          Matches when the Observable has an available item and projects the item by invoking the selector function.
 Observable<T> throttleFirst(long windowDuration, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration.
 Observable<T> throttleFirst(long skipDuration, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration, where the windows are managed by a specified Scheduler.
 Observable<T> throttleLast(long intervalDuration, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits only the last item emitted by the source Observable during sequential time windows of a specified duration.
 Observable<T> throttleLast(long intervalDuration, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits only the last item emitted by the source Observable during sequential time windows of a specified duration, where the duration is governed by a specified Scheduler.
 Observable<T> throttleWithTimeout(long timeout, java.util.concurrent.TimeUnit unit)
          Returns an Observable that only emits those items emitted by the source Observable that are not followed by another emitted item within a specified time window.
 Observable<T> throttleWithTimeout(long timeout, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that only emits those items emitted by the source Observable that are not followed by another emitted item within a specified time window, where the time window is governed by a specified Scheduler.
 Observable<TimeInterval<T>> timeInterval()
          Returns an Observable that emits records of the time interval between consecutive items emitted by the source Observable.
 Observable<TimeInterval<T>> timeInterval(Scheduler scheduler)
          Returns an Observable that emits records of the time interval between consecutive items emitted by the source Observable, where this interval is computed on a specified Scheduler.
<U,V> Observable<T>
timeout(Func0<? extends Observable<U>> firstTimeoutSelector, Func1<? super T,? extends Observable<V>> timeoutSelector)
          Returns an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if either the first item emitted by the source Observable or any subsequent item don't arrive within time windows defined by other Observables.
<U,V> Observable<T>
timeout(Func0<? extends Observable<U>> firstTimeoutSelector, Func1<? super T,? extends Observable<V>> timeoutSelector, Observable<? extends T> other)
          Returns an Observable that mirrors the source Observable, but switches to a fallback Observable if either the first item emitted by the source Observable or any subsequent item don't arrive within time windows defined by other Observables.
<V> Observable<T>
timeout(Func1<? super T,? extends Observable<V>> timeoutSelector)
          Returns an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if an item emitted by the source Observable doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by an Observable that is a function of the previous item.
<V> Observable<T>
timeout(Func1<? super T,? extends Observable<V>> timeoutSelector, Observable<? extends T> other)
          Returns an Observable that mirrors the source Observable, but that switches to a fallback Observable if an item emitted by the source Observable doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by an Observable that is a function of the previous item.
 Observable<T> timeout(long timeout, java.util.concurrent.TimeUnit timeUnit)
          Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item.
 Observable<T> timeout(long timeout, java.util.concurrent.TimeUnit timeUnit, Observable<? extends T> other)
          Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item.
 Observable<T> timeout(long timeout, java.util.concurrent.TimeUnit timeUnit, Observable<? extends T> other, Scheduler scheduler)
          Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item using a specified Scheduler.
 Observable<T> timeout(long timeout, java.util.concurrent.TimeUnit timeUnit, Scheduler scheduler)
          Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item, where this policy is governed on a specified Scheduler.
static Observable<java.lang.Long> timer(long initialDelay, long period, java.util.concurrent.TimeUnit unit)
          Return an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter.
static Observable<java.lang.Long> timer(long initialDelay, long period, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Return an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter, on a specified Scheduler.
static Observable<java.lang.Long> timer(long delay, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits one item after a specified delay, and then completes.
static Observable<java.lang.Long> timer(long delay, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits one item after a specified delay, on a specified Scheduler, and then completes.
 Observable<Timestamped<T>> timestamp()
          Returns an Observable that emits each item emitted by the source Observable, wrapped in a Timestamped object.
 Observable<Timestamped<T>> timestamp(Scheduler scheduler)
          Returns an Observable that emits each item emitted by the source Observable, wrapped in a Timestamped object whose timestamps are provided by a specified Scheduler.
 BlockingObservable<T> toBlockingObservable()
          Converts an Observable into a BlockingObservable (an Observable with blocking operators).
 Observable<java.util.List<T>> toList()
          Returns an Observable that emits a single item, a list composed of all the items emitted by the source Observable.
<K> Observable<java.util.Map<K,T>>
toMap(Func1<? super T,? extends K> keySelector)
          Return an Observable that emits a single HashMap containing all items emitted by the source Observable, mapped by the keys returned by a specified keySelector function.
<K,V> Observable<java.util.Map<K,V>>
toMap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector)
          Return an Observable that emits a single HashMap containing values corresponding to items emitted by the source Observable, mapped by the keys returned by a specified keySelector function.
<K,V> Observable<java.util.Map<K,V>>
toMap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,V>> mapFactory)
          Return an Observable that emits a single Map, returned by a specified mapFactory function, that contains keys and values extracted from the items emitted by the source Observable.
<K> Observable<java.util.Map<K,java.util.Collection<T>>>
toMultimap(Func1<? super T,? extends K> keySelector)
          Return an Observable that emits a single HashMap that contains an ArrayList of items emitted by the source Observable keyed by a specified keySelector function.
<K,V> Observable<java.util.Map<K,java.util.Collection<V>>>
toMultimap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector)
          Return an Observable that emits a single HashMap that contains an ArrayList of values extracted by a specified valueSelector function from items emitted by the source Observable, keyed by a specified keySelector function.
<K,V> Observable<java.util.Map<K,java.util.Collection<V>>>
toMultimap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,java.util.Collection<V>>> mapFactory)
          Return an Observable that emits a single Map, returned by a specified mapFactory function, that contains an ArrayList of values, extracted by a specified valueSelector function from items emitted by the source Observable and keyed by the keySelector function.
<K,V> Observable<java.util.Map<K,java.util.Collection<V>>>
toMultimap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,java.util.Collection<V>>> mapFactory, Func1<? super K,? extends java.util.Collection<V>> collectionFactory)
          Return an Observable that emits a single Map, returned by a specified mapFactory function, that contains a custom collection of values, extracted by a specified valueSelector function from items emitted by the source Observable, and keyed by the keySelector function.
 Observable<java.util.List<T>> toSortedList()
          Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order.
 Observable<java.util.List<T>> toSortedList(Func2<? super T,? super T,java.lang.Integer> sortFunction)
          Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order based on a specified comparison function.
 Subscription unsafeSubscribe(Subscriber<? super T> subscriber)
          Subscribe to Observable and invoke Observable.OnSubscribe function without any contract protection, error handling, unsubscribe, or execution hooks.
 Observable<T> unsubscribeOn(Scheduler scheduler)
          Asynchronously unsubscribes on the specified Scheduler.
static
<T,RESOURCE extends Subscription>
Observable<T>
using(Func0<RESOURCE> resourceFactory, Func1<RESOURCE,Observable<T>> observableFactory)
          Constructs an Observable that creates a dependent resource object.
static
<R> Observable<R>
when(java.lang.Iterable<? extends rx.joins.Plan0<R>> plans)
          Joins together the results from several patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R>... plans)
          Joins together the results from several patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1)
          Joins the results from a pattern via its plan.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1, rx.joins.Plan0<R> p2)
          Joins together the results from two patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1, rx.joins.Plan0<R> p2, rx.joins.Plan0<R> p3)
          Joins together the results from three patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1, rx.joins.Plan0<R> p2, rx.joins.Plan0<R> p3, rx.joins.Plan0<R> p4)
          Joins together the results from four patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1, rx.joins.Plan0<R> p2, rx.joins.Plan0<R> p3, rx.joins.Plan0<R> p4, rx.joins.Plan0<R> p5)
          Joins together the results from five patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1, rx.joins.Plan0<R> p2, rx.joins.Plan0<R> p3, rx.joins.Plan0<R> p4, rx.joins.Plan0<R> p5, rx.joins.Plan0<R> p6)
          Joins together the results from six patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1, rx.joins.Plan0<R> p2, rx.joins.Plan0<R> p3, rx.joins.Plan0<R> p4, rx.joins.Plan0<R> p5, rx.joins.Plan0<R> p6, rx.joins.Plan0<R> p7)
          Joins together the results from seven patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1, rx.joins.Plan0<R> p2, rx.joins.Plan0<R> p3, rx.joins.Plan0<R> p4, rx.joins.Plan0<R> p5, rx.joins.Plan0<R> p6, rx.joins.Plan0<R> p7, rx.joins.Plan0<R> p8)
          Joins together the results from eight patterns via their plans.
static
<R> Observable<R>
when(rx.joins.Plan0<R> p1, rx.joins.Plan0<R> p2, rx.joins.Plan0<R> p3, rx.joins.Plan0<R> p4, rx.joins.Plan0<R> p5, rx.joins.Plan0<R> p6, rx.joins.Plan0<R> p7, rx.joins.Plan0<R> p8, rx.joins.Plan0<R> p9)
          Joins together the results from nine patterns via their plans.
 Observable<T> where(Func1<? super T,java.lang.Boolean> predicate)
          Deprecated. use Observable.filter(Func1)
<TClosing> Observable<Observable<T>>
window(Func0<? extends Observable<? extends TClosing>> closingSelector)
          Returns an Observable that emits windows of items it collects from the source Observable.
 Observable<Observable<T>> window(int count)
          Returns an Observable that emits windows of items it collects from the source Observable.
 Observable<Observable<T>> window(int count, int skip)
          Returns an Observable that emits windows of items it collects from the source Observable.
 Observable<Observable<T>> window(long timespan, long timeshift, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits windows of items it collects from the source Observable.
 Observable<Observable<T>> window(long timespan, long timeshift, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits windows of items it collects from the source Observable.
 Observable<Observable<T>> window(long timespan, java.util.concurrent.TimeUnit unit)
          Returns an Observable that emits windows of items it collects from the source Observable.
 Observable<Observable<T>> window(long timespan, java.util.concurrent.TimeUnit unit, int count)
          Returns an Observable that emits windows of items it collects from the source Observable.
 Observable<Observable<T>> window(long timespan, java.util.concurrent.TimeUnit unit, int count, Scheduler scheduler)
          Returns an Observable that emits windows of items it collects from the source Observable.
 Observable<Observable<T>> window(long timespan, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
          Returns an Observable that emits windows of items it collects from the source Observable.
<TOpening,TClosing>
Observable<Observable<T>>
window(Observable<? extends TOpening> windowOpenings, Func1<? super TOpening,? extends Observable<? extends TClosing>> closingSelector)
          Returns an Observable that emits windows of items it collects from the source Observable.
<U> Observable<Observable<T>>
window(Observable<U> boundary)
          Returns an Observable that emits non-overlapping windows of items it collects from the source Observable where the boundary of each window is determined by the items emitted from a specified boundary-governing Observable.
static
<R> Observable<R>
zip(java.lang.Iterable<? extends Observable<?>> ws, FuncN<? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of items emitted, in sequence, by an Iterable of other Observables.
<T2,R> Observable<R>
zip(java.lang.Iterable<? extends T2> other, Func2<? super T,? super T2,? extends R> zipFunction)
          Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source Observable and a specified Iterable sequence.
static
<R> Observable<R>
zip(Observable<? extends Observable<?>> ws, FuncN<? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of n items emitted, in sequence, by the n Observables emitted by a specified Observable.
static
<T1,T2,R> Observable<R>
zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Func2<? super T1,? super T2,? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of two items emitted, in sequence, by two other Observables.
static
<T1,T2,T3,R>
Observable<R>
zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Func3<? super T1,? super T2,? super T3,? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of three items emitted, in sequence, by three other Observables.
static
<T1,T2,T3,T4,R>
Observable<R>
zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Func4<? super T1,? super T2,? super T3,? super T4,? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of four items emitted, in sequence, by four other Observables.
static
<T1,T2,T3,T4,T5,R>
Observable<R>
zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Func5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of five items emitted, in sequence, by five other Observables.
static
<T1,T2,T3,T4,T5,T6,R>
Observable<R>
zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Func6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of six items emitted, in sequence, by six other Observables.
static
<T1,T2,T3,T4,T5,T6,T7,R>
Observable<R>
zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Func7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of seven items emitted, in sequence, by seven other Observables.
static
<T1,T2,T3,T4,T5,T6,T7,T8,R>
Observable<R>
zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Observable<? extends T8> o8, Func8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of eight items emitted, in sequence, by eight other Observables.
static
<T1,T2,T3,T4,T5,T6,T7,T8,T9,R>
Observable<R>
zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Observable<? extends T8> o8, Observable<? extends T9> o9, Func9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> zipFunction)
          Returns an Observable that emits the results of a function of your choosing applied to combinations of nine items emitted, in sequence, by nine other Observables.
<T2,R> Observable<R>
zip(Observable<? extends T2> other, Func2<? super T,? super T2,? extends R> zipFunction)
          Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source Observable and another specified Observable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Observable

protected Observable(Observable.OnSubscribe<T> f)
Observable with Function to execute when subscribed to.

Note: Use Observable.create(OnSubscribe) to create an Observable, instead of this constructor, unless you specifically have a need for inheritance.

Parameters:
f - Observable.OnSubscribe to be executed when Observable.subscribe(Subscriber) is called
Method Detail

create

public static final <T> Observable<T> create(Observable.OnSubscribe<T> f)
Returns an Observable that will execute the specified function when a Subscriber subscribes to it.

Write the function you pass to create so that it behaves as an Observable: It should invoke the Subscriber's onNext, onError, and onCompleted methods appropriately.

A well-formed Observable must invoke either the Subscriber's onCompleted method exactly once or its onError method exactly once.

See Rx Design Guidelines (PDF) for detailed information.

Type Parameters:
T - the type of the items that this Observable emits
Parameters:
f - a function that accepts an Subscriber<T>, and invokes its onNext, onError, and onCompleted methods as appropriate
Returns:
an Observable that, when a Subscriber subscribes to it, will execute the specified function
See Also:
RxJava Wiki: create(), MSDN: Observable.Create

create

@Deprecated
public static final <T> Observable<T> create(Observable.OnSubscribeFunc<T> f)
Deprecated. use Observable.create(OnSubscribe)


lift

public <R> Observable<R> lift(Observable.Operator<? extends R,? super T> lift)
Lift a function to the current Observable and return a new Observable that when subscribed to will pass the values of the current Observable through the function.

In other words, this allows chaining Observers together on an Observable for acting on the values within the Observable.

observable.map(...).filter(...).take(5).lift(new ObserverA()).lift(new ObserverB(...)).subscribe()

Parameters:
lift -
Returns:
an Observable that emits values that are the result of applying the bind function to the values of the current Observable

amb

public static final <T> Observable<T> amb(java.lang.Iterable<? extends Observable<? extends T>> sources)
Mirror the one Observable in an Iterable of several Observables that first emits an item.

Parameters:
sources - an Iterable of Observable sources competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

amb

public static final <T> Observable<T> amb(Observable<? extends T> o1,
                                          Observable<? extends T> o2)
Given two Observables, mirror the one that first emits an item.

Parameters:
o1 - an Observable competing to react first
o2 - an Observable competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

amb

public static final <T> Observable<T> amb(Observable<? extends T> o1,
                                          Observable<? extends T> o2,
                                          Observable<? extends T> o3)
Given three Observables, mirror the one that first emits an item.

Parameters:
o1 - an Observable competing to react first
o2 - an Observable competing to react first
o3 - an Observable competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

amb

public static final <T> Observable<T> amb(Observable<? extends T> o1,
                                          Observable<? extends T> o2,
                                          Observable<? extends T> o3,
                                          Observable<? extends T> o4)
Given four Observables, mirror the one that first emits an item.

Parameters:
o1 - an Observable competing to react first
o2 - an Observable competing to react first
o3 - an Observable competing to react first
o4 - an Observable competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

amb

public static final <T> Observable<T> amb(Observable<? extends T> o1,
                                          Observable<? extends T> o2,
                                          Observable<? extends T> o3,
                                          Observable<? extends T> o4,
                                          Observable<? extends T> o5)
Given five Observables, mirror the one that first emits an item.

Parameters:
o1 - an Observable competing to react first
o2 - an Observable competing to react first
o3 - an Observable competing to react first
o4 - an Observable competing to react first
o5 - an Observable competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

amb

public static final <T> Observable<T> amb(Observable<? extends T> o1,
                                          Observable<? extends T> o2,
                                          Observable<? extends T> o3,
                                          Observable<? extends T> o4,
                                          Observable<? extends T> o5,
                                          Observable<? extends T> o6)
Given six Observables, mirror the one that first emits an item.

Parameters:
o1 - an Observable competing to react first
o2 - an Observable competing to react first
o3 - an Observable competing to react first
o4 - an Observable competing to react first
o5 - an Observable competing to react first
o6 - an Observable competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

amb

public static final <T> Observable<T> amb(Observable<? extends T> o1,
                                          Observable<? extends T> o2,
                                          Observable<? extends T> o3,
                                          Observable<? extends T> o4,
                                          Observable<? extends T> o5,
                                          Observable<? extends T> o6,
                                          Observable<? extends T> o7)
Given seven Observables, mirror the one that first emits an item.

Parameters:
o1 - an Observable competing to react first
o2 - an Observable competing to react first
o3 - an Observable competing to react first
o4 - an Observable competing to react first
o5 - an Observable competing to react first
o6 - an Observable competing to react first
o7 - an Observable competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

amb

public static final <T> Observable<T> amb(Observable<? extends T> o1,
                                          Observable<? extends T> o2,
                                          Observable<? extends T> o3,
                                          Observable<? extends T> o4,
                                          Observable<? extends T> o5,
                                          Observable<? extends T> o6,
                                          Observable<? extends T> o7,
                                          Observable<? extends T> o8)
Given eight Observables, mirror the one that first emits an item.

Parameters:
o1 - an Observable competing to react first
o2 - an Observable competing to react first
o3 - an Observable competing to react first
o4 - an Observable competing to react first
o5 - an Observable competing to react first
o6 - an Observable competing to react first
o7 - an Observable competing to react first
o8 - an observable competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

amb

public static final <T> Observable<T> amb(Observable<? extends T> o1,
                                          Observable<? extends T> o2,
                                          Observable<? extends T> o3,
                                          Observable<? extends T> o4,
                                          Observable<? extends T> o5,
                                          Observable<? extends T> o6,
                                          Observable<? extends T> o7,
                                          Observable<? extends T> o8,
                                          Observable<? extends T> o9)
Given nine Observables, mirror the one that first emits an item.

Parameters:
o1 - an Observable competing to react first
o2 - an Observable competing to react first
o3 - an Observable competing to react first
o4 - an Observable competing to react first
o5 - an Observable competing to react first
o6 - an Observable competing to react first
o7 - an Observable competing to react first
o8 - an Observable competing to react first
o9 - an Observable competing to react first
Returns:
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
See Also:
RxJava Wiki: amb(), MSDN: Observable.Amb

average

@Deprecated
public static final Observable<java.lang.Integer> average(Observable<java.lang.Integer> source)
Deprecated. use Observable.averageInteger(rx.Observable)


averageDouble

public static final Observable<java.lang.Double> averageDouble(Observable<java.lang.Double> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the average of the Doubles emitted by the source Observable.

Parameters:
source - source Observable to compute the average of
Returns:
an Observable that emits a single item: the average of all the Doubles emitted by the source Observable
See Also:
RxJava Wiki: averageDouble(), MSDN: Observable.Average

averageFloat

public static final Observable<java.lang.Float> averageFloat(Observable<java.lang.Float> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the average of the Floats emitted by the source Observable.

Parameters:
source - source Observable to compute the average of
Returns:
an Observable that emits a single item: the average of all the Floats emitted by the source Observable
See Also:
RxJava Wiki: averageFloat(), MSDN: Observable.Average

averageInteger

public static final Observable<java.lang.Integer> averageInteger(Observable<java.lang.Integer> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the average of the Integers emitted by the source Observable.

Parameters:
source - source Observable to compute the average of
Returns:
an Observable that emits a single item: the average of all the Integers emitted by the source Observable
Throws:
java.lang.IllegalArgumentException - if the source Observable emits no items
See Also:
RxJava Wiki: averageInteger(), MSDN: Observable.Average

averageLong

public static final Observable<java.lang.Long> averageLong(Observable<java.lang.Long> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the average of the Longs emitted by the source Observable.

Parameters:
source - source Observable to compute the average of
Returns:
an Observable that emits a single item: the average of all the Longs emitted by the source Observable
See Also:
RxJava Wiki: averageLong(), MSDN: Observable.Average

combineLatest

public static final <T1,T2,R> Observable<R> combineLatest(Observable<? extends T1> o1,
                                                          Observable<? extends T2> o2,
                                                          Func2<? super T1,? super T2,? extends R> combineFunction)
Combines two source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from either of the source Observables, where this aggregation is defined by a specified function.

Parameters:
o1 - the first source Observable
o2 - the second source Observable
combineFunction - the aggregation function used to combine the items emitted by the source Observables
Returns:
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
See Also:
RxJava Wiki: combineLatest()

combineLatest

public static final <T1,T2,T3,R> Observable<R> combineLatest(Observable<? extends T1> o1,
                                                             Observable<? extends T2> o2,
                                                             Observable<? extends T3> o3,
                                                             Func3<? super T1,? super T2,? super T3,? extends R> combineFunction)
Combines three source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.

Parameters:
o1 - the first source Observable
o2 - the second source Observable
o3 - the third source Observable
combineFunction - the aggregation function used to combine the items emitted by the source Observables
Returns:
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
See Also:
RxJava Wiki: combineLatest()

combineLatest

public static final <T1,T2,T3,T4,R> Observable<R> combineLatest(Observable<? extends T1> o1,
                                                                Observable<? extends T2> o2,
                                                                Observable<? extends T3> o3,
                                                                Observable<? extends T4> o4,
                                                                Func4<? super T1,? super T2,? super T3,? super T4,? extends R> combineFunction)
Combines four source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.

Parameters:
o1 - the first source Observable
o2 - the second source Observable
o3 - the third source Observable
o4 - the fourth source Observable
combineFunction - the aggregation function used to combine the items emitted by the source Observables
Returns:
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
See Also:
RxJava Wiki: combineLatest()

combineLatest

public static final <T1,T2,T3,T4,T5,R> Observable<R> combineLatest(Observable<? extends T1> o1,
                                                                   Observable<? extends T2> o2,
                                                                   Observable<? extends T3> o3,
                                                                   Observable<? extends T4> o4,
                                                                   Observable<? extends T5> o5,
                                                                   Func5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> combineFunction)
Combines five source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.

Parameters:
o1 - the first source Observable
o2 - the second source Observable
o3 - the third source Observable
o4 - the fourth source Observable
o5 - the fifth source Observable
combineFunction - the aggregation function used to combine the items emitted by the source Observables
Returns:
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
See Also:
RxJava Wiki: combineLatest()

combineLatest

public static final <T1,T2,T3,T4,T5,T6,R> Observable<R> combineLatest(Observable<? extends T1> o1,
                                                                      Observable<? extends T2> o2,
                                                                      Observable<? extends T3> o3,
                                                                      Observable<? extends T4> o4,
                                                                      Observable<? extends T5> o5,
                                                                      Observable<? extends T6> o6,
                                                                      Func6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> combineFunction)
Combines six source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.

Parameters:
o1 - the first source Observable
o2 - the second source Observable
o3 - the third source Observable
o4 - the fourth source Observable
o5 - the fifth source Observable
o6 - the sixth source Observable
combineFunction - the aggregation function used to combine the items emitted by the source Observables
Returns:
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
See Also:
RxJava Wiki: combineLatest()

combineLatest

public static final <T1,T2,T3,T4,T5,T6,T7,R> Observable<R> combineLatest(Observable<? extends T1> o1,
                                                                         Observable<? extends T2> o2,
                                                                         Observable<? extends T3> o3,
                                                                         Observable<? extends T4> o4,
                                                                         Observable<? extends T5> o5,
                                                                         Observable<? extends T6> o6,
                                                                         Observable<? extends T7> o7,
                                                                         Func7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> combineFunction)
Combines seven source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.

Parameters:
o1 - the first source Observable
o2 - the second source Observable
o3 - the third source Observable
o4 - the fourth source Observable
o5 - the fifth source Observable
o6 - the sixth source Observable
o7 - the seventh source Observable
combineFunction - the aggregation function used to combine the items emitted by the source Observables
Returns:
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
See Also:
RxJava Wiki: combineLatest()

combineLatest

public static final <T1,T2,T3,T4,T5,T6,T7,T8,R> Observable<R> combineLatest(Observable<? extends T1> o1,
                                                                            Observable<? extends T2> o2,
                                                                            Observable<? extends T3> o3,
                                                                            Observable<? extends T4> o4,
                                                                            Observable<? extends T5> o5,
                                                                            Observable<? extends T6> o6,
                                                                            Observable<? extends T7> o7,
                                                                            Observable<? extends T8> o8,
                                                                            Func8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> combineFunction)
Combines eight source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.

Parameters:
o1 - the first source Observable
o2 - the second source Observable
o3 - the third source Observable
o4 - the fourth source Observable
o5 - the fifth source Observable
o6 - the sixth source Observable
o7 - the seventh source Observable
o8 - the eighth source Observable
combineFunction - the aggregation function used to combine the items emitted by the source Observables
Returns:
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
See Also:
RxJava Wiki: combineLatest()

combineLatest

public static final <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> Observable<R> combineLatest(Observable<? extends T1> o1,
                                                                               Observable<? extends T2> o2,
                                                                               Observable<? extends T3> o3,
                                                                               Observable<? extends T4> o4,
                                                                               Observable<? extends T5> o5,
                                                                               Observable<? extends T6> o6,
                                                                               Observable<? extends T7> o7,
                                                                               Observable<? extends T8> o8,
                                                                               Observable<? extends T9> o9,
                                                                               Func9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> combineFunction)
Combines nine source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.

Parameters:
o1 - the first source Observable
o2 - the second source Observable
o3 - the third source Observable
o4 - the fourth source Observable
o5 - the fifth source Observable
o6 - the sixth source Observable
o7 - the seventh source Observable
o8 - the eighth source Observable
o9 - the ninth source Observable
combineFunction - the aggregation function used to combine the items emitted by the source Observables
Returns:
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
See Also:
RxJava Wiki: combineLatest()

concat

public static final <T> Observable<T> concat(Observable<? extends Observable<? extends T>> observables)
Returns an Observable that emits the items emitted by each of the Observables emitted by an Observable, one after the other, without interleaving them.

Parameters:
observables - an Observable that emits Observables
Returns:
an Observable that emits items all of the items emitted by the Observables emitted by observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

concat

public static final <T> Observable<T> concat(Observable<? extends T> t1,
                                             Observable<? extends T> t2)
Returns an Observable that emits the items emitted by two Observables, one after the other, without interleaving them.

Parameters:
t1 - an Observable to be concatenated
t2 - an Observable to be concatenated
Returns:
an Observable that emits items emitted by the two source Observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

concat

public static final <T> Observable<T> concat(Observable<? extends T> t1,
                                             Observable<? extends T> t2,
                                             Observable<? extends T> t3)
Returns an Observable that emits the items emitted by three Observables, one after the other, without interleaving them.

Parameters:
t1 - an Observable to be concatenated
t2 - an Observable to be concatenated
t3 - an Observable to be concatenated
Returns:
an Observable that emits items emitted by the three source Observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

concat

public static final <T> Observable<T> concat(Observable<? extends T> t1,
                                             Observable<? extends T> t2,
                                             Observable<? extends T> t3,
                                             Observable<? extends T> t4)
Returns an Observable that emits the items emitted by four Observables, one after the other, without interleaving them.

Parameters:
t1 - an Observable to be concatenated
t2 - an Observable to be concatenated
t3 - an Observable to be concatenated
t4 - an Observable to be concatenated
Returns:
an Observable that emits items emitted by the four source Observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

concat

public static final <T> Observable<T> concat(Observable<? extends T> t1,
                                             Observable<? extends T> t2,
                                             Observable<? extends T> t3,
                                             Observable<? extends T> t4,
                                             Observable<? extends T> t5)
Returns an Observable that emits the items emitted by five Observables, one after the other, without interleaving them.

Parameters:
t1 - an Observable to be concatenated
t2 - an Observable to be concatenated
t3 - an Observable to be concatenated
t4 - an Observable to be concatenated
t5 - an Observable to be concatenated
Returns:
an Observable that emits items emitted by the five source Observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

concat

public static final <T> Observable<T> concat(Observable<? extends T> t1,
                                             Observable<? extends T> t2,
                                             Observable<? extends T> t3,
                                             Observable<? extends T> t4,
                                             Observable<? extends T> t5,
                                             Observable<? extends T> t6)
Returns an Observable that emits the items emitted by six Observables, one after the other, without interleaving them.

Parameters:
t1 - an Observable to be concatenated
t2 - an Observable to be concatenated
t3 - an Observable to be concatenated
t4 - an Observable to be concatenated
t5 - an Observable to be concatenated
t6 - an Observable to be concatenated
Returns:
an Observable that emits items emitted by the six source Observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

concat

public static final <T> Observable<T> concat(Observable<? extends T> t1,
                                             Observable<? extends T> t2,
                                             Observable<? extends T> t3,
                                             Observable<? extends T> t4,
                                             Observable<? extends T> t5,
                                             Observable<? extends T> t6,
                                             Observable<? extends T> t7)
Returns an Observable that emits the items emitted by seven Observables, one after the other, without interleaving them.

Parameters:
t1 - an Observable to be concatenated
t2 - an Observable to be concatenated
t3 - an Observable to be concatenated
t4 - an Observable to be concatenated
t5 - an Observable to be concatenated
t6 - an Observable to be concatenated
t7 - an Observable to be concatenated
Returns:
an Observable that emits items emitted by the seven source Observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

concat

public static final <T> Observable<T> concat(Observable<? extends T> t1,
                                             Observable<? extends T> t2,
                                             Observable<? extends T> t3,
                                             Observable<? extends T> t4,
                                             Observable<? extends T> t5,
                                             Observable<? extends T> t6,
                                             Observable<? extends T> t7,
                                             Observable<? extends T> t8)
Returns an Observable that emits the items emitted by eight Observables, one after the other, without interleaving them.

Parameters:
t1 - an Observable to be concatenated
t2 - an Observable to be concatenated
t3 - an Observable to be concatenated
t4 - an Observable to be concatenated
t5 - an Observable to be concatenated
t6 - an Observable to be concatenated
t7 - an Observable to be concatenated
t8 - an Observable to be concatenated
Returns:
an Observable that emits items emitted by the eight source Observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

concat

public static final <T> Observable<T> concat(Observable<? extends T> t1,
                                             Observable<? extends T> t2,
                                             Observable<? extends T> t3,
                                             Observable<? extends T> t4,
                                             Observable<? extends T> t5,
                                             Observable<? extends T> t6,
                                             Observable<? extends T> t7,
                                             Observable<? extends T> t8,
                                             Observable<? extends T> t9)
Returns an Observable that emits the items emitted by nine Observables, one after the other, without interleaving them.

Parameters:
t1 - an Observable to be concatenated
t2 - an Observable to be concatenated
t3 - an Observable to be concatenated
t4 - an Observable to be concatenated
t5 - an Observable to be concatenated
t6 - an Observable to be concatenated
t7 - an Observable to be concatenated
t8 - an Observable to be concatenated
t9 - an Observable to be concatenated
Returns:
an Observable that emits items emitted by the nine source Observables, one after the other, without interleaving them
See Also:
RxJava Wiki: concat(), MSDN: Observable.Concat

defer

public static final <T> Observable<T> defer(Func0<? extends Observable<? extends T>> observableFactory)
Returns an Observable that calls an Observable factory to create its Observable for each new Observer that subscribes. That is, for each subscriber, the actual Observable that subscriber observes is determined by the factory function.

The defer Observer allows you to defer or delay emitting items from an Observable until such time as an Observer subscribes to the Observable. This allows an Observer to easily obtain updates or a refreshed version of the sequence.

Type Parameters:
T - the type of the items emitted by the Observable
Parameters:
observableFactory - the Observable factory function to invoke for each Observer that subscribes to the resulting Observable
Returns:
an Observable whose Observers' subscriptions trigger an invocation of the given Observable factory function
See Also:
RxJava Wiki: defer()

empty

public static final <T> Observable<T> empty()
Returns an Observable that emits no items to the Observer and immediately invokes its onCompleted method.

Type Parameters:
T - the type of the items (ostensibly) emitted by the Observable
Returns:
an Observable that emits no items to the Observer but immediately invokes the Observer's onCompleted method
See Also:
RxJava Wiki: empty(), MSDN: Observable.Empty

empty

public static final <T> Observable<T> empty(Scheduler scheduler)
Returns an Observable that emits no items to the Observer and immediately invokes its onCompleted method on the specified Scheduler.

Type Parameters:
T - the type of the items (ostensibly) emitted by the Observable
Parameters:
scheduler - the Scheduler to use to call the onCompleted method
Returns:
an Observable that emits no items to the Observer but immediately invokes the Observer's onCompleted method with the specified scheduler
See Also:
RxJava Wiki: empty(), MSDN: Observable.Empty Method (IScheduler)

error

public static final <T> Observable<T> error(java.lang.Throwable exception)
Returns an Observable that invokes an Observer's onError method when the Observer subscribes to it.

Type Parameters:
T - the type of the items (ostensibly) emitted by the Observable
Parameters:
exception - the particular Throwable to pass to onError
Returns:
an Observable that invokes the Observer's onError method when the Observer subscribes to it
See Also:
RxJava Wiki: error(), MSDN: Observable.Throw

error

public static final <T> Observable<T> error(java.lang.Throwable exception,
                                            Scheduler scheduler)
Returns an Observable that invokes an Observer's onError method on the specified Scheduler.

Type Parameters:
T - the type of the items (ostensibly) emitted by the Observable
Parameters:
exception - the particular Throwable to pass to onError
scheduler - the Scheduler on which to call onError
Returns:
an Observable that invokes the Observer's onError method, on the specified Scheduler
See Also:
RxJava Wiki: error(), MSDN: Observable.Throw

from

public static final <T> Observable<T> from(java.util.concurrent.Future<? extends T> future)
Converts a Future into an Observable.

You can convert any object that supports the Future interface into an Observable that emits the return value of the Future.get() method of that object, by passing the object into the from method.

Important note: This Observable is blocking; you cannot unsubscribe from it.

Type Parameters:
T - the type of object that the Future returns, and also the type of item to be emitted by the resulting Observable
Parameters:
future - the source Future
Returns:
an Observable that emits the item from the source Future
See Also:
RxJava Wiki: from()

from

public static final <T> Observable<T> from(java.util.concurrent.Future<? extends T> future,
                                           long timeout,
                                           java.util.concurrent.TimeUnit unit)
Converts a Future into an Observable, with a timeout on the Future.

You can convert any object that supports the Future interface into an Observable that emits the return value of the Future.get() method of that object, by passing the object into the from method.

Important note: This Observable is blocking; you cannot unsubscribe from it.

Type Parameters:
T - the type of object that the Future returns, and also the type of item to be emitted by the resulting Observable
Parameters:
future - the source Future
timeout - the maximum time to wait before calling get()
unit - the TimeUnit of the timeout argument
Returns:
an Observable that emits the item from the source Future
See Also:
RxJava Wiki: from()

from

public static final <T> Observable<T> from(java.util.concurrent.Future<? extends T> future,
                                           Scheduler scheduler)
Converts a Future, operating on a specified Scheduler, into an Observable.

You can convert any object that supports the Future interface into an Observable that emits the return value of the Future.get() method of that object, by passing the object into the from method.

Type Parameters:
T - the type of object that the Future returns, and also the type of item to be emitted by the resulting Observable
Parameters:
future - the source Future
scheduler - the Scheduler to wait for the Future on. Use a Scheduler such as Schedulers.io() that can block and wait on the Future
Returns:
an Observable that emits the item from the source Future
See Also:
RxJava Wiki: from()

from

public static final <T> Observable<T> from(java.lang.Iterable<? extends T> iterable)
Converts an Iterable sequence into an Observable that emits the items in the sequence.

Type Parameters:
T - the type of items in the Iterable sequence and the type of items to be emitted by the resulting Observable
Parameters:
iterable - the source Iterable sequence
Returns:
an Observable that emits each item in the source Iterable sequence
See Also:
RxJava Wiki: from()

from

public static final <T> Observable<T> from(java.lang.Iterable<? extends T> iterable,
                                           Scheduler scheduler)
Converts an Iterable sequence into an Observable that operates on the specified Scheduler, emitting each item from the sequence.

Type Parameters:
T - the type of items in the Iterable sequence and the type of items to be emitted by the resulting Observable
Parameters:
iterable - the source Iterable sequence
scheduler - the Scheduler on which the Observable is to emit the items of the Iterable
Returns:
an Observable that emits each item in the source Iterable sequence, on the specified Scheduler
See Also:
RxJava Wiki: from(), MSDN: Observable.ToObservable

from

public static final <T> Observable<T> from(T t1)
Converts an item into an Observable that emits that item.

Type Parameters:
T - the type of the item
Parameters:
t1 - the item
Returns:
an Observable that emits the item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2))

Converts two items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2,
                                                      T t3)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3)).

Converts three items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
t3 - third item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2,
                                                      T t3,
                                                      T t4)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4)).

Converts four items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
t3 - third item
t4 - fourth item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2,
                                                      T t3,
                                                      T t4,
                                                      T t5)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5)).

Converts five items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
t3 - third item
t4 - fourth item
t5 - fifth item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2,
                                                      T t3,
                                                      T t4,
                                                      T t5,
                                                      T t6)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6)).

Converts six items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
t3 - third item
t4 - fourth item
t5 - fifth item
t6 - sixth item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2,
                                                      T t3,
                                                      T t4,
                                                      T t5,
                                                      T t6,
                                                      T t7)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6,t7)).

Converts seven items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
t3 - third item
t4 - fourth item
t5 - fifth item
t6 - sixth item
t7 - seventh item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2,
                                                      T t3,
                                                      T t4,
                                                      T t5,
                                                      T t6,
                                                      T t7,
                                                      T t8)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6,t7,t8)).

Converts eight items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
t3 - third item
t4 - fourth item
t5 - fifth item
t6 - sixth item
t7 - seventh item
t8 - eighth item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2,
                                                      T t3,
                                                      T t4,
                                                      T t5,
                                                      T t6,
                                                      T t7,
                                                      T t8,
                                                      T t9)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6,t7,t8,t9)).

Converts nine items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
t3 - third item
t4 - fourth item
t5 - fifth item
t6 - sixth item
t7 - seventh item
t8 - eighth item
t9 - ninth item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

@Deprecated
public static final <T> Observable<T> from(T t1,
                                                      T t2,
                                                      T t3,
                                                      T t4,
                                                      T t5,
                                                      T t6,
                                                      T t7,
                                                      T t8,
                                                      T t9,
                                                      T t10)
Deprecated. use Observable.from(Iterable) instead such as from(Arrays.asList(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)).

Converts ten items into an Observable that emits those items.

Type Parameters:
T - the type of these items
Parameters:
t1 - first item
t2 - second item
t3 - third item
t4 - fourth item
t5 - fifth item
t6 - sixth item
t7 - seventh item
t8 - eighth item
t9 - ninth item
t10 - tenth item
Returns:
an Observable that emits each item
See Also:
RxJava Wiki: from()

from

public static final <T> Observable<T> from(T... t1)
Converts an Array into an Observable that emits the items in the Array.

Type Parameters:
T - the type of items in the Array and the type of items to be emitted by the resulting Observable
Parameters:
t1 - the source Array
Returns:
an Observable that emits each item in the source Array
See Also:
RxJava Wiki: from()

from

public static final <T> Observable<T> from(T[] items,
                                           Scheduler scheduler)
Converts an Array into an Observable that emits the items in the Array on a specified Scheduler.

Type Parameters:
T - the type of items in the Array and the type of items to be emitted by the resulting Observable
Parameters:
items - the source Array
scheduler - the Scheduler on which the Observable emits the items of the Array
Returns:
an Observable that emits each item in the source Array
See Also:
RxJava Wiki: from()

interval

public static final Observable<java.lang.Long> interval(long interval,
                                                        java.util.concurrent.TimeUnit unit)
Returns an Observable that emits a sequential number every specified interval of time.

Parameters:
interval - interval size in time units (see below)
unit - time units to use for the interval size
Returns:
an Observable that emits a sequential number each time interval
See Also:
RxJava Wiki: interval(), MSDN: Observable.Interval

interval

public static final Observable<java.lang.Long> interval(long interval,
                                                        java.util.concurrent.TimeUnit unit,
                                                        Scheduler scheduler)
Returns an Observable that emits a sequential number every specified interval of time, on a specified Scheduler.

Parameters:
interval - interval size in time units (see below)
unit - time units to use for the interval size
scheduler - the Scheduler to use for scheduling the items
Returns:
an Observable that emits a sequential number each time interval
See Also:
RxJava Wiki: interval(), MSDN: Observable.Interval

just

public static final <T> Observable<T> just(T value)
Returns an Observable that emits a single item and then completes.

To convert any object into an Observable that emits that object, pass that object into the just method.

This is similar to the Observable.from(java.lang.Object[]) method, except that from() will convert an Iterable object into an Observable that emits each of the items in the Iterable, one at a time, while the just() method converts an Iterable into an Observable that emits the entire Iterable as a single item.

Type Parameters:
T - the type of that item
Parameters:
value - the item to emit
Returns:
an Observable that emits value as a single item and then completes
See Also:
RxJava Wiki: just()

just

@Deprecated
public static final <T> Observable<T> just(T value,
                                                      Scheduler scheduler)
Deprecated. use #from(T)

Returns an Observable that emits a single item and then completes, on a specified Scheduler.

This is a scheduler version of Observable.just(Object).

Type Parameters:
T - the type of that item
Parameters:
value - the item to emit
scheduler - the Scheduler to emit the single item on
Returns:
an Observable that emits value as a single item and then completes, on a specified Scheduler
See Also:
RxJava Wiki: just()

max

public static final <T extends java.lang.Comparable<? super T>> Observable<T> max(Observable<T> source)
Deprecated. use rxjava-math module instead

Returns an Observable that emits the single item emitted by the source Observable with the maximum numeric value. If there is more than one item with the same maximum value, it emits the last-emitted of these.

Parameters:
source - an Observable to scan for the maximum emitted item
Returns:
an Observable that emits this maximum item
Throws:
java.lang.IllegalArgumentException - if the source is empty
See Also:
RxJava Wiki: max(), MSDN: Observable.Max

merge

public static final <T> Observable<T> merge(java.lang.Iterable<? extends Observable<? extends T>> sequences)
Flattens an Iterable of Observables into one Observable, without any transformation.

You can combine the items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
sequences - the Iterable of Observables
Returns:
an Observable that emits items that are the result of flattening the items emitted by the Observables in the Iterable
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(java.lang.Iterable<? extends Observable<? extends T>> sequences,
                                            int maxConcurrent)
Flattens an Iterable of Observables into one Observable, without any transformation, while limiting the number of concurrent subscriptions to these Observables.

You can combine the items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
sequences - the Iterable of Observables
maxConcurrent - the maximum number of Observables that may be subscribed to concurrently
Returns:
an Observable that emits items that are the result of flattening the items emitted by the Observables in the Iterable
Throws:
java.lang.IllegalArgumentException - if maxConcurrent is less than or equal to 0
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(java.lang.Iterable<? extends Observable<? extends T>> sequences,
                                            int maxConcurrent,
                                            Scheduler scheduler)
Flattens an Iterable of Observables into one Observable, without any transformation, while limiting the number of concurrent subscriptions to these Observables, and subscribing to these Observables on a specified Scheduler.

You can combine the items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
sequences - the Iterable of Observables
maxConcurrent - the maximum number of Observables that may be subscribed to concurrently
scheduler - the Scheduler on which to traverse the Iterable of Observables
Returns:
an Observable that emits items that are the result of flattening the items emitted by the Observables in the Iterable
Throws:
java.lang.IllegalArgumentException - if maxConcurrent is less than or equal to 0
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(java.lang.Iterable<? extends Observable<? extends T>> sequences,
                                            Scheduler scheduler)
Flattens an Iterable of Observables into one Observable, without any transformation, subscribing to these Observables on a specified Scheduler.

You can combine the items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
sequences - the Iterable of Observables
scheduler - the Scheduler on which to traverse the Iterable of Observables
Returns:
an Observable that emits items that are the result of flattening the items emitted by the Observables in the Iterable
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends Observable<? extends T>> source)
Flattens an Observable that emits Observables into a single Observable that emits the items emitted by those Observables, without any transformation.

You can combine the items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
source - an Observable that emits Observables
Returns:
an Observable that emits items that are the result of flattening the Observables emitted by the source Observable
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends Observable<? extends T>> source,
                                            int maxConcurrent)
Flattens an Observable that emits Observables into a single Observable that emits the items emitted by those Observables, without any transformation, while limiting the maximum number of concurrent subscriptions to these Observables.

You can combine the items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
source - an Observable that emits Observables
maxConcurrent - the maximum number of Observables that may be subscribed to concurrently
Returns:
an Observable that emits items that are the result of flattening the Observables emitted by the source Observable
Throws:
java.lang.IllegalArgumentException - if maxConcurrent is less than or equal to 0
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T> t1,
                                            Observable<? extends T> t2)
Flattens two Observables into a single Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
Returns:
an Observable that emits all of the items emitted by the source Observables
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T> t1,
                                            Observable<? extends T> t2,
                                            Observable<? extends T> t3)
Flattens three Observables into a single Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
Returns:
an Observable that emits all of the items emitted by the source Observables
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T> t1,
                                            Observable<? extends T> t2,
                                            Observable<? extends T> t3,
                                            Observable<? extends T> t4)
Flattens four Observables into a single Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
Returns:
an Observable that emits all of the items emitted by the source Observables
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T> t1,
                                            Observable<? extends T> t2,
                                            Observable<? extends T> t3,
                                            Observable<? extends T> t4,
                                            Observable<? extends T> t5)
Flattens five Observables into a single Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
Returns:
an Observable that emits all of the items emitted by the source Observables
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T> t1,
                                            Observable<? extends T> t2,
                                            Observable<? extends T> t3,
                                            Observable<? extends T> t4,
                                            Observable<? extends T> t5,
                                            Observable<? extends T> t6)
Flattens six Observables into a single Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
t6 - an Observable to be merged
Returns:
an Observable that emits all of the items emitted by the source Observables
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T> t1,
                                            Observable<? extends T> t2,
                                            Observable<? extends T> t3,
                                            Observable<? extends T> t4,
                                            Observable<? extends T> t5,
                                            Observable<? extends T> t6,
                                            Observable<? extends T> t7)
Flattens seven Observables into a single Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
t6 - an Observable to be merged
t7 - an Observable to be merged
Returns:
an Observable that emits all of the items emitted by the source Observables
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T> t1,
                                            Observable<? extends T> t2,
                                            Observable<? extends T> t3,
                                            Observable<? extends T> t4,
                                            Observable<? extends T> t5,
                                            Observable<? extends T> t6,
                                            Observable<? extends T> t7,
                                            Observable<? extends T> t8)
Flattens eight Observables into a single Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
t6 - an Observable to be merged
t7 - an Observable to be merged
t8 - an Observable to be merged
Returns:
an Observable that emits items that are the result of flattening the items emitted by the source Observables
See Also:
MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T> t1,
                                            Observable<? extends T> t2,
                                            Observable<? extends T> t3,
                                            Observable<? extends T> t4,
                                            Observable<? extends T> t5,
                                            Observable<? extends T> t6,
                                            Observable<? extends T> t7,
                                            Observable<? extends T> t8,
                                            Observable<? extends T> t9)
Flattens nine Observables into a single Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
t6 - an Observable to be merged
t7 - an Observable to be merged
t8 - an Observable to be merged
t9 - an Observable to be merged
Returns:
an Observable that emits all of the items emitted by the source Observables
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T>[] sequences)
Flattens an Array of Observables into one Observable, without any transformation.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
sequences - the Array of Observables
Returns:
an Observable that emits all of the items emitted by the Observables in the Array
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

merge

public static final <T> Observable<T> merge(Observable<? extends T>[] sequences,
                                            Scheduler scheduler)
Flattens an Array of Observables into one Observable, without any transformation, traversing the array on a specified Scheduler.

You can combine items emitted by multiple Observables so that they appear as a single Observable, by using the merge method.

Parameters:
sequences - the Array of Observables
scheduler - the Scheduler on which to traverse the Array
Returns:
an Observable that emits all of the items emitted by the Observables in the Array
See Also:
RxJava Wiki: merge(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends Observable<? extends T>> source)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if multiple merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
source - an Observable that emits Observables
Returns:
an Observable that emits all of the items emitted by the Observables emitted by the source Observable
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends T> t1,
                                                      Observable<? extends T> t2)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable, Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if both merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
Returns:
an Observable that emits all of the items that are emitted by the two source Observables
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends T> t1,
                                                      Observable<? extends T> t2,
                                                      Observable<? extends T> t3)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable, Observable, Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if multiple merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
Returns:
an Observable that emits all of the items that are emitted by the source Observables
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends T> t1,
                                                      Observable<? extends T> t2,
                                                      Observable<? extends T> t3,
                                                      Observable<? extends T> t4)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable, Observable, Observable, Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if multiple merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
Returns:
an Observable that emits all of the items that are emitted by the source Observables
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends T> t1,
                                                      Observable<? extends T> t2,
                                                      Observable<? extends T> t3,
                                                      Observable<? extends T> t4,
                                                      Observable<? extends T> t5)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable, Observable, Observable, Observable, Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if multiple merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
Returns:
an Observable that emits all of the items that are emitted by the source Observables
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends T> t1,
                                                      Observable<? extends T> t2,
                                                      Observable<? extends T> t3,
                                                      Observable<? extends T> t4,
                                                      Observable<? extends T> t5,
                                                      Observable<? extends T> t6)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable, Observable, Observable, Observable, Observable, Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if multiple merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
t6 - an Observable to be merged
Returns:
an Observable that emits all of the items that are emitted by the source Observables
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends T> t1,
                                                      Observable<? extends T> t2,
                                                      Observable<? extends T> t3,
                                                      Observable<? extends T> t4,
                                                      Observable<? extends T> t5,
                                                      Observable<? extends T> t6,
                                                      Observable<? extends T> t7)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable, Observable, Observable, Observable, Observable, Observable, Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if multiple merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
t6 - an Observable to be merged
t7 - an Observable to be merged
Returns:
an Observable that emits all of the items that are emitted by the source Observables
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends T> t1,
                                                      Observable<? extends T> t2,
                                                      Observable<? extends T> t3,
                                                      Observable<? extends T> t4,
                                                      Observable<? extends T> t5,
                                                      Observable<? extends T> t6,
                                                      Observable<? extends T> t7,
                                                      Observable<? extends T> t8)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable, Observable, Observable, Observable, Observable, Observable, Observable, Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if multiple merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
t6 - an Observable to be merged
t7 - an Observable to be merged
t8 - an Observable to be merged
Returns:
an Observable that emits all of the items that are emitted by the source Observables
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

mergeDelayError

public static final <T> Observable<T> mergeDelayError(Observable<? extends T> t1,
                                                      Observable<? extends T> t2,
                                                      Observable<? extends T> t3,
                                                      Observable<? extends T> t4,
                                                      Observable<? extends T> t5,
                                                      Observable<? extends T> t6,
                                                      Observable<? extends T> t7,
                                                      Observable<? extends T> t8,
                                                      Observable<? extends T> t9)
A version of merge that allows an Observer to receive all successfully emitted items from all of the source Observables without being interrupted by an error notification from one of them.

This behaves like Observable.merge(Observable, Observable, Observable, Observable, Observable, Observable, Observable, Observable, Observable) except that if any of the merged Observables notify of an error via onError, mergeDelayError will refrain from propagating that error notification until all of the merged Observables have finished emitting items.

Even if multiple merged Observables send onError notifications, mergeDelayError will only invoke the onError method of its Observers once.

Parameters:
t1 - an Observable to be merged
t2 - an Observable to be merged
t3 - an Observable to be merged
t4 - an Observable to be merged
t5 - an Observable to be merged
t6 - an Observable to be merged
t7 - an Observable to be merged
t8 - an Observable to be merged
t9 - an Observable to be merged
Returns:
an Observable that emits all of the items that are emitted by the source Observables
See Also:
RxJava Wiki: mergeDelayError(), MSDN: Observable.Merge

min

public static final <T extends java.lang.Comparable<? super T>> Observable<T> min(Observable<T> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the single numerically minimum item emitted by the source Observable. If there is more than one such item, it returns the last-emitted one.

Parameters:
source - an Observable to determine the minimum item of
Returns:
an Observable that emits the minimum item emitted by the source Observable
Throws:
java.lang.IllegalArgumentException - if the source is empty
See Also:
MSDN: Observable.Min

nest

public final Observable<Observable<T>> nest()
Convert the current Observable<T> into an Observable<Observable<T>>.

Returns:
an Observable that emits a single item: the source Observable

never

public static final <T> Observable<T> never()
Returns an Observable that never sends any items or notifications to an Observer.

This Observable is useful primarily for testing purposes.

Type Parameters:
T - the type of items (not) emitted by the Observable
Returns:
an Observable that never emits any items or sends any notifications to an Observer
See Also:
RxJava Wiki: never()

parallelMerge

public static final <T> Observable<Observable<T>> parallelMerge(Observable<Observable<T>> source,
                                                                int parallelObservables)
Converts an Observable<Observable<T>> into another Observable<Observable<T>> whose emitted Observables emit the same items, but the number of such Observables is restricted by parallelObservables.

For example, if the original Observable<Observable<T>> emits 100 Observables and parallelObservables is 8, the items emitted by the 100 original Observables will be distributed among 8 Observables emitted by the resulting Observable.

This is a mechanism for efficiently processing n number of Observables on a smaller m number of resources (typically CPU cores).

Parameters:
parallelObservables - the number of Observables to merge into
Returns:
an Observable of Observables constrained in number by parallelObservables
See Also:
RxJava Wiki: parallelMerge()

parallelMerge

public static final <T> Observable<Observable<T>> parallelMerge(Observable<Observable<T>> source,
                                                                int parallelObservables,
                                                                Scheduler scheduler)
Converts an Observable<Observable<T>> into another Observable<Observable<T>> whose emitted Observables emit the same items, but the number of such Observables is restricted by parallelObservables, and each runs on a defined Scheduler.

For example, if the original Observable<Observable<T>> emits 100 Observables and parallelObservables is 8, the items emitted by the 100 original Observables will be distributed among 8 Observables emitted by the resulting Observable.

This is a mechanism for efficiently processing n number of Observables on a smaller m number of resources (typically CPU cores).

Parameters:
parallelObservables - the number of Observables to merge into
scheduler - the Scheduler to run each Observable on
Returns:
an Observable of Observables constrained in number by parallelObservables
See Also:
RxJava Wiki: parallelMerge()

pivot

public static final <K1,K2,T> Observable<GroupedObservable<K2,GroupedObservable<K1,T>>> pivot(Observable<GroupedObservable<K1,GroupedObservable<K2,T>>> groups)
Pivot GroupedObservable streams without serializing/synchronizing to a single stream first.

For example an Observable such as this => Observable<GroupedObservable<String, GroupedObservable<Boolean, Integer>>>:

is pivoted to become this => Observable<GroupedObservable<Boolean, GroupedObservable<String, Integer>>>:

Parameters:
groups -
Returns:

range

public static final Observable<java.lang.Integer> range(int start,
                                                        int count)
Returns an Observable that emits a sequence of Integers within a specified range.

Parameters:
start - the value of the first Integer in the sequence
count - the number of sequential Integers to generate
Returns:
an Observable that emits a range of sequential Integers
Throws:
java.lang.IllegalArgumentException - if count is less than zero
java.lang.IllegalArgumentException - if start + count exceeds Integer.MAX_VALUE
See Also:
RxJava Wiki: range(), MSDN: Observable.Range

range

public static final Observable<java.lang.Integer> range(int start,
                                                        int count,
                                                        Scheduler scheduler)
Returns an Observable that emits a sequence of Integers within a specified range, on a specified Scheduler.

Parameters:
start - the value of the first Integer in the sequence
count - the number of sequential Integers to generate
scheduler - the Scheduler to run the generator loop on
Returns:
an Observable that emits a range of sequential Integers
See Also:
RxJava Wiki: range(), MSDN: Observable.Range

sequenceEqual

public static final <T> Observable<java.lang.Boolean> sequenceEqual(Observable<? extends T> first,
                                                                    Observable<? extends T> second)
Returns an Observable that emits a Boolean value that indicates whether two Observable sequences are the same by comparing the items emitted by each Observable pairwise.

Type Parameters:
T - the type of items emitted by each Observable
Parameters:
first - the first Observable to compare
second - the second Observable to compare
Returns:
an Observable that emits a Boolean value that indicates whether the two sequences are the same
See Also:
RxJava Wiki: sequenceEqual()

sequenceEqual

public static final <T> Observable<java.lang.Boolean> sequenceEqual(Observable<? extends T> first,
                                                                    Observable<? extends T> second,
                                                                    Func2<? super T,? super T,java.lang.Boolean> equality)
Returns an Observable that emits a Boolean value that indicates whether two Observable sequences are the same by comparing the items emitted by each Observable pairwise based on the results of a specified equality function.

Type Parameters:
T - the type of items emitted by each Observable
Parameters:
first - the first Observable to compare
second - the second Observable to compare
equality - a function used to compare items emitted by each Observable
Returns:
an Observable that emits a Boolean value that indicates whether the two Observable two sequences are the same according to the specified function
See Also:
RxJava Wiki: sequenceEqual()

sumDouble

public static final Observable<java.lang.Double> sumDouble(Observable<java.lang.Double> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the sum of all the Doubles emitted by the source Observable.

Parameters:
source - the source Observable to compute the sum of
Returns:
an Observable that emits a single item: the sum of all the Doubles emitted by the source Observable
See Also:
RxJava Wiki: sumDouble(), MSDN: Observable.Sum

sumFloat

public static final Observable<java.lang.Float> sumFloat(Observable<java.lang.Float> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the sum of all the Floats emitted by the source Observable.

Parameters:
source - the source Observable to compute the sum of
Returns:
an Observable that emits a single item: the sum of all the Floats emitted by the source Observable
See Also:
RxJava Wiki: sumFloat(), MSDN: Observable.Sum

sumInteger

public static final Observable<java.lang.Integer> sumInteger(Observable<java.lang.Integer> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the sum of all the Integers emitted by the source Observable.

Parameters:
source - source Observable to compute the sum of
Returns:
an Observable that emits a single item: the sum of all the Integers emitted by the source Observable
See Also:
RxJava Wiki: sumInteger(), MSDN: Observable.Sum

sumLong

public static final Observable<java.lang.Long> sumLong(Observable<java.lang.Long> source)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the sum of all the Longs emitted by the source Observable.

Parameters:
source - source Observable to compute the sum of
Returns:
an Observable that emits a single item: the sum of all the Longs emitted by the source Observable
See Also:
RxJava Wiki: sumLong(), MSDN: Observable.Sum

switchDo

@Deprecated
public static final <T> Observable<T> switchDo(Observable<? extends Observable<? extends T>> sequenceOfSequences)
Deprecated. use Observable.switchOnNext(rx.Observable>)

Given an Observable that emits Observables, returns an Observable that emits the items emitted by the most recently emitted of those Observables.

switchDo() subscribes to an Observable that emits Observables. Each time it observes one of these emitted Observables, the Observable returned by switchDo() begins emitting the items emitted by that Observable. When a new Observable is emitted, switchDo() stops emitting items from the earlier-emitted Observable and begins emitting items from the new one.

Parameters:
sequenceOfSequences - the source Observable that emits Observables
Returns:
an Observable that emits the items emitted by the Observable most recently emitted by the source Observable
See Also:
RxJava Wiki: switchOnNext()

switchLatest

public static final <T> Observable<T> switchLatest(Observable<? extends Observable<? extends T>> sequenceOfSequences)
Given an Observable that emits Observables, returns an Observable that emits the items emitted by the most recently emitted of those Observables.

switchLatest() subscribes to an Observable that emits Observables. Each time it observes one of these emitted Observables, the Observable returned by switchLatest() begins emitting the items emitted by that Observable. When a new Observable is emitted, switchLatest() stops emitting items from the earlier-emitted Observable and begins emitting items from the new one.

Parameters:
sequenceOfSequences - the source Observable that emits Observables
Returns:
an Observable that emits the items emitted by the Observable most recently emitted by the source Observable
See Also:
RxJava Wiki: switchOnNext(), Observable.switchOnNext(Observable)

switchOnNext

public static final <T> Observable<T> switchOnNext(Observable<? extends Observable<? extends T>> sequenceOfSequences)
Given an Observable that emits Observables, returns an Observable that emits the items emitted by the most recently emitted of those Observables.

switchOnNext() subscribes to an Observable that emits Observables. Each time it observes one of these emitted Observables, the Observable returned by switchOnNext() begins emitting the items emitted by that Observable. When a new Observable is emitted, switchOnNext() stops emitting items from the earlier-emitted Observable and begins emitting items from the new one.

Parameters:
sequenceOfSequences - the source Observable that emits Observables
Returns:
an Observable that emits the items emitted by the Observable most recently emitted by the source Observable
See Also:
RxJava Wiki: switchOnNext()

synchronize

@Deprecated
public static final <T> Observable<T> synchronize(Observable<T> source)
Deprecated. use Observable.synchronize() or Observable.synchronize(Object)


timer

public static final Observable<java.lang.Long> timer(long initialDelay,
                                                     long period,
                                                     java.util.concurrent.TimeUnit unit)
Return an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter.

Parameters:
initialDelay - the initial delay time to wait before emitting the first value of 0L
period - the period of time between emissions of the subsequent numbers
unit - the time unit for both initialDelay and period
Returns:
an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter
See Also:
RxJava Wiki: timer(), MSDN: Observable.Timer

timer

public static final Observable<java.lang.Long> timer(long initialDelay,
                                                     long period,
                                                     java.util.concurrent.TimeUnit unit,
                                                     Scheduler scheduler)
Return an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter, on a specified Scheduler.

Parameters:
initialDelay - the initial delay time to wait before emitting the first value of 0L
period - the period of time between emissions of the subsequent numbers
unit - the time unit for both initialDelay and period
scheduler - the Scheduler on which the waiting happens and items are emitted
Returns:
an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter, while running on the given Scheduler
See Also:
RxJava Wiki: timer(), MSDN: Observable.Timer

timer

public static final Observable<java.lang.Long> timer(long delay,
                                                     java.util.concurrent.TimeUnit unit)
Returns an Observable that emits one item after a specified delay, and then completes.

Parameters:
delay - the initial delay before emitting a single 0L
unit - time units to use for delay
See Also:
RxJava wiki: timer()

timer

public static final Observable<java.lang.Long> timer(long delay,
                                                     java.util.concurrent.TimeUnit unit,
                                                     Scheduler scheduler)
Returns an Observable that emits one item after a specified delay, on a specified Scheduler, and then completes.

Parameters:
delay - the initial delay before emitting a single 0L
unit - time units to use for delay
scheduler - the Scheduler to use for scheduling the item
See Also:
RxJava wiki: timer()

using

public static final <T,RESOURCE extends Subscription> Observable<T> using(Func0<RESOURCE> resourceFactory,
                                                                          Func1<RESOURCE,Observable<T>> observableFactory)
Constructs an Observable that creates a dependent resource object.

Parameters:
resourceFactory - the factory function to create a resource object that depends on the Observable
observableFactory - the factory function to obtain an Observable
Returns:
the Observable whose lifetime controls the lifetime of the dependent resource object
See Also:
RxJava Wiki: using(), MSDN: Observable.Using

when

public static final <R> Observable<R> when(java.lang.Iterable<? extends rx.joins.Plan0<R>> plans)
Joins together the results from several patterns via their plans.

Parameters:
plans - a series of plans created by use of the Observable.then(rx.functions.Func1) Observer on patterns
Returns:
an Observable that emits the results from matching several patterns
Throws:
java.lang.NullPointerException - if plans is null
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R>... plans)
Joins together the results from several patterns via their plans.

Parameters:
plans - a series of plans created by use of the Observable.then(rx.functions.Func1) Observer on patterns
Returns:
an Observable that emits the results from matching several patterns
Throws:
java.lang.NullPointerException - if plans is null
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1)
Joins the results from a pattern via its plan.

Parameters:
p1 - the plan to join, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching a pattern
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1,
                                           rx.joins.Plan0<R> p2)
Joins together the results from two patterns via their plans.

Parameters:
p1 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p2 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching two patterns
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1,
                                           rx.joins.Plan0<R> p2,
                                           rx.joins.Plan0<R> p3)
Joins together the results from three patterns via their plans.

Parameters:
p1 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p2 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p3 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching three patterns
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1,
                                           rx.joins.Plan0<R> p2,
                                           rx.joins.Plan0<R> p3,
                                           rx.joins.Plan0<R> p4)
Joins together the results from four patterns via their plans.

Parameters:
p1 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p2 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p3 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p4 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching four patterns
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1,
                                           rx.joins.Plan0<R> p2,
                                           rx.joins.Plan0<R> p3,
                                           rx.joins.Plan0<R> p4,
                                           rx.joins.Plan0<R> p5)
Joins together the results from five patterns via their plans.

Parameters:
p1 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p2 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p3 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p4 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p5 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching five patterns
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1,
                                           rx.joins.Plan0<R> p2,
                                           rx.joins.Plan0<R> p3,
                                           rx.joins.Plan0<R> p4,
                                           rx.joins.Plan0<R> p5,
                                           rx.joins.Plan0<R> p6)
Joins together the results from six patterns via their plans.

Parameters:
p1 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p2 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p3 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p4 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p5 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p6 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching six patterns
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1,
                                           rx.joins.Plan0<R> p2,
                                           rx.joins.Plan0<R> p3,
                                           rx.joins.Plan0<R> p4,
                                           rx.joins.Plan0<R> p5,
                                           rx.joins.Plan0<R> p6,
                                           rx.joins.Plan0<R> p7)
Joins together the results from seven patterns via their plans.

Parameters:
p1 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p2 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p3 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p4 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p5 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p6 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p7 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching seven patterns
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1,
                                           rx.joins.Plan0<R> p2,
                                           rx.joins.Plan0<R> p3,
                                           rx.joins.Plan0<R> p4,
                                           rx.joins.Plan0<R> p5,
                                           rx.joins.Plan0<R> p6,
                                           rx.joins.Plan0<R> p7,
                                           rx.joins.Plan0<R> p8)
Joins together the results from eight patterns via their plans.

Parameters:
p1 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p2 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p3 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p4 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p5 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p6 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p7 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p8 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching eight patterns
See Also:
RxJava Wiki: when(), MSDN: Observable.When

when

public static final <R> Observable<R> when(rx.joins.Plan0<R> p1,
                                           rx.joins.Plan0<R> p2,
                                           rx.joins.Plan0<R> p3,
                                           rx.joins.Plan0<R> p4,
                                           rx.joins.Plan0<R> p5,
                                           rx.joins.Plan0<R> p6,
                                           rx.joins.Plan0<R> p7,
                                           rx.joins.Plan0<R> p8,
                                           rx.joins.Plan0<R> p9)
Joins together the results from nine patterns via their plans.

Parameters:
p1 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p2 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p3 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p4 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p5 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p6 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p7 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p8 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
p9 - a plan, created by use of the Observable.then(rx.functions.Func1) Observer on a pattern
Returns:
an Observable that emits the results from matching nine patterns
See Also:
RxJava Wiki: when(), MSDN: Observable.When

zip

public static final <R> Observable<R> zip(java.lang.Iterable<? extends Observable<?>> ws,
                                          FuncN<? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of items emitted, in sequence, by an Iterable of other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by each of the source Observables; the second item emitted by the new Observable will be the result of the function applied to the second item emitted by each of those Observables; and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invokations of the source Observable that emits the fewest items.

Parameters:
ws - an Iterable of source Observables
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <R> Observable<R> zip(Observable<? extends Observable<?>> ws,
                                          FuncN<? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of n items emitted, in sequence, by the n Observables emitted by a specified Observable.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by each of the Observables emitted by the source Observable; the second item emitted by the new Observable will be the result of the function applied to the second item emitted by each of those Observables; and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invokations of the source Observable that emits the fewest items.

Parameters:
ws - an Observable of source Observables
zipFunction - a function that, when applied to an item emitted by each of the Observables emitted by ws, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <T1,T2,R> Observable<R> zip(Observable<? extends T1> o1,
                                                Observable<? extends T2> o2,
                                                Func2<? super T1,? super T2,? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of two items emitted, in sequence, by two other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by o1 and the first item emitted by o2; the second item emitted by the new Observable will be the result of the function applied to the second item emitted by o1 and the second item emitted by o2; and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invocations of the source Observable that emits the fewest items.

Parameters:
o1 - the first source Observable
o2 - a second source Observable
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <T1,T2,T3,R> Observable<R> zip(Observable<? extends T1> o1,
                                                   Observable<? extends T2> o2,
                                                   Observable<? extends T3> o3,
                                                   Func3<? super T1,? super T2,? super T3,? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of three items emitted, in sequence, by three other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by o1, the first item emitted by o2, and the first item emitted by o3; the second item emitted by the new Observable will be the result of the function applied to the second item emitted by o1, the second item emitted by o2, and the second item emitted by o3; and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invocations of the source Observable that emits the fewest items.

Parameters:
o1 - the first source Observable
o2 - a second source Observable
o3 - a third source Observable
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <T1,T2,T3,T4,R> Observable<R> zip(Observable<? extends T1> o1,
                                                      Observable<? extends T2> o2,
                                                      Observable<? extends T3> o3,
                                                      Observable<? extends T4> o4,
                                                      Func4<? super T1,? super T2,? super T3,? super T4,? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of four items emitted, in sequence, by four other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by o1, the first item emitted by o2, the first item emitted by o3, and the first item emitted by 04; the second item emitted by the new Observable will be the result of the function applied to the second item emitted by each of those Observables; and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invocations of the source Observable that emits the fewest items.

Parameters:
o1 - the first source Observable
o2 - a second source Observable
o3 - a third source Observable
o4 - a fourth source Observable
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <T1,T2,T3,T4,T5,R> Observable<R> zip(Observable<? extends T1> o1,
                                                         Observable<? extends T2> o2,
                                                         Observable<? extends T3> o3,
                                                         Observable<? extends T4> o4,
                                                         Observable<? extends T5> o5,
                                                         Func5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of five items emitted, in sequence, by five other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by o1, the first item emitted by o2, the first item emitted by o3, the first item emitted by o4, and the first item emitted by o5; the second item emitted by the new Observable will be the result of the function applied to the second item emitted by each of those Observables; and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invocations of the source Observable that emits the fewest items.

Parameters:
o1 - the first source Observable
o2 - a second source Observable
o3 - a third source Observable
o4 - a fourth source Observable
o5 - a fifth source Observable
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <T1,T2,T3,T4,T5,T6,R> Observable<R> zip(Observable<? extends T1> o1,
                                                            Observable<? extends T2> o2,
                                                            Observable<? extends T3> o3,
                                                            Observable<? extends T4> o4,
                                                            Observable<? extends T5> o5,
                                                            Observable<? extends T6> o6,
                                                            Func6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of six items emitted, in sequence, by six other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by each source Observable, the second item emitted by the new Observable will be the result of the function applied to the second item emitted by each of those Observables, and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invocations of the source Observable that emits the fewest items.

Parameters:
o1 - the first source Observable
o2 - a second source Observable
o3 - a third source Observable
o4 - a fourth source Observable
o5 - a fifth source Observable
o6 - a sixth source Observable
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <T1,T2,T3,T4,T5,T6,T7,R> Observable<R> zip(Observable<? extends T1> o1,
                                                               Observable<? extends T2> o2,
                                                               Observable<? extends T3> o3,
                                                               Observable<? extends T4> o4,
                                                               Observable<? extends T5> o5,
                                                               Observable<? extends T6> o6,
                                                               Observable<? extends T7> o7,
                                                               Func7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of seven items emitted, in sequence, by seven other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by each source Observable, the second item emitted by the new Observable will be the result of the function applied to the second item emitted by each of those Observables, and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invocations of the source Observable that emits the fewest items.

Parameters:
o1 - the first source Observable
o2 - a second source Observable
o3 - a third source Observable
o4 - a fourth source Observable
o5 - a fifth source Observable
o6 - a sixth source Observable
o7 - a seventh source Observable
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <T1,T2,T3,T4,T5,T6,T7,T8,R> Observable<R> zip(Observable<? extends T1> o1,
                                                                  Observable<? extends T2> o2,
                                                                  Observable<? extends T3> o3,
                                                                  Observable<? extends T4> o4,
                                                                  Observable<? extends T5> o5,
                                                                  Observable<? extends T6> o6,
                                                                  Observable<? extends T7> o7,
                                                                  Observable<? extends T8> o8,
                                                                  Func8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of eight items emitted, in sequence, by eight other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by each source Observable, the second item emitted by the new Observable will be the result of the function applied to the second item emitted by each of those Observables, and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invocations of the source Observable that emits the fewest items.

Parameters:
o1 - the first source Observable
o2 - a second source Observable
o3 - a third source Observable
o4 - a fourth source Observable
o5 - a fifth source Observable
o6 - a sixth source Observable
o7 - a seventh source Observable
o8 - an eighth source Observable
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

zip

public static final <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> Observable<R> zip(Observable<? extends T1> o1,
                                                                     Observable<? extends T2> o2,
                                                                     Observable<? extends T3> o3,
                                                                     Observable<? extends T4> o4,
                                                                     Observable<? extends T5> o5,
                                                                     Observable<? extends T6> o6,
                                                                     Observable<? extends T7> o7,
                                                                     Observable<? extends T8> o8,
                                                                     Observable<? extends T9> o9,
                                                                     Func9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> zipFunction)
Returns an Observable that emits the results of a function of your choosing applied to combinations of nine items emitted, in sequence, by nine other Observables.

zip applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by each source Observable, the second item emitted by the new Observable will be the result of the function applied to the second item emitted by each of those Observables, and so forth.

The resulting Observable<R> returned from zip will invoke onNext as many times as the number of onNext invocations of the source Observable that emits the fewest items.

Parameters:
o1 - the first source Observable
o2 - a second source Observable
o3 - a third source Observable
o4 - a fourth source Observable
o5 - a fifth source Observable
o6 - a sixth source Observable
o7 - a seventh source Observable
o8 - an eighth source Observable
o9 - a ninth source Observable
zipFunction - a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
Returns:
an Observable that emits the zipped results
See Also:
RxJava Wiki: zip()

aggregate

@Deprecated
public final Observable<T> aggregate(Func2<T,T,T> accumulator)
Deprecated. use Observable.reduce(Func2)

Synonymous with reduce().

See Also:
RxJava Wiki: reduce(), Observable.reduce(Func2)

aggregate

@Deprecated
public final <R> Observable<R> aggregate(R initialValue,
                                                    Func2<R,? super T,R> accumulator)
Deprecated. use Observable.reduce(Object, Func2)

Synonymous with reduce().

See Also:
RxJava Wiki: reduce(), Observable.reduce(Object, Func2)

all

public final Observable<java.lang.Boolean> all(Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emits a Boolean that indicates whether all of the items emitted by the source Observable satisfy a condition.

Parameters:
predicate - a function that evaluates an item and returns a Boolean
Returns:
an Observable that emits true if all items emitted by the source Observable satisfy the predicate; otherwise, false
See Also:
RxJava Wiki: all()

and

public final <T2> rx.joins.Pattern2<T,T2> and(Observable<T2> right)
Returns a Pattern that matches when both Observables emit an item.

Parameters:
right - an Observable to match with the source Observable
Returns:
a Pattern object that matches when both Observables emit an item
Throws:
java.lang.NullPointerException - if right is null
See Also:
RxJava Wiki: and(), MSDN: Observable.And

asObservable

public final Observable<T> asObservable()
Hides the identity of this Observable. Useful for instance when you have an implementation of a subclass of Observable but you want to hide the properties and methods of this subclass from whomever you are passing the Observable to.

Returns:
an Observable that hides the identity of this Observable

averageDouble

public final Observable<java.lang.Double> averageDouble(Func1<? super T,java.lang.Double> valueExtractor)
Deprecated. Use rxjava-math module instead

Returns an Observable that transforms items emitted by the source Observable into Doubles by using a function you provide and then emits the Double average of the complete sequence of transformed values.

Parameters:
valueExtractor - the function to transform an item emitted by the source Observable into a Double
Returns:
an Observable that emits a single item: the Double average of the complete sequence of items emitted by the source Observable when transformed into Doubles by the specified function
See Also:
RxJava Wiki: averageDouble(), MSDN: Observable.Average

averageFloat

public final Observable<java.lang.Float> averageFloat(Func1<? super T,java.lang.Float> valueExtractor)
Deprecated. Use rxjava-math module instead

Returns an Observable that transforms items emitted by the source Observable into Floats by using a function you provide and then emits the Float average of the complete sequence of transformed values.

Parameters:
valueExtractor - the function to transform an item emitted by the source Observable into a Float
Returns:
an Observable that emits a single item: the Float average of the complete sequence of items emitted by the source Observable when transformed into Floats by the specified function
See Also:
RxJava Wiki: averageFloat(), MSDN: Observable.Average

averageInteger

public final Observable<java.lang.Integer> averageInteger(Func1<? super T,java.lang.Integer> valueExtractor)
Deprecated. Use rxjava-math module instead

Returns an Observable that transforms items emitted by the source Observable into Integers by using a function you provide and then emits the Integer average of the complete sequence of transformed values.

Parameters:
valueExtractor - the function to transform an item emitted by the source Observable into an Integer
Returns:
an Observable that emits a single item: the Integer average of the complete sequence of items emitted by the source Observable when transformed into Integers by the specified function
See Also:
RxJava Wiki: averageInteger(), MSDN: Observable.Average

averageLong

public final Observable<java.lang.Long> averageLong(Func1<? super T,java.lang.Long> valueExtractor)
Deprecated. Use rxjava-math module instead

Returns an Observable that transforms items emitted by the source Observable into Longs by using a function you provide and then emits the Long average of the complete sequence of transformed values.

Parameters:
valueExtractor - the function to transform an item emitted by the source Observable into a Long
Returns:
an Observable that emits a single item: the Long average of the complete sequence of items emitted by the source Observable when transformed into Longs by the specified function
See Also:
RxJava Wiki: averageLong(), MSDN: Observable.Average

buffer

public final <TClosing> Observable<java.util.List<T>> buffer(Func0<? extends Observable<? extends TClosing>> bufferClosingSelector)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping buffers. It emits the current buffer and replaces it with a new buffer when the Observable produced by the specified bufferClosingSelector emits an item. It then uses the bufferClosingSelector to create a new Observable to observe to indicate the end of the next buffer.

Parameters:
bufferClosingSelector - a Func0 that produces an Observable for each buffer created. When this Observable emits an item, buffer() emits the associated buffer and replaces it with a new one
Returns:
an Observable that emits a connected, non-overlapping buffer of items from the source Observable each time the current Observable created with the bufferClosingSelector argument emits an item
See Also:
RxJava Wiki: buffer()

buffer

public final Observable<java.util.List<T>> buffer(int count)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping buffers, each containing count items. When the source Observable completes or encounters an error, the resulting Observable emits the current buffer and propagates the notification from the source Observable.

Parameters:
count - the maximum number of items in each buffer before it should be emitted
Returns:
an Observable that emits connected, non-overlapping buffers, each containing at most count items from the source Observable
See Also:
RxJava Wiki: buffer()

buffer

public final Observable<java.util.List<T>> buffer(int count,
                                                  int skip)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable emits buffers every skip items, each containing count items. When the source Observable completes or encounters an error, the resulting Observable emits the current buffer and propagates the notification from the source Observable.

Parameters:
count - the maximum size of each buffer before it should be emitted
skip - how many items emitted by the source Observable should be skipped before starting a new buffer. Note that when skip and count are equal, this is the same operation as Observable.buffer(int).
Returns:
an Observable that emits buffers for every skip item from the source Observable and containing at most count items
See Also:
RxJava Wiki: buffer()

buffer

public final Observable<java.util.List<T>> buffer(long timespan,
                                                  long timeshift,
                                                  java.util.concurrent.TimeUnit unit)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable starts a new buffer periodically, as determined by the timeshift argument. It emits each buffer after a fixed timespan, specified by the timespan argument. When the source Observable completes or encounters an error, the resulting Observable emits the current buffer and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each buffer collects items before it is emitted
timeshift - the period of time after which a new buffer will be created
unit - the unit of time that applies to the timespan and timeshift arguments
Returns:
an Observable that emits new buffers of items emitted by the source Observable periodically after a fixed timespan has elapsed
See Also:
RxJava Wiki: buffer()

buffer

public final Observable<java.util.List<T>> buffer(long timespan,
                                                  long timeshift,
                                                  java.util.concurrent.TimeUnit unit,
                                                  Scheduler scheduler)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable starts a new buffer periodically, as determined by the timeshift argument, and on the specified scheduler. It emits each buffer after a fixed timespan, specified by the timespan argument. When the source Observable completes or encounters an error, the resulting Observable emits the current buffer and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each buffer collects items before it is emitted
timeshift - the period of time after which a new buffer will be created
unit - the unit of time that applies to the timespan and timeshift arguments
scheduler - the Scheduler to use when determining the end and start of a buffer
Returns:
an Observable that emits new buffers of items emitted by the source Observable periodically after a fixed timespan has elapsed
See Also:
RxJava Wiki: buffer()

buffer

public final Observable<java.util.List<T>> buffer(long timespan,
                                                  java.util.concurrent.TimeUnit unit)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping buffers, each of a fixed duration specified by the timespan argument. When the source Observable completes or encounters an error, the resulting Observable emits the current buffer and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each buffer collects items before it is emitted and replaced with a new buffer
unit - the unit of time that applies to the timespan argument
Returns:
an Observable that emits connected, non-overlapping buffers of items emitted by the source Observable within a fixed duration
See Also:
RxJava Wiki: buffer()

buffer

public final Observable<java.util.List<T>> buffer(long timespan,
                                                  java.util.concurrent.TimeUnit unit,
                                                  int count)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping buffers, each of a fixed duration specified by the timespan argument or a maximum size specified by the count argument (whichever is reached first). When the source Observable completes or encounters an error, the resulting Observable emits the current buffer and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each buffer collects items before it is emitted and replaced with a new buffer
unit - the unit of time which applies to the timespan argument
count - the maximum size of each buffer before it is emitted
Returns:
an Observable that emits connected, non-overlapping buffers of items emitted by the source Observable, after a fixed duration or when the buffer reaches maximum capacity (whichever occurs first)
See Also:
RxJava Wiki: buffer()

buffer

public final Observable<java.util.List<T>> buffer(long timespan,
                                                  java.util.concurrent.TimeUnit unit,
                                                  int count,
                                                  Scheduler scheduler)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping buffers, each of a fixed duration specified by the timespan argument as measured on the specified scheduler, or a maximum size specified by the count argument (whichever is reached first). When the source Observable completes or encounters an error, the resulting Observable emits the current buffer and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each buffer collects items before it is emitted and replaced with a new buffer
unit - the unit of time which applies to the timespan argument
count - the maximum size of each buffer before it is emitted
scheduler - the Scheduler to use when determining the end and start of a buffer
Returns:
an Observable that emits connected, non-overlapping buffers of items emitted by the source Observable after a fixed duration or when the buffer reaches maximum capacity (whichever occurs first)
See Also:
RxJava Wiki: buffer()

buffer

public final Observable<java.util.List<T>> buffer(long timespan,
                                                  java.util.concurrent.TimeUnit unit,
                                                  Scheduler scheduler)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping buffers, each of a fixed duration specified by the timespan argument and on the specified scheduler. When the source Observable completes or encounters an error, the resulting Observable emits the current buffer and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each buffer collects items before it is emitted and replaced with a new buffer
unit - the unit of time which applies to the timespan argument
scheduler - the Scheduler to use when determining the end and start of a buffer
Returns:
an Observable that emits connected, non-overlapping buffers of items emitted by the source Observable within a fixed duration
See Also:
RxJava Wiki: buffer()

buffer

public final <TOpening,TClosing> Observable<java.util.List<T>> buffer(Observable<? extends TOpening> bufferOpenings,
                                                                      Func1<? super TOpening,? extends Observable<? extends TClosing>> bufferClosingSelector)
Returns an Observable that emits buffers of items it collects from the source Observable. The resulting Observable emits buffers that it creates when the specified bufferOpenings Observable emits an item, and closes when the Observable returned from bufferClosingSelector emits an item.

Parameters:
bufferOpenings - the Observable that, when it emits an item, causes a new buffer to be created
bufferClosingSelector - the Func1 that is used to produce an Observable for every buffer created. When this Observable emits an item, the associated buffer is emitted.
Returns:
an Observable that emits buffers, containing items from the source Observable, that are created and closed when the specified Observables emit items
See Also:
RxJava Wiki: buffer()

buffer

public final <B> Observable<java.util.List<T>> buffer(Observable<B> boundary)
Returns an Observable that emits non-overlapping buffered items from the source Observable each time the specified boundary Observable emits an item.

Completion of either the source or the boundary Observable causes the returned Observable to emit the latest buffer and complete.

Type Parameters:
B - the boundary value type (ignored)
Parameters:
boundary - the boundary Observable
Returns:
an Observable that emits buffered items from the source Observable when the boundary Observable emits an item
See Also:
Observable.buffer(rx.Observable, int), RxJava Wiki: buffer()

buffer

public final <B> Observable<java.util.List<T>> buffer(Observable<B> boundary,
                                                      int initialCapacity)
Returns an Observable that emits non-overlapping buffered items from the source Observable each time the specified boundary Observable emits an item.

Completion of either the source or the boundary Observable causes the returned Observable to emit the latest buffer and complete.

Type Parameters:
B - the boundary value type (ignored)
Parameters:
boundary - the boundary Observable
initialCapacity - the initial capacity of each buffer chunk
Returns:
an Observable that emits buffered items from the source Observable when the boundary Observable emits an item
See Also:
RxJava Wiki: buffer(), Observable.buffer(rx.Observable, int)

cache

public final Observable<T> cache()
This method has similar behavior to Observable.replay() except that this auto-subscribes to the source Observable rather than returning a ConnectableObservable.

This is useful when you want an Observable to cache responses and you can't control the subscribe/unsubscribe behavior of all the Subscribers.

When you call cache(), it does not yet subscribe to the source Observable. This only happens when subscribe is called the first time on the Observable returned by cache().

Note: You sacrifice the ability to unsubscribe from the origin when you use the cache() Observer so be careful not to use this Observer on Observables that emit an infinite or very large number of items that will use up memory.

Returns:
an Observable that, when first subscribed to, caches all of its items and notifications for the benefit of subsequent observers
See Also:
RxJava Wiki: cache()

cast

public final <R> Observable<R> cast(java.lang.Class<R> klass)
Returns an Observable that emits the items emitted by the source Observable, converted to the specified type.

Parameters:
klass - the target class type that the items emitted by the source Observable will be converted to before being emitted by the resulting Observable
Returns:
an Observable that emits each item from the source Observable after converting it to the specified type
See Also:
RxJava Wiki: cast(), MSDN: Observable.Cast

collect

public final <R> Observable<R> collect(R state,
                                       Action2<R,? super T> collector)
Collect values into a single mutable data structure.

This is a simplified version of reduce that does not need to return the state on each pass.

Parameters:
state - FIXME FIXME FIXME
collector - FIXME FIXME FIXME
Returns:
FIXME FIXME FIXME

concatMap

public final <R> Observable<R> concatMap(Func1<? super T,? extends Observable<? extends R>> func)
Returns a new Observable that emits items resulting from applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then emitting the items that result from concatinating those resulting Observables.

Parameters:
func - a function that, when applied to an item emitted by the source Observable, returns an Observable
Returns:
an Observable that emits the result of applying the transformation function to each item emitted by the source Observable and concatinating the Observables obtained from this transformation

contains

public final Observable<java.lang.Boolean> contains(T element)
Returns an Observable that emits a Boolean that indicates whether the source Observable emitted a specified item.

Parameters:
element - the item to search for in the emissions from the source Observable
Returns:
an Observable that emits true if the specified item is emitted by the source Observable, or false if the source Observable completes without emitting that item
See Also:
RxJava Wiki: contains(), MSDN: Observable.Contains

count

public final Observable<java.lang.Integer> count()
Returns an Observable that emits the count of the total number of items emitted by the source Observable.

Returns:
an Observable that emits a single item: the number of elements emitted by the source Observable
See Also:
RxJava Wiki: count(), MSDN: Observable.Count, Observable.longCount()

debounce

public final <U> Observable<T> debounce(Func1<? super T,? extends Observable<U>> debounceSelector)
Return an Observable that mirrors the source Observable, except that it drops items emitted by the source Observable that are followed by another item within a computed debounce duration.

Type Parameters:
U - the debounce value type (ignored)
Parameters:
debounceSelector - function to retrieve a sequence that indicates the throttle duration for each item
Returns:
an Observable that omits items emitted by the source Observable that are followed by another item within a computed debounce duration

debounce

public final Observable<T> debounce(long timeout,
                                    java.util.concurrent.TimeUnit unit)
Return an Observable that mirrors the source Observable, except that it drops items emitted by the source Observable that are followed by newer items before a timeout value expires. The timer resets on each emission.

Note: If items keep being emitted by the source Observable faster than the timeout then no items will be emitted by the resulting Observable.

Information on debounce vs throttle:

Parameters:
timeout - the time each item has to be "the most recent" of those emitted by the source Observable to ensure that it's not dropped
unit - the TimeUnit for the timeout
Returns:
an Observable that filters out items from the source Observable that are too quickly followed by newer items
See Also:
RxJava Wiki: debounce(), Observable.throttleWithTimeout(long, TimeUnit)

debounce

public final Observable<T> debounce(long timeout,
                                    java.util.concurrent.TimeUnit unit,
                                    Scheduler scheduler)
Return an Observable that mirrors the source Observable, except that it drops items emitted by the source Observable that are followed by newer items before a timeout value expires on a specified Scheduler. The timer resets on each emission.

Note: If items keep being emitted by the source Observable faster than the timeout then no items will be emitted by the resulting Observable.

Information on debounce vs throttle:

Parameters:
timeout - the time each item has to be "the most recent" of those emitted by the source Observable to ensure that it's not dropped
unit - the unit of time for the specified timeout
scheduler - the Scheduler to use internally to manage the timers that handle the timeout for each item
Returns:
an Observable that filters out items from the source Observable that are too quickly followed by newer items
See Also:
RxJava Wiki: debounce(), Observable.throttleWithTimeout(long, TimeUnit, Scheduler)

defaultIfEmpty

public final Observable<T> defaultIfEmpty(T defaultValue)
Returns an Observable that emits the items emitted by the source Observable or a specified default item if the source Observable is empty.

Parameters:
defaultValue - the item to emit if the source Observable emits no items
Returns:
an Observable that emits either the specified default item if the source Observable emits no items, or the items emitted by the source Observable
See Also:
RxJava Wiki: defaultIfEmpty(), MSDN: Observable.DefaultIfEmpty

delay

public final <U,V> Observable<T> delay(Func0<? extends Observable<U>> subscriptionDelay,
                                       Func1<? super T,? extends Observable<V>> itemDelay)
Returns an Observable that delays the subscription to and emissions from the souce Observable via another Observable on a per-item basis.

Note: the resulting Observable will immediately propagate any onError notification from the source Observable.

Type Parameters:
U - the subscription delay value type (ignored)
V - the item delay value type (ignored)
Parameters:
subscriptionDelay - a function that returns an Observable that triggers the subscription to the source Observable once it emits any item
itemDelay - a function that returns an Observable for each item emitted by the source Observable, which is then used to delay the emission of that item by the resulting Observable until the Observable returned from itemDelay emits an item
Returns:
an Observable that delays the subscription and emissions of the source Observable via another Observable on a per-item basis

delay

public final <U> Observable<T> delay(Func1<? super T,? extends Observable<U>> itemDelay)
Returns an Observable that delays the emissions of the source Observable via another Observable on a per-item basis.

Note: the resulting Observable will immediately propagate any onError notification from the source Observable.

Type Parameters:
U - the item delay value type (ignored)
Parameters:
itemDelay - a function that returns an Observable for each item emitted by the source Observable, which is then used to delay the emission of that item by the resulting Observable until the Observable returned from itemDelay emits an item
Returns:
an Observable that delays the emissions of the source Observable via another Observable on a per-item basis

delay

public final Observable<T> delay(long delay,
                                 java.util.concurrent.TimeUnit unit)
Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a specified delay. Error notifications from the source Observable are not delayed.

Parameters:
delay - the delay to shift the source by
unit - the TimeUnit in which period is defined
Returns:
the source Observable shifted in time by the specified delay
See Also:
RxJava Wiki: delay(), MSDN: Observable.Delay

delay

public final Observable<T> delay(long delay,
                                 java.util.concurrent.TimeUnit unit,
                                 Scheduler scheduler)
Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a specified delay. Error notifications from the source Observable are not delayed.

Parameters:
delay - the delay to shift the source by
unit - the time unit of delay
scheduler - the Scheduler to use for delaying
Returns:
the source Observable shifted in time by the specified delay
See Also:
RxJava Wiki: delay(), MSDN: Observable.Delay

delaySubscription

public final Observable<T> delaySubscription(long delay,
                                             java.util.concurrent.TimeUnit unit)
Return an Observable that delays the subscription to the source Observable by a given amount of time.

Parameters:
delay - the time to delay the subscription
unit - the time unit of delay
Returns:
an Observable that delays the subscription to the source Observable by the given amount

delaySubscription

public final Observable<T> delaySubscription(long delay,
                                             java.util.concurrent.TimeUnit unit,
                                             Scheduler scheduler)
Return an Observable that delays the subscription to the source Observable by a given amount of time, both waiting and subscribing on a given Scheduler.

Parameters:
delay - the time to delay the subscription
unit - the time unit of delay
scheduler - the Scheduler on which the waiting and subscription will happen
Returns:
an Observable that delays the subscription to the source Observable by a given amount, waiting and subscribing on the given Scheduler

dematerialize

public final <T2> Observable<T2> dematerialize()
Returns an Observable that reverses the effect of materialize by transforming the Notification objects emitted by the source Observable into the items or notifications they represent.

Returns:
an Observable that emits the items and notifications embedded in the Notification objects emitted by the source Observable
Throws:
java.lang.Throwable - if the source Observable is not of type Observable<Notification<T>>
See Also:
RxJava Wiki: dematerialize(), MSDN: Observable.dematerialize

distinct

public final Observable<T> distinct()
Returns an Observable that emits all items emitted by the source Observable that are distinct.

Returns:
an Observable that emits only those items emitted by the source Observable that are distinct from each other
See Also:
RxJava Wiki: distinct(), MSDN: Observable.distinct

distinct

public final <U> Observable<T> distinct(Func1<? super T,? extends U> keySelector)
Returns an Observable that emits all items emitted by the source Observable that are distinct according to a key selector function.

Parameters:
keySelector - a function that projects an emitted item to a key value that is used to decide whether an item is distinct from another one or not
Returns:
an Observable that emits those items emitted by the source Observable that have distinct keys
See Also:
RxJava Wiki: distinct(), MSDN: Observable.distinct

distinctUntilChanged

public final Observable<T> distinctUntilChanged()
Returns an Observable that emits all items emitted by the source Observable that are distinct from their immediate predecessors.

Returns:
an Observable that emits those items from the source Observable that are distinct from their immediate predecessors
See Also:
RxJava Wiki: distinctUntilChanged(), MSDN: Observable.distinctUntilChanged

distinctUntilChanged

public final <U> Observable<T> distinctUntilChanged(Func1<? super T,? extends U> keySelector)
Returns an Observable that emits all items emitted by the source Observable that are distinct from their immediate predecessors, according to a key selector function.

Parameters:
keySelector - a function that projects an emitted item to a key value that is used to decide whether an item is distinct from another one or not
Returns:
an Observable that emits those items from the source Observable whose keys are distinct from those of their immediate predecessors
See Also:
RxJava Wiki: distinctUntilChanged(), MSDN: Observable.distinctUntilChanged

doOnCompleted

public final Observable<T> doOnCompleted(Action0 onCompleted)
Modifies an Observable so that it invokes an action when it calls onCompleted.

Parameters:
onCompleted - the action to invoke when the source Observable calls onCompleted
Returns:
the source Observable with the side-effecting behavior applied
See Also:
RxJava Wiki: doOnCompleted(), MSDN: Observable.Do

doOnEach

public final Observable<T> doOnEach(Action1<Notification<? super T>> onNotification)
Modifies an Observable so that it invokes an action for each item it emits.

Parameters:
onNotification - the action to invoke for each item emitted by the source Observable
Returns:
the source Observable with the side-effecting behavior applied
See Also:
RxJava Wiki: doOnEach(), MSDN: Observable.Do

doOnEach

public final Observable<T> doOnEach(Observer<? super T> observer)
Modifies an Observable so that it notifies an Observer for each item it emits.

Parameters:
observer - the action to invoke for each item emitted by the source Observable
Returns:
the source Observable with the side-effecting behavior applied
See Also:
RxJava Wiki: doOnEach(), MSDN: Observable.Do

doOnError

public final Observable<T> doOnError(Action1<java.lang.Throwable> onError)
Modifies an Observable so that it invokes an action if it calls onError.

Parameters:
onError - the action to invoke if the source Observable calls onError
Returns:
the source Observable with the side-effecting behavior applied
See Also:
RxJava Wiki: doOnError(), MSDN: Observable.Do

doOnNext

public final Observable<T> doOnNext(Action1<? super T> onNext)
Modifies an Observable so that it invokes an action when it calls onNext.

Parameters:
onNext - the action to invoke when the source Observable calls onNext
Returns:
the source Observable with the side-effecting behavior applied
See Also:
RxJava Wiki: doOnNext(), MSDN: Observable.Do

doOnTerminate

public final Observable<T> doOnTerminate(Action0 onTerminate)
Modifies an Observable so that it invokes an action when it calls onCompleted or onError.

This differs from finallyDo in that this happens BEFORE onCompleted/onError are emitted.

Parameters:
onTerminate - the action to invoke when the source Observable calls onCompleted or onError
Returns:
the source Observable with the side-effecting behavior applied
See Also:
RxJava Wiki: doOnTerminate(), MSDN: Observable.Do

elementAt

public final Observable<T> elementAt(int index)
Returns an Observable that emits the single item at a specified index in a sequence of emissions from a source Observbable.

Parameters:
index - the zero-based index of the item to retrieve
Returns:
an Observable that emits a single item: the item at the specified position in the sequence of those emitted by the source Observable
Throws:
java.lang.IndexOutOfBoundsException - if index is greater than or equal to the number of items emitted by the source Observable
java.lang.IndexOutOfBoundsException - if index is less than 0
See Also:
RxJava Wiki: elementAt()

elementAtOrDefault

public final Observable<T> elementAtOrDefault(int index,
                                              T defaultValue)
Returns an Observable that emits the item found at a specified index in a sequence of emissions from a source Observable, or a default item if that index is out of range.

Parameters:
index - the zero-based index of the item to retrieve
defaultValue - the default item
Returns:
an Observable that emits the item at the specified position in the sequence emitted by the source Observable, or the default item if that index is outside the bounds of the source sequence
Throws:
java.lang.IndexOutOfBoundsException - if index is less than 0
See Also:
RxJava Wiki: elementAtOrDefault()

exists

public final Observable<java.lang.Boolean> exists(Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emits true if any item emitted by the source Observable satisfies a specified condition, otherwise false. Note: this always emits false if the source Observable is empty.

In Rx.Net this is the any Observer but we renamed it in RxJava to better match Java naming idioms.

Parameters:
predicate - the condition to test items emitted by the source Observable
Returns:
an Observable that emits a Boolean that indicates whether any item emitted by the source Observable satisfies the predicate
See Also:
RxJava Wiki: exists(), MSDN: Observable.Any (Note: the description in this page was wrong at the time of this writing)

filter

public final Observable<T> filter(Func1<? super T,java.lang.Boolean> predicate)
Filter items emitted by an Observable.

Parameters:
predicate - a function that evaluates the items emitted by the source Observable, returning true if they pass the filter
Returns:
an Observable that emits only those items emitted by the source Observable that the filter evaluates as true
See Also:
RxJava Wiki: filter()

finallyDo

public final Observable<T> finallyDo(Action0 action)
Registers an Action0 to be called when this Observable invokes either onCompleted or onError.

Parameters:
action - an Action0 to be invoked when the source Observable finishes
Returns:
an Observable that emits the same items as the source Observable, then invokes the Action0
See Also:
RxJava Wiki: finallyDo(), MSDN: Observable.Finally

first

public final Observable<T> first()
Returns an Observable that emits only the very first item emitted by the source Observable, or raises an IllegalArgumentException if the source Observable is empty.

Returns:
an Observable that emits only the very first item emitted by the source Observable, or raises an IllegalArgumentException if the source Observable is empty
See Also:
RxJava Wiki: first(), "MSDN: Observable.firstAsync()"

first

public final Observable<T> first(Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition, or raises an IllegalArgumentException if no such items are emitted.

Parameters:
predicate - the condition that an item emitted by the source Observable has to satisfy
Returns:
an Observable that emits only the very first item emitted by the source Observable that satisfies the predicate, or raises an IllegalArgumentException if no such items are emitted
See Also:
RxJava Wiki: first(), "MSDN: Observable.firstAsync()"

firstOrDefault

public final Observable<T> firstOrDefault(T defaultValue)
Returns an Observable that emits only the very first item emitted by the source Observable, or a default item if the source Observable completes without emitting anything.

Parameters:
defaultValue - the default item to emit if the source Observable doesn't emit anything
Returns:
an Observable that emits only the very first item from the source, or a default item if the source Observable completes without emitting any items
See Also:
RxJava Wiki: firstOrDefault(), "MSDN: Observable.firstOrDefaultAsync()"

firstOrDefault

public final Observable<T> firstOrDefault(T defaultValue,
                                          Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition, or a default item if the source Observable emits no such items.

Parameters:
predicate - the condition any item emitted by the source Observable has to satisfy
defaultValue - the default item to emit if the source Observable doesn't emit anything that satisfies the predicate
Returns:
an Observable that emits only the very first item emitted by the source Observable that satisfies the predicate, or a default item if the source Observable emits no such items
See Also:
RxJava Wiki: firstOrDefault(), "MSDN: Observable.firstOrDefaultAsync()"

flatMap

public final <R> Observable<R> flatMap(Func1<? super T,? extends Observable<? extends R>> func)
Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.

Parameters:
func - a function that, when applied to an item emitted by the source Observable, returns an Observable
Returns:
an Observable that emits the result of applying the transformation function to each item emitted by the source Observable and merging the results of the Observables obtained from this transformation
See Also:
RxJava Wiki: flatMap()

groupBy

public final <K> Observable<GroupedObservable<K,T>> groupBy(Func1<? super T,? extends K> keySelector)
Groups the items emitted by an Observable according to a specified criterion, and emits these grouped items as GroupedObservables, one GroupedObservable per group.

Type Parameters:
K - the key type
Parameters:
keySelector - a function that extracts the key for each item
Returns:
an Observable that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source Observable that share that key value
See Also:
RxJava Wiki: groupBy

groupByUntil

public final <TKey,TDuration> Observable<GroupedObservable<TKey,T>> groupByUntil(Func1<? super T,? extends TKey> keySelector,
                                                                                 Func1<? super GroupedObservable<TKey,T>,? extends Observable<? extends TDuration>> durationSelector)
Groups the items emitted by an Observable according to a specified key selector function until the duration Observable expires for the key.

Parameters:
keySelector - a function to extract the key for each item
durationSelector - a function to signal the expiration of a group
Returns:
an Observable that emits GroupedObservables, each of which corresponds to a key value and each of which emits all items emitted by the source Observable during that key's duration that share that same key value
See Also:
RxJava Wiki: groupByUntil(), MSDN: Observable.GroupByUntil

groupByUntil

public final <TKey,TValue,TDuration> Observable<GroupedObservable<TKey,TValue>> groupByUntil(Func1<? super T,? extends TKey> keySelector,
                                                                                             Func1<? super T,? extends TValue> valueSelector,
                                                                                             Func1<? super GroupedObservable<TKey,TValue>,? extends Observable<? extends TDuration>> durationSelector)
Groups the items emitted by an Observable (transformed by a selector) according to a specified key selector function until the duration Observable expires for the key.

Parameters:
keySelector - a function to extract the key for each item
valueSelector - a function to map each item emitted by the source Observable to an item emitted by one of the resulting GroupedObservables
durationSelector - a function to signal the expiration of a group
Returns:
an Observable that emits GroupedObservables, each of which corresponds to a key value and each of which emits all items emitted by the source Observable during that key's duration that share that same key value, transformed by the value selector
See Also:
RxJava Wiki: groupByUntil(), MSDN: Observable.GroupByUntil

groupJoin

public final <T2,D1,D2,R> Observable<R> groupJoin(Observable<T2> right,
                                                  Func1<? super T,? extends Observable<D1>> leftDuration,
                                                  Func1<? super T2,? extends Observable<D2>> rightDuration,
                                                  Func2<? super T,? super Observable<T2>,? extends R> resultSelector)
Return an Observable that correlates two Observables when they overlap in time and groups the results.

Parameters:
right - the other Observable to correlate items from the source Observable with
leftDuration - a function that returns an Observable whose emissions indicate the duration of the values of the source Observable
rightDuration - a function that returns an Observable whose emissions indicate the duration of the values of the right Observable
resultSelector - a function that takes an item emitted by each Observable and returns the value to be emitted by the resulting Observable
Returns:
an Observable that emits items based on combining those items emitted by the source Observables whose durations overlap
See Also:
RxJava Wiiki: groupJoin, MSDN: Observable.GroupJoin

ignoreElements

public final Observable<T> ignoreElements()
Ignores all items emitted by the source Observable and only calls onCompleted or onError.

Returns:
an empty Observable that only calls onCompleted or onError, based on which one is called by the source Observable
See Also:
RxJava Wiki: ignoreElements(), MSDN: Observable.IgnoreElements

isEmpty

public final Observable<java.lang.Boolean> isEmpty()
Returns an Observable that emits true if the source Observable is empty, otherwise false.

In Rx.Net this is negated as the any Observer but we renamed this in RxJava to better match Java naming idioms.

Returns:
an Observable that emits a Boolean
See Also:
RxJava Wiki: isEmpty(), MSDN: Observable.Any

join

public final <TRight,TLeftDuration,TRightDuration,R> Observable<R> join(Observable<TRight> right,
                                                                        Func1<T,Observable<TLeftDuration>> leftDurationSelector,
                                                                        Func1<TRight,Observable<TRightDuration>> rightDurationSelector,
                                                                        Func2<T,TRight,R> resultSelector)
Correlates the items emitted by two Observables based on overlapping durations.

Parameters:
right - the second Observable to join items from
leftDurationSelector - a function to select a duration for each item emitted by the source Observable, used to determine overlap
rightDurationSelector - a function to select a duration for each item emitted by the right Observable, used to determine overlap
resultSelector - a function that computes an item to be emitted by the resulting Observable for any two overlapping items emitted by the two Observables
Returns:
an Observable that emits items correlating to items emitted by the source Observables that have overlapping durations
See Also:
RxJava Wiki: join(), MSDN: Observable.Join

last

public final Observable<T> last()
Returns an Observable that emits the last item emitted by the source Observable or notifies observers of an IllegalArgumentException if the source Observable is empty.

Returns:
an Observable that emits the last item from the source Observable or notifies observers of an error
See Also:
RxJava Wiki: last(), "MSDN: Observable.lastAsync()"

last

public final Observable<T> last(Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emits only the last item emitted by the source Observable that satisfies a given condition, or an IllegalArgumentException if no such items are emitted.

Parameters:
predicate - the condition any source emitted item has to satisfy
Returns:
an Observable that emits only the last item satisfying the given condition from the source, or an IllegalArgumentException if no such items are emitted
Throws:
java.lang.IllegalArgumentException - if no items that match the predicate are emitted by the source Observable
See Also:
RxJava Wiki: last(), "MSDN: Observable.lastAsync()"

lastOrDefault

public final Observable<T> lastOrDefault(T defaultValue)
Returns an Observable that emits only the last item emitted by the source Observable, or a default item if the source Observable completes without emitting any items.

Parameters:
defaultValue - the default item to emit if the source Observable is empty
Returns:
an Observable that emits only the last item emitted by the source Observable, or a default item if the source Observable is empty
See Also:
RxJava Wiki: lastOrDefault(), "MSDN: Observable.lastOrDefaultAsync()"

lastOrDefault

public final Observable<T> lastOrDefault(T defaultValue,
                                         Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emits only the last item emitted by the source Observable that satisfies a specified condition, or a default item if no such item is emitted by the source Observable.

Parameters:
defaultValue - the default item to emit if the source Observable doesn't emit anything that satisfies the specified predicate
predicate - the condition any item emitted by the source Observable has to satisfy
Returns:
an Observable that emits only the last item emitted by the source Observable that satisfies the given condition, or a default item if no such item is emitted by the source Observable
See Also:
RxJava Wiki: lastOrDefault(), "MSDN: Observable.lastOrDefaultAsync()"

longCount

public final Observable<java.lang.Long> longCount()
Returns an Observable that counts the total number of items emitted by the source Observable and emits this count as a 64-bit Long.

Returns:
an Observable that emits a single item: the number of items emitted by the source Observable as a 64-bit Long item
See Also:
RxJava Wiki: count(), MSDN: Observable.LongCount, Observable.count()

map

public final <R> Observable<R> map(Func1<? super T,? extends R> func)
Returns an Observable that applies a specified function to each item emitted by the source Observable and emits the results of these function applications.

Parameters:
func - a function to apply to each item emitted by the Observable
Returns:
an Observable that emits the items from the source Observable, transformed by the specified function
See Also:
RxJava Wiki: map(), MSDN: Observable.Select

mapMany

@Deprecated
public final <R> Observable<R> mapMany(Func1<? super T,? extends Observable<R>> func)
Deprecated. use Observable.flatMap(Func1)

Returns a new Observable by applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.

Note: mapMany and flatMap are equivalent.

Parameters:
func - a function that, when applied to an item emitted by the source Observable, returns an Observable
Returns:
an Observable that emits the result of applying the transformation function to each item emitted by the source Observable and merging the results of the Observables obtained from these transformations
See Also:
RxJava Wiki: mapMany(), Observable.flatMap(Func1)

materialize

public final Observable<Notification<T>> materialize()
Turns all of the emissions and notifications from a source Observable into emissions marked with their original types within Notification objects.

Returns:
an Observable that emits items that are the result of materializing the items and notifications of the source Observable
See Also:
RxJava Wiki: materialize(), MSDN: Observable.materialize

max

public final Observable<T> max(java.util.Comparator<? super T> comparator)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the maximum item emitted by the source Observable, according to the specified comparator. If there is more than one item with the same maximum value, it emits the last-emitted of these.

Parameters:
comparator - the comparer used to compare items
Returns:
an Observable that emits the maximum item emitted by the source Observable, according to the specified comparator
Throws:
java.lang.IllegalArgumentException - if the source is empty
See Also:
RxJava Wiki: max(), MSDN: Observable.Max

maxBy

public final <R extends java.lang.Comparable<? super R>> Observable<java.util.List<T>> maxBy(Func1<T,R> selector)
Returns an Observable that emits a List of items emitted by the source Observable that have the maximum key value. For a source Observable that emits no items, the resulting Observable emits an empty List.

Parameters:
selector - this function accepts an item emitted by the source Observable and returns a key
Returns:
an Observable that emits a List of those items emitted by the source Observable that had the largest key value of all of the emitted items
See Also:
RxJava Wiki: maxBy(), MSDN: Observable.MaxBy

maxBy

public final <R> Observable<java.util.List<T>> maxBy(Func1<T,R> selector,
                                                     java.util.Comparator<? super R> comparator)
Returns an Observable that emits a List of items emitted by the source Observable that have the maximum key value according to a specified comparator. For a source Observable that emits no items, the resulting Observable emits an empty List.

Parameters:
selector - this function accepts an item emitted by the source Observable and returns a key
comparator - the comparator used to compare key values
Returns:
an Observable that emits a List of those items emitted by the source Observable that had the largest key value of all of the emitted items according to the specified comparator
See Also:
RxJava Wiki: maxBy(), MSDN: Observable.MaxBy

mergeMap

public final <R> Observable<R> mergeMap(Func1<? super T,? extends Observable<? extends R>> func)
Returns an Observable that emits the results of applying a specified function to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.

Parameters:
func - a function that, when applied to an item emitted by the source Observable, returns an Observable
Returns:
an Observable that emits the result of applying the transformation function to each item emitted by the source Observable and merging the results of the Observables obtained from these transformations
See Also:
RxJava Wiki: flatMap(), Observable.flatMap(Func1)

mergeMap

public final <R> Observable<R> mergeMap(Func1<? super T,? extends Observable<? extends R>> onNext,
                                        Func1<? super java.lang.Throwable,? extends Observable<? extends R>> onError,
                                        Func0<? extends Observable<? extends R>> onCompleted)
Returns an Observable that applies a function to each item emitted or notification raised by the source Observable and then flattens the Observables returned from these functions and emits the resulting items.

Type Parameters:
R - the result type
Parameters:
onNext - a function that returns an Observable to merge for each item emitted by the source Observable
onError - a function that returns an Observable to merge for an onError notification from the source Observable
onCompleted - a function that returns an Observable to merge for an onCompleted notification from the source Observable
Returns:
an Observable that emits the results of merging the Observables returned from applying the specified functions to the emissions and notifications of the source Observable

mergeMap

public final <U,R> Observable<R> mergeMap(Func1<? super T,? extends Observable<? extends U>> collectionSelector,
                                          Func2<? super T,? super U,? extends R> resultSelector)
Returns an Observable that emits the results of a specified function to the pair of values emitted by the source Observable and a specified collection Observable.

Type Parameters:
U - the type of items emitted by the collection Observable
R - the type of items emitted by the resulting Observable
Parameters:
collectionSelector - a function that returns an Observable for each item emitted by the source Observable
resultSelector - a function that combines one item emitted by each of the source and collection Observables and returns an item to be emitted by the resulting Observable
Returns:
an Observable that emits the results of applying a function to a pair of values emitted by the source Observable and the collection Observable

mergeMapIterable

public final <R> Observable<R> mergeMapIterable(Func1<? super T,? extends java.lang.Iterable<? extends R>> collectionSelector)
Returns an Observable that merges each item emitted by the source Observable with the values in an Iterable corresponding to that item that is generated by a selector.

Type Parameters:
R - the type of item emitted by the resulting Observable
Parameters:
collectionSelector - a function that returns an Iterable sequence of values for when given an item emitted by the source Observable
Returns:
an Observable that emits the results of merging the items emitted by the source Observable with the values in the Iterables corresponding to those items, as generated by collectionSelector

mergeMapIterable

public final <U,R> Observable<R> mergeMapIterable(Func1<? super T,? extends java.lang.Iterable<? extends U>> collectionSelector,
                                                  Func2<? super T,? super U,? extends R> resultSelector)
Returns an Observable that emits the results of applying a function to the pair of values from the source Observable and an Iterable corresponding to that item that is generated by a selector.

Type Parameters:
U - the collection element type
R - the type of item emited by the resulting Observable
Parameters:
collectionSelector - a function that returns an Iterable sequence of values for each item emitted by the source Observable
resultSelector - a function that returns an item based on the item emitted by the source Observable and the Iterable returned for that item by the collectionSelector
Returns:
an Observable that emits the items returned by resultSelector for each item in the source Observable

min

public final Observable<T> min(java.util.Comparator<? super T> comparator)
Deprecated. Use rxjava-math module instead

Returns an Observable that emits the minimum item emitted by the source Observable, according to a specified comparator. If there is more than one such item, it returns the last-emitted one.

Parameters:
comparator - the comparer used to compare elements
Returns:
an Observable that emits the minimum item emitted by the source Observable according to the specified comparator
Throws:
java.lang.IllegalArgumentException - if the source is empty
See Also:
RxJava Wiki: min(), MSDN: Observable.Min

minBy

public final <R extends java.lang.Comparable<? super R>> Observable<java.util.List<T>> minBy(Func1<T,R> selector)
Returns an Observable that emits a List of items emitted by the source Observable that have the minimum key value. For a source Observable that emits no items, the resulting Observable emits an empty List.

Parameters:
selector - the key selector function
Returns:
an Observable that emits a List of all of the items from the source Observable that had the lowest key value of any items emitted by the source Observable
See Also:
RxJava Wiki: minBy(), MSDN: Observable.MinBy

minBy

public final <R> Observable<java.util.List<T>> minBy(Func1<T,R> selector,
                                                     java.util.Comparator<? super R> comparator)
Returns an Observable that emits a List of items emitted by the source Observable that have the minimum key value according to a given comparator function. For a source Observable that emits no items, the resulting Observable emits an empty List.

Parameters:
selector - the key selector function
comparator - the comparator used to compare key values
Returns:
an Observable that emits a List of all of the items from the source Observable that had the lowest key value of any items emitted by the source Observable according to the specified comparator
See Also:
RxJava Wiki: minBy(), MSDN: Observable.MinBy

multicast

public final <TIntermediate,TResult> Observable<TResult> multicast(Func0<? extends Subject<? super T,? extends TIntermediate>> subjectFactory,
                                                                   Func1<? super Observable<TIntermediate>,? extends Observable<TResult>> selector)
Returns an Observable that emits items produced by multicasting the source Observable within a selector function.

Parameters:
subjectFactory - the Subject factory
selector - the selector function, which can use the multicasted source Observable subject to the policies enforced by the created Subject
Returns:
an Observable that emits the items produced by multicasting the source Observable within a selector function
See Also:
RxJava: Observable.publish() and Observable.multicast(), MSDN: Observable.Multicast

multicast

public final <R> ConnectableObservable<R> multicast(Subject<? super T,? extends R> subject)
Returns a ConnectableObservable that upon connection causes the source Observable to push results into the specified subject.

Type Parameters:
R - the type of items emitted by the resulting ConnectableObservable
Parameters:
subject - the Subject for the ConnectableObservable to push source items into
Returns:
a ConnectableObservable that upon connection causes the source Observable to push results into the specified Subject
See Also:
RxJava Wiki: Observable.publish() and Observable.multicast()

observeOn

public final Observable<T> observeOn(Scheduler scheduler)
Move notifications to the specified Scheduler asynchronously with an unbounded buffer.

Parameters:
scheduler - the Scheduler to notify Observers on
Returns:
the source Observable modified so that its Observers are notified on the specified Scheduler
See Also:
RxJava Wiki: observeOn()

ofType

public final <R> Observable<R> ofType(java.lang.Class<R> klass)
Filters the items emitted by an Observable, only emitting those of the specified type.

Parameters:
klass - the class type to filter the items emitted by the source Observable
Returns:
an Observable that emits items from the source Observable of type klass
See Also:
RxJava Wiki: ofType(), MSDN: Observable.OfType

onErrorResumeNext

public final Observable<T> onErrorResumeNext(Func1<java.lang.Throwable,? extends Observable<? extends T>> resumeFunction)
Instruct an Observable to pass control to another Observable rather than invoking onError if it encounters an error.

By default, when an Observable encounters an error that prevents it from emitting the expected item to its Observer, the Observable invokes its Observer's onError method, and then quits without invoking any more of its Observer's methods. The onErrorResumeNext method changes this behavior. If you pass a function that returns an Observable (resumeFunction) to onErrorResumeNext, if the original Observable encounters an error, instead of invoking its Observer's onError method, it will instead relinquish control to the Observable returned from resumeFunction, which will invoke the Observer's onNext method if it is able to do so. In such a case, because no Observable necessarily invokes onError, the Observer may never know that an error happened.

You can use this to prevent errors from propagating or to supply fallback data should errors be encountered.

Parameters:
resumeFunction - a function that returns an Observable that will take over if the source Observable encounters an error
Returns:
the original Observable, with appropriately modified behavior
See Also:
RxJava Wiki: onErrorResumeNext()

onErrorResumeNext

public final Observable<T> onErrorResumeNext(Observable<? extends T> resumeSequence)
Instruct an Observable to pass control to another Observable rather than invoking onError if it encounters an error.

By default, when an Observable encounters an error that prevents it from emitting the expected item to its Observer, the Observable invokes its Observer's onError method, and then quits without invoking any more of its Observer's methods. The onErrorResumeNext method changes this behavior. If you pass another Observable (resumeSequence) to an Observable's onErrorResumeNext method, if the original Observable encounters an error, instead of invoking its Observer's onError method, it will instead relinquish control to resumeSequence which will invoke the Observer's onNext method if it is able to do so. In such a case, because no Observable necessarily invokes onError, the Observer may never know that an error happened.

You can use this to prevent errors from propagating or to supply fallback data should errors be encountered.

Parameters:
resumeSequence - a function that returns an Observable that will take over if the source Observable encounters an error
Returns:
the original Observable, with appropriately modified behavior
See Also:
RxJava Wiki: onErrorResumeNext()

onErrorReturn

public final Observable<T> onErrorReturn(Func1<java.lang.Throwable,? extends T> resumeFunction)
Instruct an Observable to emit an item (returned by a specified function) rather than invoking onError if it encounters an error.

By default, when an Observable encounters an error that prevents it from emitting the expected item to its Observer, the Observable invokes its Observer's onError method, and then quits without invoking any more of its Observer's methods. The onErrorReturn method changes this behavior. If you pass a function (resumeFunction) to an Observable's onErrorReturn method, if the original Observable encounters an error, instead of invoking its Observer's onError method, it will instead emit the return value of resumeFunction.

You can use this to prevent errors from propagating or to supply fallback data should errors be encountered.

Parameters:
resumeFunction - a function that returns an item that the new Observable will emit if the source Observable encounters an error
Returns:
the original Observable with appropriately modified behavior
See Also:
RxJava Wiki: onErrorReturn()

onErrorFlatMap

public final Observable<T> onErrorFlatMap(Func1<OnErrorThrowable,? extends Observable<? extends T>> resumeFunction)
Allows inserting onNext events into a stream when onError events are received and continuing the original sequence instead of terminating. Thus it allows a sequence with multiple onError events.

Parameters:
resumeFunction - a function that accepts an OnErrorThrowable representing the Throwable issued by the source Observable, and returns an Observable that issues items that will be emitted in place of the error
Returns:
the original Observable, with appropriately modified behavior
See Also:
RxJava Wiki: onErrorFlatMap()

onExceptionResumeNext

public final Observable<T> onExceptionResumeNext(Observable<? extends T> resumeSequence)
Instruct an Observable to pass control to another Observable rather than invoking onError if it encounters an Exception.

This differs from Observable.onErrorResumeNext(rx.functions.Func1>) in that this one does not handle Throwable or Error but lets those continue through.

By default, when an Observable encounters an exception that prevents it from emitting the expected item to its Observer, the Observable invokes its Observer's onError method, and then quits without invoking any more of its Observer's methods. The onExceptionResumeNext method changes this behavior. If you pass another Observable (resumeSequence) to an Observable's onExceptionResumeNext method, if the original Observable encounters an exception, instead of invoking its Observer's onError method, it will instead relinquish control to resumeSequence which will invoke the Observer's onNext method if it is able to do so. In such a case, because no Observable necessarily invokes onError, the Observer may never know that an exception happened.

You can use this to prevent exceptions from propagating or to supply fallback data should exceptions be encountered.

Parameters:
resumeSequence - a function that returns an Observable that will take over if the source Observable encounters an exception
Returns:
the original Observable, with appropriately modified behavior
See Also:
RxJava Wiki: onExceptionResumeNext()

parallel

public final <R> Observable<R> parallel(Func1<Observable<T>,Observable<R>> f)
Perform work on the source Observable<T> in parallel by sharding it on a Schedulers.computation() Scheduler, and return the resulting Observable<R>.

Parameters:
f - a Func1 that applies Observable Observers to Observable<T> in parallel and returns an Observable<R>
Returns:
an Observable that emits the results of applying f to the items emitted by the source Observable
See Also:
RxJava Wiki: parallel()

parallel

public final <R> Observable<R> parallel(Func1<Observable<T>,Observable<R>> f,
                                        Scheduler s)
Perform work on the source Observable<T> in parallel by sharding it on a Scheduler, and return the resulting Observable<R>.

Parameters:
f - a Func1 that applies Observable Observers to Observable<T> in parallel and returns an Observable<R>
s - a Scheduler to perform the work on
Returns:
an Observable that emits the results of applying f to the items emitted by the source Observable
See Also:
RxJava Wiki: parallel()

publish

public final ConnectableObservable<T> publish()
Returns a ConnectableObservable, which waits until its connect method is called before it begins emitting items to those Observers that have subscribed to it.

Returns:
a ConnectableObservable that upon connection causes the source Observable to emit items to its Observers
See Also:
RxJava Wiki: publish()

publish

public final <R> Observable<R> publish(Func1<? super Observable<T>,? extends Observable<R>> selector)
Returns an Observable that emits the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the underlying sequence.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a function that can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription forward.
Returns:
an Observable that emits the results of invoking the selector on the items emitted by a ConnectableObservable that shares a single subscription to the underlying sequence

publish

public final <R> Observable<R> publish(Func1<? super Observable<T>,? extends Observable<R>> selector,
                                       T initialValue)
Returns an Observable that emits initialValue followed by the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a function that can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source Observable. Subscribers to the source will receive all notifications of the source from the time of the subscription forward
initialValue - the initial value of the underlying BehaviorSubject
Returns:
an Observable that emits initialValue followed by the results of invoking the selector on a ConnectableObservable that shares a single subscription to the underlying Observable

publish

public final ConnectableObservable<T> publish(T initialValue)
Returns an Observable that emits initialValue followed by the items emitted by a ConnectableObservable that shares a single subscription to the source Observable.

Parameters:
initialValue - the initial value to be emitted by the resulting Observable
Returns:
a ConnectableObservable that shares a single subscription to the underlying Observable and starts with initialValue

publishLast

public final ConnectableObservable<T> publishLast()
Returns a ConnectableObservable that emits only the last item emitted by the source Observable.

Returns:
a ConnectableObservable that emits only the last item emitted by the source Observable
See Also:
RxJava Wiki: publishLast()

publishLast

public final <R> Observable<R> publishLast(Func1<? super Observable<T>,? extends Observable<R>> selector)
Returns an Observable that emits an item that results from invoking a specified selector on the last item emitted by a ConnectableObservable that shares a single subscription to the source Observable.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a function that can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source Observable. Subscribers to the source will only receive the last item emitted by the source.
Returns:
an Observable that emits an item that is the result of invoking the selector on a ConnectableObservable that shares a single subscription to the source Observable

reduce

public final Observable<T> reduce(Func2<T,T,T> accumulator)
Returns an Observable that applies a function of your choosing to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, and emits the final result from the final call to your function as its sole item.

This technique, which is called "reduce" here, is sometimes called "aggregate," "fold," "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, has an inject() method that does a similar operation on lists.

Parameters:
accumulator - an accumulator function to be invoked on each item emitted by the source Observable, whose result will be used in the next accumulator call
Returns:
an Observable that emits a single item that is the result of accumulating the items emitted by the source Observable
Throws:
java.lang.IllegalArgumentException - if the source Observable emits no items
See Also:
RxJava Wiki: reduce(), MSDN: Observable.Aggregate, Wikipedia: Fold (higher-order function)

reduce

public final <R> Observable<R> reduce(R initialValue,
                                      Func2<R,? super T,R> accumulator)
Returns an Observable that applies a function of your choosing to the first item emitted by a source Observable and a specified seed value, then feeds the result of that function along with the second item emitted by an Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the final result from the final call to your function as its sole item.

This technique, which is called "reduce" here, is sometimec called "aggregate," "fold," "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, has an inject() method that does a similar operation on lists.

Parameters:
initialValue - the initial (seed) accumulator value
accumulator - an accumulator function to be invoked on each item emitted by the source Observable, the result of which will be used in the next accumulator call
Returns:
an Observable that emits a single item that is the result of accumulating the output from the items emitted by the source Observable
See Also:
RxJava Wiki: reduce(), MSDN: Observable.Aggregate, Wikipedia: Fold (higher-order function)

repeat

public final Observable<T> repeat()
Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely.

Returns:
an Observable that emits the items emitted by the source Observable repeatedly and in sequence
See Also:
RxJava Wiki: repeat(), MSDN: Observable.Repeat

repeat

public final Observable<T> repeat(Scheduler scheduler)
Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely, on a particular Scheduler.

Parameters:
scheduler - the Scheduler to emit the items on
Returns:
an Observable that emits the items emitted by the source Observable repeatedly and in sequence
See Also:
RxJava Wiki: repeat(), MSDN: Observable.Repeat

repeat

public final Observable<T> repeat(long count)
Returns an Observable that repeats the sequence of items emitted by the source Observable at most count times.

Parameters:
count - the number of times the source Observable items are repeated, a count of 0 will yield an empty sequence
Returns:
an Observable that repeats the sequence of items emitted by the source Observable at most count times
Throws:
java.lang.IllegalArgumentException - if count is less than zero
See Also:
RxJava Wiki: repeat(), MSDN: Observable.Repeat

repeat

public final Observable<T> repeat(long count,
                                  Scheduler scheduler)
Returns an Observable that repeats the sequence of items emitted by the source Observable at most count times, on a particular Scheduler.

Parameters:
count - the number of times the source Observable items are repeated, a count of 0 will yield an empty sequence
scheduler - the Scheduler to emit the items on
Returns:
an Observable that repeats the sequence of items emitted by the source Observable at most count times on a particular Scheduler
See Also:
RxJava Wiki: repeat(), MSDN: Observable.Repeat

replay

public final ConnectableObservable<T> replay()
Returns a ConnectableObservable that shares a single subscription to the underlying Observable that will replay all of its items and notifications to any future Observer.

Returns:
a ConnectableObservable that upon connection causes the source Observable to emit its items to its Observers
See Also:
RxJava Wiki: replay()

replay

public final <R> Observable<R> replay(Func1<? super Observable<T>,? extends Observable<R>> selector)
Returns an Observable that emits items that are the results of invoking a specified selector on the items emitted by a ConnectableObservable that shares a single subscription to the source Observable.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
Returns:
an Observable that emits items that are the results of invoking the selector on a ConnectableObservable that shares a single subscription to the source Observable
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final <R> Observable<R> replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
                                      int bufferSize)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying bufferSize notifications.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
bufferSize - the buffer size that limits the number of items the connectable observable can replay
Returns:
an Observable that emits items that are the results of invoking the selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable replaying no more than bufferSize items
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final <R> Observable<R> replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
                                      int bufferSize,
                                      long time,
                                      java.util.concurrent.TimeUnit unit)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying no more than bufferSize items that were emitted within a specified time window.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
bufferSize - the buffer size that limits the number of items the connectable observable can replay
time - the duration of the window in which the replayed items must have been emitted
unit - the time unit of time
Returns:
an Observable that emits items that are the results of invoking the selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, and replays no more than bufferSize items that were emitted within the window defined by time
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final <R> Observable<R> replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
                                      int bufferSize,
                                      long time,
                                      java.util.concurrent.TimeUnit unit,
                                      Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying no more than bufferSize items that were emitted within a specified time window.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
bufferSize - the buffer size that limits the number of items the connectable observable can replay
time - the duration of the window in which the replayed items must have been emitted
unit - the time unit of time
scheduler - the Scheduler that is the time source for the window
Returns:
an Observable that emits items that are the results of invoking the selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, and replays no more than bufferSize items that were emitted within the window defined by time
Throws:
java.lang.IllegalArgumentException - if bufferSize is less than zero
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final <R> Observable<R> replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
                                      int bufferSize,
                                      Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying a maximum of bufferSize items.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
bufferSize - the buffer size that limits the number of items the connectable observable can replay
scheduler - the Scheduler on which the replay is observed
Returns:
an Observable that emits items that are the results of invoking the selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying no more than bufferSize notifications
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final <R> Observable<R> replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
                                      long time,
                                      java.util.concurrent.TimeUnit unit)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying all items that were emitted within a specified time window.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
time - the duration of the window in which the replayed items must have been emitted
unit - the time unit of time
Returns:
an Observable that emits items that are the results of invoking the selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying all items that were emitted within the window defined by time
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final <R> Observable<R> replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
                                      long time,
                                      java.util.concurrent.TimeUnit unit,
                                      Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying all items that were emitted within a specified time window.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
time - the duration of the window in which the replayed items must have been emitted
unit - the time unit of time
scheduler - the scheduler that is the time source for the window
Returns:
an Observable that emits items that are the results of invoking the selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying all items that were emitted within the window defined by time
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final <R> Observable<R> replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
                                      Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable.

Type Parameters:
R - the type of items emitted by the resulting Observable
Parameters:
selector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
scheduler - the Scheduler where the replay is observed
Returns:
an Observable that emits items that are the results of invoking the selector on items emitted by a ConnectableObservable that shares a single subscription to the source Observable, replaying all items
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final ConnectableObservable<T> replay(int bufferSize)
Returns a ConnectableObservable that shares a single subscription to the source Observable that replays at most bufferSize items emitted by that Observable.

Parameters:
bufferSize - the buffer size that limits the number of items that can be replayed
Returns:
a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items emitted by that Observable
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final ConnectableObservable<T> replay(int bufferSize,
                                             long time,
                                             java.util.concurrent.TimeUnit unit)
Returns a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items that were emitted during a specified time window.

Parameters:
bufferSize - the buffer size that limits the number of items that can be replayed
time - the duration of the window in which the replayed items must have been emitted
unit - the time unit of time
Returns:
a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items that were emitted during the window defined by time
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final ConnectableObservable<T> replay(int bufferSize,
                                             long time,
                                             java.util.concurrent.TimeUnit unit,
                                             Scheduler scheduler)
Returns a ConnectableObservable that shares a single subscription to the source Observable and that replays a maximum of bufferSize items that are emitted within a specified time window.

Parameters:
bufferSize - the buffer size that limits the number of items that can be replayed
time - the duration of the window in which the replayed items must have been emitted
unit - the time unit of time
scheduler - the scheduler that is used as a time source for the window
Returns:
a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items that were emitted during the window defined by time
Throws:
java.lang.IllegalArgumentException - if bufferSize is less than zero
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final ConnectableObservable<T> replay(int bufferSize,
                                             Scheduler scheduler)
Returns a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items emitted by that Observable.

Parameters:
bufferSize - the buffer size that limits the number of items that can be replayed
scheduler - the scheduler on which the Observers will observe the emitted items
Returns:
a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items that were emitted by the Observable
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final ConnectableObservable<T> replay(long time,
                                             java.util.concurrent.TimeUnit unit)
Returns a ConnectableObservable that shares a single subscription to the source Observable and replays all items emitted by that Observable within a specified time window.

Parameters:
time - the duration of the window in which the replayed items must have been emitted
unit - the time unit of time
Returns:
a ConnectableObservable that shares a single subscription to the source Observable and replays the items that were emitted during the window defined by time
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final ConnectableObservable<T> replay(long time,
                                             java.util.concurrent.TimeUnit unit,
                                             Scheduler scheduler)
Returns a ConnectableObservable that shares a single subscription to the source Observable and replays all items emitted by that Observable within a specified time window.

Parameters:
time - the duration of the window in which the replayed items must have been emitted
unit - the time unit of time
scheduler - the Scheduler that is the time source for the window
Returns:
a ConnectableObservable that shares a single subscription to the source Observable and replays the items that were emitted during the window defined by time
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

replay

public final ConnectableObservable<T> replay(Scheduler scheduler)
Returns a ConnectableObservable that shares a single subscription to the source Observable that will replay all of its items and notifications to any future Observer on the given Scheduler.

Parameters:
scheduler - the Scheduler on which the Observers will observe the emitted items
Returns:
a ConnectableObservable that shares a single subscription to the source Observable that will replay all of its items and notifications to any future Observer on the given Scheduler
See Also:
RxJava Wiki: replay(), MSDN: Observable.Replay

retry

public final Observable<T> retry()
Return an Observable that mirrors the source Observable, resubscribing to it if it calls onError (infinite retry count).

If the source Observable calls Observer.onError(java.lang.Throwable), this method will resubscribe to the source Observable rather than propagating the onError call.

Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those emitted during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second time and emits [1, 2, 3, 4, 5] then the complete sequence of emissions and notifications would be [1, 2, 1, 2, 3, 4, 5, onCompleted].

Returns:
the source Observable modified with retry logic
See Also:
RxJava Wiki: retry()

retry

public final Observable<T> retry(int retryCount)
Return an Observable that mirrors the source Observable, resubscribing to it if it calls onError up to a specified number of retries.

If the source Observable calls Observer.onError(java.lang.Throwable), this method will resubscribe to the source Observable for a maximum of retryCount resubscriptions rather than propagating the onError call.

Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those emitted during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second time and emits [1, 2, 3, 4, 5] then the complete sequence of emissions and notifications would be [1, 2, 1, 2, 3, 4, 5, onCompleted].

Parameters:
retryCount - number of retry attempts before failing
Returns:
the source Observable modified with retry logic
See Also:
RxJava Wiki: retry()

sample

public final Observable<T> sample(long period,
                                  java.util.concurrent.TimeUnit unit)
Returns an Observable that emits the results of sampling the items emitted by the source Observable at a specified time interval.

Parameters:
period - the sampling rate
unit - the TimeUnit in which period is defined
Returns:
an Observable that emits the results of sampling the items emitted by the source Observable at the specified time interval
See Also:
RxJava Wiki: sample()

sample

public final Observable<T> sample(long period,
                                  java.util.concurrent.TimeUnit unit,
                                  Scheduler scheduler)
Returns an Observable that emits the results of sampling the items emitted by the source Observable at a specified time interval.

Parameters:
period - the sampling rate
unit - the TimeUnit in which period is defined
scheduler - the Scheduler to use when sampling
Returns:
an Observable that emits the results of sampling the items emitted by the source Observable at the specified time interval
See Also:
RxJava Wiki: sample()

sample

public final <U> Observable<T> sample(Observable<U> sampler)
Return an Observable that emits the results of sampling the items emitted by the source Observable whenever the specified sampler Observable emits an item or completes.

Parameters:
sampler - the Observable to use for sampling the source Observable
Returns:
an Observable that emits the results of sampling the items emitted by this Observable whenever the sampler Observable emits an item or completes
See Also:
RxJava Wiki: sample()

scan

public final Observable<T> scan(Func2<T,T,T> accumulator)
Returns an Observable that applies a function of your choosing to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the result of each of these iterations.

This sort of function is sometimes called an accumulator.

Parameters:
accumulator - an accumulator function to be invoked on each item emitted by the source Observable, whose result will be emitted to Observers via onNext and used in the next accumulator call
Returns:
an Observable that emits the results of each call to the accumulator function
See Also:
RxJava Wiki: scan(), MSDN: Observable.Scan

scan

public final <R> Observable<R> scan(R initialValue,
                                    Func2<R,? super T,R> accumulator)
Returns an Observable that applies a function of your choosing to the first item emitted by a source Observable and a seed value, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the result of each of these iterations.

This sort of function is sometimes called an accumulator.

Note that the Observable that results from this method will emit initialValue as its first emitted item.

Parameters:
initialValue - the initial (seed) accumulator item
accumulator - an accumulator function to be invoked on each item emitted by the source Observable, whose result will be emitted to Observers via onNext and used in the next accumulator call
Returns:
an Observable that emits initialValue followed by the results of each call to the accumulator function
See Also:
RxJava Wiki: scan(), MSDN: Observable.Scan

serialize

public final Observable<T> serialize()

single

public final Observable<T> single()
If the source Observable completes after emitting a single item, return an Observable that emits that item. If the source Observable emits more than one item or no items, throw an IllegalArgumentException.

Returns:
an Observable that emits the single item emitted by the source Observable
Throws:
java.lang.IllegalArgumentException - if the source emits more than one item or no items
See Also:
RxJava Wiki: single(), "MSDN: Observable.singleAsync()"

single

public final Observable<T> single(Func1<? super T,java.lang.Boolean> predicate)
If the Observable completes after emitting a single item that matches a specified predicate, return an Observable that emits that item. If the source Observable emits more than one such item or no such items, throw an IllegalArgumentException.

Parameters:
predicate - a predicate function to evaluate items emitted by the source Observable
Returns:
an Observable that emits the single item emitted by the source Observable that matches the predicate
Throws:
java.lang.IllegalArgumentException - if the source Observable emits either more than one item that matches the predicate or no items that match the predicate
See Also:
RxJava Wiki: single(), "MSDN: Observable.singleAsync()"

singleOrDefault

public final Observable<T> singleOrDefault(T defaultValue)
If the source Observable completes after emitting a single item, return an Observable that emits that item; if the source Observable is empty, return an Observable that emits a default item. If the source Observable emits more than one item, throw an IllegalArgumentException.

Parameters:
defaultValue - a default value to emit if the source Observable emits no item
Returns:
an Observable that emits the single item emitted by the source Observable, or a default item if the source Observable is empty
Throws:
java.lang.IllegalArgumentException - if the source Observable emits more than one item
See Also:
RxJava Wiki: single(), "MSDN: Observable.singleOrDefaultAsync()"

singleOrDefault

public final Observable<T> singleOrDefault(T defaultValue,
                                           Func1<? super T,java.lang.Boolean> predicate)
If the Observable completes after emitting a single item that matches a predicate, return an Observable that emits that item; if the source Observable emits no such item, return an Observable that emits a default item. If the source Observable emits more than one such item, throw an IllegalArgumentException.

Parameters:
defaultValue - a default item to emit if the source Observable emits no matching items
predicate - a predicate function to evaluate items emitted by the source Observable
Returns:
an Observable that emits the single item emitted by the source Observable that matches the predicate, or the default item if no emitted item matches the predicate
Throws:
java.lang.IllegalArgumentException - if the source Observable emits more than one item that matches the predicate
See Also:
RxJava Wiki: single(), "MSDN: Observable.singleOrDefaultAsync()"

skip

public final Observable<T> skip(int num)
Returns an Observable that skips the first num items emitted by the source Observable and emits the remainder.

Parameters:
num - the number of items to skip
Returns:
an Observable that is identical to the source Observable except that it does not emit the first num items that the source Observable emits
See Also:
RxJava Wiki: skip()

skip

public final Observable<T> skip(long time,
                                java.util.concurrent.TimeUnit unit)
Returns an Observable that skips values emitted by the source Observable before a specified time window elapses.

Parameters:
time - the length of the time window to skip
unit - the time unit of time
Returns:
an Observable that skips values emitted by the source Observable before the time window defined by time elapses and the emits the remainder
See Also:
RxJava Wiki: skip()

skip

public final Observable<T> skip(long time,
                                java.util.concurrent.TimeUnit unit,
                                Scheduler scheduler)
Returns an Observable that skips values emitted by the source Observable before a specified time window on a specified Scheduler elapses.

Parameters:
time - the length of the time window to skip
unit - the time unit of time
scheduler - the Scheduler on which the timed wait happens
Returns:
an Observable that skips values emitted by the source Observable before the time window defined by time and scheduler elapses, and then emits the remainder
See Also:
RxJava Wiki: skip()

skipLast

public final Observable<T> skipLast(int count)
Returns an Observable that drops a specified number of items from the end of the sequence emitted by the source Observable.

This Observer accumulates a queue long enough to store the first count items. As more items are received, items are taken from the front of the queue and emitted by the returned Observable. This causes such items to be delayed.

Parameters:
count - number of items to drop from the end of the source sequence
Returns:
an Observable that emits the items emitted by the source Observable except for the dropped ones at the end
Throws:
java.lang.IndexOutOfBoundsException - if count is less than zero
See Also:
RxJava Wiki: skipLast(), MSDN: Observable.SkipLast

skipLast

public final Observable<T> skipLast(long time,
                                    java.util.concurrent.TimeUnit unit)
Returns an Observable that drops items emitted by the source Observable during a specified time window before the source completes.

Parameters:
time - the length of the time window
unit - the time unit of time
Returns:
an Observable that drops those items emitted by the source Observable in a time window before the source completes defined by time
See Also:
RxJava Wiki: skipLast(), MSDN: Observable.SkipLast

skipLast

public final Observable<T> skipLast(long time,
                                    java.util.concurrent.TimeUnit unit,
                                    Scheduler scheduler)
Returns an Observable that drops items emitted by the source Observable during a specified time window (defined on a specified scheduler) before the source completes.

Parameters:
time - the length of the time window
unit - the time unit of time
scheduler - the scheduler used as the time source
Returns:
an Observable that drops those items emitted by the source Observable in a time window before the source completes defined by time and scheduler
See Also:
RxJava Wiki: skipLast(), MSDN: Observable.SkipLast

skipUntil

public final <U> Observable<T> skipUntil(Observable<U> other)
Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.

Parameters:
other - the second Observable that has to emit an item before the source Observable's elements begin to be mirrored by the resulting Observable
Returns:
an Observable that skips items from the source Observable until the second Observable emits an item, then emits the remaining items
See Also:
RxJava Wiki: skipUntil(), MSDN: Observable.SkipUntil

skipWhile

public final Observable<T> skipWhile(Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.

Parameters:
predicate - a function to test each item emitted from the source Observable
Returns:
an Observable that begins emitting items emitted by the source Observable when the specified predicate becomes false
See Also:
RxJava Wiki: skipWhile(), MSDN: Observable.SkipWhile

skipWhileWithIndex

public final Observable<T> skipWhileWithIndex(Func2<? super T,java.lang.Integer,java.lang.Boolean> predicate)
Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.

Parameters:
predicate - a function to test each item emitted from the source Observable. It takes the emitted item as the first parameter and the sequential index of the emitted item as a second parameter.
Returns:
an Observable that begins emitting items emitted by the source Observable when the specified predicate becomes false
See Also:
RxJava Wiki: skipWhileWithIndex(), MSDN: Observable.SkipWhile

startWith

public final Observable<T> startWith(Observable<T> values)
Returns an Observable that emits the items in a specified Observable before it begins to emit items emitted by the source Observable.

Parameters:
values - an Observable that contains the items you want the modified Observable to emit first
Returns:
an Observable that emits the items in the specified Observable and then emits the items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(java.lang.Iterable<T> values)
Returns an Observable that emits the items in a specified Iterable before it begins to emit items emitted by the source Observable.

Parameters:
values - an Iterable that contains the items you want the modified Observable to emit first
Returns:
an Observable that emits the items in the specified Iterable and then emits the items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(java.lang.Iterable<T> values,
                                     Scheduler scheduler)
Returns an Observable that emits the items in a specified Iterable, on a specified Scheduler, before it begins to emit items emitted by the source Observable.

Parameters:
values - an Iterable that contains the items you want the modified Observable to emit first
scheduler - the Scheduler to emit the prepended values on
Returns:
an Observable that emits the items in the specified Iterable and then emits the items emitted by the source Observable
See Also:
RxJava Wiki: startWith(), MSDN: Observable.StartWith

startWith

public final Observable<T> startWith(T t1)
Returns an Observable that emits a specified item before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the item to emit
Returns:
an Observable that emits the specified item before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T t1,
                                     T t2)
Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the first item to emit
t2 - the second item to emit
Returns:
an Observable that emits the specified items before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T t1,
                                     T t2,
                                     T t3)
Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the first item to emit
t2 - the second item to emit
t3 - the third item to emit
Returns:
an Observable that emits the specified items before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T t1,
                                     T t2,
                                     T t3,
                                     T t4)
Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the first item to emit
t2 - the second item to emit
t3 - the third item to emit
t4 - the fourth item to emit
Returns:
an Observable that emits the specified items before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T t1,
                                     T t2,
                                     T t3,
                                     T t4,
                                     T t5)
Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the first item to emit
t2 - the second item to emit
t3 - the third item to emit
t4 - the fourth item to emit
t5 - the fifth item to emit
Returns:
an Observable that emits the specified items before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T t1,
                                     T t2,
                                     T t3,
                                     T t4,
                                     T t5,
                                     T t6)
Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the first item to emit
t2 - the second item to emit
t3 - the third item to emit
t4 - the fourth item to emit
t5 - the fifth item to emit
t6 - the sixth item to emit
Returns:
an Observable that emits the specified items before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T t1,
                                     T t2,
                                     T t3,
                                     T t4,
                                     T t5,
                                     T t6,
                                     T t7)
Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the first item to emit
t2 - the second item to emit
t3 - the third item to emit
t4 - the fourth item to emit
t5 - the fifth item to emit
t6 - the sixth item to emit
t7 - the seventh item to emit
Returns:
an Observable that emits the specified items before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T t1,
                                     T t2,
                                     T t3,
                                     T t4,
                                     T t5,
                                     T t6,
                                     T t7,
                                     T t8)
Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the first item to emit
t2 - the second item to emit
t3 - the third item to emit
t4 - the fourth item to emit
t5 - the fifth item to emit
t6 - the sixth item to emit
t7 - the seventh item to emit
t8 - the eighth item to emit
Returns:
an Observable that emits the specified items before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T t1,
                                     T t2,
                                     T t3,
                                     T t4,
                                     T t5,
                                     T t6,
                                     T t7,
                                     T t8,
                                     T t9)
Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

Parameters:
t1 - the first item to emit
t2 - the second item to emit
t3 - the third item to emit
t4 - the fourth item to emit
t5 - the fifth item to emit
t6 - the sixth item to emit
t7 - the seventh item to emit
t8 - the eighth item to emit
t9 - the ninth item to emit
Returns:
an Observable that emits the specified items before it begins to emit items emitted by the source Observable
See Also:
RxJava Wiki: startWith()

startWith

public final Observable<T> startWith(T[] values,
                                     Scheduler scheduler)
Returns an Observable that emits the items from a specified array, on a specified Scheduler, before it begins to emit items emitted by the source Observable.

Parameters:
values - the items you want the modified Observable to emit first
scheduler - the Scheduler to emit the prepended values on
Returns:
an Observable that emits the items from values, on scheduler, before it begins to emit items emitted by the source Observable.
See Also:
RxJava Wiki: startWith(), MSDN: Observable.StartWith

subscribe

public final Subscription subscribe()
Subscribe and ignore all events.

Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
Throws:
OnErrorNotImplementedException - if the Observable tries to call onError

subscribe

public final Subscription subscribe(Action1<? super T> onNext)
An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.

Parameters:
onNext - FIXME FIXME FIXME
Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
Throws:
java.lang.IllegalArgumentException - if onNext is null
OnErrorNotImplementedException - if the Observable tries to call onError
See Also:
RxJava Wiki: onNext, onCompleted, and onError

subscribe

public final Subscription subscribe(Action1<? super T> onNext,
                                    Action1<java.lang.Throwable> onError)
An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.

Parameters:
onNext - FIXME FIXME FIXME
onError - FIXME FIXME FIXME
Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
Throws:
java.lang.IllegalArgumentException - if onNext is null
java.lang.IllegalArgumentException - if onError is null
See Also:
RxJava Wiki: onNext, onCompleted, and onError

subscribe

public final Subscription subscribe(Action1<? super T> onNext,
                                    Action1<java.lang.Throwable> onError,
                                    Action0 onComplete)
An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.

Parameters:
onNext - FIXME FIXME FIXME
onError - FIXME FIXME FIXME
onComplete - FIXME FIXME FIXME
Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
Throws:
java.lang.IllegalArgumentException - if onNext is null
java.lang.IllegalArgumentException - if onError is null
java.lang.IllegalArgumentException - if onComplete is null
See Also:
RxJava Wiki: onNext, onCompleted, and onError

subscribe

public final Subscription subscribe(Action1<? super T> onNext,
                                    Action1<java.lang.Throwable> onError,
                                    Action0 onComplete,
                                    Scheduler scheduler)
An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.

Parameters:
onNext - FIXME FIXME FIXME
onError - FIXME FIXME FIXME
onComplete - FIXME FIXME FIXME
scheduler - FIXME FIXME FIXME
Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
See Also:
RxJava Wiki: onNext, onCompleted, and onError

subscribe

public final Subscription subscribe(Action1<? super T> onNext,
                                    Action1<java.lang.Throwable> onError,
                                    Scheduler scheduler)
An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.

Parameters:
onNext - FIXME FIXME FIXME
onError - FIXME FIXME FIXME
scheduler - FIXME FIXME FIXME
Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
See Also:
RxJava Wiki: onNext, onCompleted, and onError

subscribe

public final Subscription subscribe(Action1<? super T> onNext,
                                    Scheduler scheduler)
An Observer must call an Observable's subscribe method in order to receive items and notifications from the Observable.

Parameters:
onNext - FIXME FIXME FIXME
scheduler - FIXME FIXME FIXME
Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
See Also:
RxJava Wiki: onNext, onCompleted, and onError

subscribe

public final Subscription subscribe(Observer<? super T> observer,
                                    Scheduler scheduler)
An Observer must subscribe to an Observable in order to receive items and notifications from the Observable.

Parameters:
observer - FIXME FIXME FIXME
scheduler - FIXME FIXME FIXME
Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
See Also:
RxJava Wiki: onNext, onCompleted, and onError

subscribe

public final Subscription subscribe(Observer<? super T> observer)
An Observer must subscribe to an Observable in order to receive items and notifications from the Observable.

Parameters:
observer - FIXME FIXME FIXME
Returns:
a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
See Also:
RxJava Wiki: onNext, onCompleted, and onError

unsafeSubscribe

public final Subscription unsafeSubscribe(Subscriber<? super T> subscriber)
Subscribe to Observable and invoke Observable.OnSubscribe function without any contract protection, error handling, unsubscribe, or execution hooks.

This should only be used for implementing an Observable.Operator that requires nested subscriptions.

Normal use should use Observable.subscribe(Subscriber) which ensures the Rx contract and other functionality.

Parameters:
subscriber -
Returns:
Subscription which is the Subscriber passed in

subscribe

public final Subscription subscribe(Subscriber<? super T> subscriber)
A Subscriber must call an Observable's subscribe method in order to receive items and notifications from the Observable.

A typical implementation of subscribe does the following:

  1. It stores a reference to the Subscriber in a collection object, such as a List<T> object.
  2. It returns a reference to the Subscription interface. This enables Observers to unsubscribe, that is, to stop receiving items and notifications before the Observable stops sending them, which also invokes the Observer's onCompleted method.

An Observable<T> instance is responsible for accepting all subscriptions and notifying all Subscribers. Unless the documentation for a particular Observable<T> implementation indicates otherwise, Subscriber should make no assumptions about the order in which multiple Subscribers will receive their notifications.

For more information see the RxJava Wiki

Parameters:
subscriber - the Subscriber
Returns:
a Subscription reference with which Subscribers that are Observers can unsubscribe from the Observable
Throws:
java.lang.IllegalStateException - if subscribe() is unable to obtain an OnSubscribe<> function
java.lang.IllegalArgumentException - if the Subscriber provided as the argument to subscribe() is null
OnErrorNotImplementedException - if the Subscriber's onError method is null
java.lang.RuntimeException - if the Subscriber's onError method itself threw a Throwable

subscribe

public final Subscription subscribe(Subscriber<? super T> observer,
                                    Scheduler scheduler)
A Subscriber must call an Observable's subscribe method in order to receive items and notifications from the Observable.

A typical implementation of subscribe does the following:

  1. It stores a reference to the Subscriber in a collection object, such as a List<T> object.
  2. It returns a reference to the Subscription interface. This enables Observers to unsubscribe, that is, to stop receiving items and notifications before the Observable stops sending them, which also invokes the Observer's onCompleted method.

An Observable<T> instance is responsible for accepting all subscriptions and notifying all Subscribers. Unless the documentation for a particular Observable<T> implementation indicates otherwise, Subscribers should make no assumptions about the order in which multiple Subscribers will receive their notifications.

For more information see the RxJava Wiki

Parameters:
observer - the Subscriber
scheduler - the Scheduler on which Subscribers subscribe to the Observable
Returns:
a Subscription reference with which Subscribers that are Observers can unsubscribe from the Observable
Throws:
java.lang.IllegalArgumentException - if an argument to subscribe() is null

subscribeOn

public final Observable<T> subscribeOn(Scheduler scheduler)
Asynchronously subscribes Observers to this Observable on the specified Scheduler.

Parameters:
scheduler - the Scheduler to perform subscription actions on
Returns:
the source Observable modified so that its subscriptions happen on the specified Scheduler
See Also:
RxJava Wiki: subscribeOn()

sumDouble

public final Observable<java.lang.Double> sumDouble(Func1<? super T,java.lang.Double> valueExtractor)
Deprecated. Use rxjava-math module instead

Returns an Observable that extracts a Double from each of the items emitted by the source Observable via a function you specify, and then emits the sum of these Doubles.

Parameters:
valueExtractor - the function to extract a Double from each item emitted by the source Observable
Returns:
an Observable that emits the Double sum of the Double values corresponding to the items emitted by the source Observable as transformed by the provided function
See Also:
RxJava Wiki: sumDouble(), MSDN: Observable.Sum

sumFloat

public final Observable<java.lang.Float> sumFloat(Func1<? super T,java.lang.Float> valueExtractor)
Deprecated. Use rxjava-math module instead

Returns an Observable that extracts a Float from each of the items emitted by the source Observable via a function you specify, and then emits the sum of these Floats.

Parameters:
valueExtractor - the function to extract a Float from each item emitted by the source Observable
Returns:
an Observable that emits the Float sum of the Float values corresponding to the items emitted by the source Observable as transformed by the provided function
See Also:
RxJava Wiki: sumFloat(), MSDN: Observable.Sum

sumInteger

public final Observable<java.lang.Integer> sumInteger(Func1<? super T,java.lang.Integer> valueExtractor)
Deprecated. Use rxjava-math module instead

Returns an Observable that extracts an Integer from each of the items emitted by the source Observable via a function you specify, and then emits the sum of these Integers.

Parameters:
valueExtractor - the function to extract an Integer from each item emitted by the source Observable
Returns:
an Observable that emits the Integer sum of the Integer values corresponding to the items emitted by the source Observable as transformed by the provided function
See Also:
RxJava Wiki: sumInteger(), MSDN: Observable.Sum

sumLong

public final Observable<java.lang.Long> sumLong(Func1<? super T,java.lang.Long> valueExtractor)
Deprecated. Use rxjava-math module instead

Returns an Observable that extracts a Long from each of the items emitted by the source Observable via a function you specify, and then emits the sum of these Longs.

Parameters:
valueExtractor - the function to extract a Long from each item emitted by the source Observable
Returns:
an Observable that emits the Long sum of the Long values corresponding to the items emitted by the source Observable as transformed by the provided function
See Also:
RxJava Wiki: sumLong(), MSDN: Observable.Sum

switchMap

public final <R> Observable<R> switchMap(Func1<? super T,? extends Observable<? extends R>> func)
Returns a new Observable by applying a function that you supply to each item emitted by the source Observable that returns an Observable, and then emitting the items emitted by the most recently emitted of these Observables.

Parameters:
func - a function that, when applied to an item emitted by the source Observable, returns an Observable
Returns:
an Observable that emits the items emitted by the Observable returned from applying func to the most recently emitted item emitted by the source Observable

synchronize

public final Observable<T> synchronize()
Deprecated. Use Observable.serialize() instead as it doesn't block threads while emitting notification.

Wraps the source Observable in another Observable that ensures that the resulting Observable is chronologically well-behaved.

A well-behaved Observable does not interleave its invocations of the onNext, onCompleted, and onError methods of its Observers; it invokes either onCompleted or onError only once; and it never invokes onNext after invoking either onCompleted or onError. synchronize enforces this, and the Observable it returns invokes onNext and onCompleted or onError synchronously.

Returns:
an Observable that is a chronologically well-behaved version of the source Observable, and that synchronously notifies its Observers
See Also:
RxJava Wiki: synchronize()

synchronize

public final Observable<T> synchronize(java.lang.Object lock)
Deprecated. Use Observable.serialize() instead as it doesn't block threads while emitting notification.

Wraps the source Observable in another Observable that ensures that the resulting Observable is chronologically well-behaved by acquiring a mutual-exclusion lock for the object provided as the lock parameter.

A well-behaved Observable does not interleave its invocations of the onNext, onCompleted, and onError methods of its Observers; it invokes either onCompleted or onError only once; and it never invokes onNext after invoking either onCompleted or onError. synchronize enforces this, and the Observable it returns invokes onNext and onCompleted or onError synchronously.

Parameters:
lock - the lock object to synchronize each observer call on
Returns:
an Observable that is a chronologically well-behaved version of the source Observable, and that synchronously notifies its Observers
See Also:
RxJava Wiki: synchronize()

take

public final Observable<T> take(int num)
Returns an Observable that emits only the first num items emitted by the source Observable.

This method returns an Observable that will invoke a subscribing Observer's onNext function a maximum of num times before invoking onCompleted.

Parameters:
num - the maximum number of items to emit
Returns:
an Observable that emits only the first num items emitted by the source Observable, or all of the items from the source Observable if that Observable emits fewer than num items
See Also:
RxJava Wiki: take()

take

public final Observable<T> take(long time,
                                java.util.concurrent.TimeUnit unit)
Returns an Observable that emits those items emitted by source Observable before a specified time runs out.

Parameters:
time - the length of the time window
unit - the time unit of time
Returns:
an Observable that emits those items emitted by the source Observable before the time runs out
See Also:
RxJava Wiki: take()

take

public final Observable<T> take(long time,
                                java.util.concurrent.TimeUnit unit,
                                Scheduler scheduler)
Returns an Observable that emits those items emitted by source Observable before a specified time (on a specified Scheduler) runs out.

Parameters:
time - the length of the time window
unit - the time unit of time
scheduler - the Scheduler used for time source
Returns:
an Observable that emits those items emitted by the source Observable before the time runs out, according to the specified Scheduler
See Also:
RxJava Wiki: take()

takeFirst

@Deprecated
public final Observable<T> takeFirst()
Deprecated. use take(1) directly

Returns an Observable that emits only the very first item emitted by the source Observable.

Returns:
an Observable that emits only the very first item emitted by the source Observable, or an empty Observable if the source Observable completes without emitting a single item
See Also:
RxJava Wiki: first(), "MSDN: Observable.firstAsync()"

takeFirst

public final Observable<T> takeFirst(Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition.

Parameters:
predicate - the condition any item emitted by the source Observable has to satisfy
Returns:
an Observable that emits only the very first item emitted by the source Observable that satisfies the given condition, or that completes without emitting anything if the source Observable completes without emitting a single condition-satisfying item
See Also:
RxJava Wiki: first(), "MSDN: Observable.firstAsync()"

takeLast

public final Observable<T> takeLast(int count)
Returns an Observable that emits only the last count items emitted by the source Observable.

Parameters:
count - the number of items to emit from the end of the sequence of items emitted by the source Observable
Returns:
an Observable that emits only the last count items emitted by the source Observable
See Also:
RxJava Wiki: takeLast()

takeLast

public final Observable<T> takeLast(int count,
                                    long time,
                                    java.util.concurrent.TimeUnit unit)
Return an Observable that emits at most a specified number of items from the source Observable that were emitted in a specified window of time before the Observable completed.

Parameters:
count - the maximum number of items to emit
time - the length of the time window
unit - the time unit of time
Returns:
an Observable that emits at most count items from the source Observable that were emitted in a specified window of time before the Observable completed

takeLast

public final Observable<T> takeLast(int count,
                                    long time,
                                    java.util.concurrent.TimeUnit unit,
                                    Scheduler scheduler)
Return an Observable that emits at most a specified number of items from the source Observable that were emitted in a specified window of time before the Observable completed, where the timing information is provided by a given Scheduler.

Parameters:
count - the maximum number of items to emit
time - the length of the time window
unit - the time unit of time
scheduler - the Scheduler that provides the timestamps for the observed items
Returns:
an Observable that emits at most count items from the source Observable that were emitted in a specified window of time before the Observable completed, where the timing information is provided by the given scheduler
Throws:
java.lang.IllegalArgumentException - if count is less than zero

takeLast

public final Observable<T> takeLast(long time,
                                    java.util.concurrent.TimeUnit unit)
Return an Observable that emits the items from the source Observable that were emitted in a specified window of time before the Observable completed.

Parameters:
time - the length of the time window
unit - the time unit of time
Returns:
an Observable that emits the items from the source Observable that were emitted in the window of time before the Observable completed specified by time

takeLast

public final Observable<T> takeLast(long time,
                                    java.util.concurrent.TimeUnit unit,
                                    Scheduler scheduler)
Return an Observable that emits the items from the source Observable that were emitted in a specified window of time before the Observable completed, where the timing information is provided by a specified Scheduler.

Parameters:
time - the length of the time window
unit - the time unit of time
scheduler - the Scheduler that provides the timestamps for the Observed items
Returns:
an Observable that emits the items from the source Observable that were emitted in the window of time before the Observable completed specified by time, where the timing information is provided by scheduler

takeLastBuffer

public final Observable<java.util.List<T>> takeLastBuffer(int count)
Return an Observable that emits a single List containing the last count elements emitted by the source Observable.

Parameters:
count - the number of items to emit in the list
Returns:
an Observable that emits a single list containing the last count elements emitted by the source Observable

takeLastBuffer

public final Observable<java.util.List<T>> takeLastBuffer(int count,
                                                          long time,
                                                          java.util.concurrent.TimeUnit unit)
Return an Observable that emits a single List containing at most count items from the source Observable that were emitted during a specified window of time before the source Observable completed.

Parameters:
count - the maximum number of items to emit
time - the length of the time window
unit - the time unit of time
Returns:
an Observable that emits a single List containing at most count items emitted by the source Observable during the time window defined by time before the source Observable completed

takeLastBuffer

public final Observable<java.util.List<T>> takeLastBuffer(int count,
                                                          long time,
                                                          java.util.concurrent.TimeUnit unit,
                                                          Scheduler scheduler)
Return an Observable that emits a single List containing at most count items from the source Observable that were emitted during a specified window of time (on a specified Scheduler) before the source Observable completed.

Parameters:
count - the maximum number of items to emit
time - the length of the time window
unit - the time unit of time
scheduler - the Scheduler that provides the timestamps for the observed items
Returns:
an Observable that emits a single List containing at most count items emitted by the source Observable during the time window defined by time before the source Observable completed

takeLastBuffer

public final Observable<java.util.List<T>> takeLastBuffer(long time,
                                                          java.util.concurrent.TimeUnit unit)
Return an Observable that emits a single List containing those items from the source Observable that were emitted during a specified window of time before the source Observable completed.

Parameters:
time - the length of the time window
unit - the time unit of time
Returns:
an Observable that emits a single List containing the items emitted by the source Observable during the time window defined by time before the source Observable completed

takeLastBuffer

public final Observable<java.util.List<T>> takeLastBuffer(long time,
                                                          java.util.concurrent.TimeUnit unit,
                                                          Scheduler scheduler)
Return an Observable that emits a single List containing those items from the source Observable that were emitted during a specified window of time before the source Observable completed, where the timing information is provided by the given Scheduler.

Parameters:
time - the length of the time window
unit - the time unit of time
scheduler - the Scheduler that provides the timestamps for the observed items
Returns:
an Observable that emits a single List containing the items emitted by the source Observable during the time window defined by time before the source Observable completed, where the timing information is provided by scheduler

takeUntil

public final <E> Observable<T> takeUntil(Observable<? extends E> other)
Returns an Observable that emits the items emitted by the source Observable until a second Observable emits an item.

Type Parameters:
E - the type of items emitted by other
Parameters:
other - the Observable whose first emitted item will cause takeUntil to stop emitting items from the source Observable
Returns:
an Observable that emits the items emitted by the source Observable until such time as other emits its first item
See Also:
RxJava Wiki: takeUntil()

takeWhile

public final Observable<T> takeWhile(Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emits items emitted by the source Observable so long as each item satisfied a specified condition, and then completes as soon as this condition is not satisfied.

Parameters:
predicate - a function that evaluates an item emitted by the source Observable and returns a Boolean
Returns:
an Observable that emits the items from the source Observable so long as each item satisfies the condition defined by predicate, then completes
See Also:
RxJava Wiki: takeWhile()

takeWhileWithIndex

public final Observable<T> takeWhileWithIndex(Func2<? super T,? super java.lang.Integer,java.lang.Boolean> predicate)
Returns an Observable that emits the items emitted by a source Observable so long as a given predicate remains true, where the predicate operates on both the item and its index relative to the complete sequence of emitted items.

Parameters:
predicate - a function to test each item emitted by the source Observable for a condition; the second parameter of the function represents the sequential index of the source item; it returns a Boolean
Returns:
an Observable that emits items from the source Observable so long as the predicate continues to return true for each item, then completes
See Also:
RxJava Wiki: takeWhileWithIndex()

then

public final <R> rx.joins.Plan0<R> then(Func1<T,R> selector)
Matches when the Observable has an available item and projects the item by invoking the selector function.

Parameters:
selector - selector that will be invoked for items emitted by the source Observable
Returns:
a Plan0 that produces the projected results, to be fed (with other Plans) to the Observable.when(java.lang.Iterable>) Observer
Throws:
java.lang.NullPointerException - if selector is null
See Also:
RxJava Wiki: then(), MSDN: Observable.Then

throttleFirst

public final Observable<T> throttleFirst(long windowDuration,
                                         java.util.concurrent.TimeUnit unit)
Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration.

This differs from Observable.throttleLast(long, java.util.concurrent.TimeUnit) in that this only tracks passage of time whereas Observable.throttleLast(long, java.util.concurrent.TimeUnit) ticks at scheduled intervals.

Parameters:
windowDuration - time to wait before emitting another item after emitting the last item
unit - the unit of time of windowDuration
Returns:
an Observable that performs the throttle operation
See Also:
RxJava Wiki: throttleFirst()

throttleFirst

public final Observable<T> throttleFirst(long skipDuration,
                                         java.util.concurrent.TimeUnit unit,
                                         Scheduler scheduler)
Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration, where the windows are managed by a specified Scheduler.

This differs from Observable.throttleLast(long, java.util.concurrent.TimeUnit) in that this only tracks passage of time whereas Observable.throttleLast(long, java.util.concurrent.TimeUnit) ticks at scheduled intervals.

Parameters:
skipDuration - time to wait before emitting another item after emitting the last item
unit - the unit of time of skipDuration
scheduler - the Scheduler to use internally to manage the timers that handle timeout for each event
Returns:
an Observable that performs the throttle operation
See Also:
RxJava Wiki: throttleFirst()

throttleLast

public final Observable<T> throttleLast(long intervalDuration,
                                        java.util.concurrent.TimeUnit unit)
Returns an Observable that emits only the last item emitted by the source Observable during sequential time windows of a specified duration.

This differs from Observable.throttleFirst(long, java.util.concurrent.TimeUnit) in that this ticks along at a scheduled interval whereas Observable.throttleFirst(long, java.util.concurrent.TimeUnit) does not tick, it just tracks passage of time.

Parameters:
intervalDuration - duration of windows within which the last item emitted by the source Observable will be emitted
unit - the unit of time of intervalDuration
Returns:
an Observable that performs the throttle operation
See Also:
RxJava Wiki: throttleLast(), Observable.sample(long, TimeUnit)

throttleLast

public final Observable<T> throttleLast(long intervalDuration,
                                        java.util.concurrent.TimeUnit unit,
                                        Scheduler scheduler)
Returns an Observable that emits only the last item emitted by the source Observable during sequential time windows of a specified duration, where the duration is governed by a specified Scheduler.

This differs from Observable.throttleFirst(long, java.util.concurrent.TimeUnit) in that this ticks along at a scheduled interval whereas Observable.throttleFirst(long, java.util.concurrent.TimeUnit) does not tick, it just tracks passage of time.

Parameters:
intervalDuration - duration of windows within which the last item emitted by the source Observable will be emitted
unit - the unit of time of intervalDuration
scheduler - the Scheduler to use internally to manage the timers that handle timeout for each event
Returns:
an Observable that performs the throttle operation
See Also:
RxJava Wiki: throttleLast(), Observable.sample(long, TimeUnit, Scheduler)

throttleWithTimeout

public final Observable<T> throttleWithTimeout(long timeout,
                                               java.util.concurrent.TimeUnit unit)
Returns an Observable that only emits those items emitted by the source Observable that are not followed by another emitted item within a specified time window.

Note: If the source Observable keeps emitting items more frequently than the length of the time window then no items will be emitted by the resulting Observable.

Information on debounce vs throttle:

Parameters:
timeout - the length of the window of time that must pass after the emission of an item from the source Observable in which that Observable emits no items in order for the item to be emitted by the resulting Observable
unit - the TimeUnit of timeout
Returns:
an Observable that filters out items that are too quickly followed by newer items
See Also:
RxJava Wiki: throttleWithTimeout(), Observable.debounce(long, TimeUnit)

throttleWithTimeout

public final Observable<T> throttleWithTimeout(long timeout,
                                               java.util.concurrent.TimeUnit unit,
                                               Scheduler scheduler)
Returns an Observable that only emits those items emitted by the source Observable that are not followed by another emitted item within a specified time window, where the time window is governed by a specified Scheduler.

Note: If the source Observable keeps emitting items more frequently than the length of the time window then no items will be emitted by the resulting Observable.

Information on debounce vs throttle:

Parameters:
timeout - the length of the window of time that must pass after the emission of an item from the source Observable in which that Observable emits no items in order for the item to be emitted by the resulting Observable
unit - the TimeUnit of timeout
scheduler - the Scheduler to use internally to manage the timers that handle the timeout for each item
Returns:
an Observable that filters out items that are too quickly followed by newer items
See Also:
RxJava Wiki: throttleWithTimeout(), Observable.debounce(long, TimeUnit, Scheduler)

timeInterval

public final Observable<TimeInterval<T>> timeInterval()
Returns an Observable that emits records of the time interval between consecutive items emitted by the source Observable.

Returns:
an Observable that emits time interval information items
See Also:
RxJava Wiki: timeInterval(), MSDN: Observable.TimeInterval

timeInterval

public final Observable<TimeInterval<T>> timeInterval(Scheduler scheduler)
Returns an Observable that emits records of the time interval between consecutive items emitted by the source Observable, where this interval is computed on a specified Scheduler.

Parameters:
scheduler - the Scheduler used to compute time intervals
Returns:
an Observable that emits time interval information items
See Also:
RxJava Wiki: timeInterval(), MSDN: Observable.TimeInterval

timeout

public final <U,V> Observable<T> timeout(Func0<? extends Observable<U>> firstTimeoutSelector,
                                         Func1<? super T,? extends Observable<V>> timeoutSelector)
Returns an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if either the first item emitted by the source Observable or any subsequent item don't arrive within time windows defined by other Observables.

Type Parameters:
U - the first timeout value type (ignored)
V - the subsequent timeout value type (ignored)
Parameters:
firstTimeoutSelector - a function that returns an Observable that determines the timeout window for the first source item
timeoutSelector - a function that returns an Observable for each item emitted by the source Observable and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
Returns:
an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if either the first item or any subsequent item doesn't arrive within the time windows specified by the timeout selectors

timeout

public final <U,V> Observable<T> timeout(Func0<? extends Observable<U>> firstTimeoutSelector,
                                         Func1<? super T,? extends Observable<V>> timeoutSelector,
                                         Observable<? extends T> other)
Returns an Observable that mirrors the source Observable, but switches to a fallback Observable if either the first item emitted by the source Observable or any subsequent item don't arrive within time windows defined by other Observables.

Type Parameters:
U - the first timeout value type (ignored)
V - the subsequent timeout value type (ignored)
Parameters:
firstTimeoutSelector - a function that returns an Observable which determines the timeout window for the first source item
timeoutSelector - a function that returns an Observable for each item emitted by the source Observable and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
other - the fallback Observable to switch to if the source Observable times out
Returns:
an Observable that mirrors the source Observable, but switches to the other Observable if either the first item emitted by the source Observable or any subsequent item don't arrive within time windows defined by the timeout selectors
Throws:
java.lang.NullPointerException - if timeoutSelector is null

timeout

public final <V> Observable<T> timeout(Func1<? super T,? extends Observable<V>> timeoutSelector)
Returns an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if an item emitted by the source Observable doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by an Observable that is a function of the previous item.

Note: The arrival of the first source item is never timed out.

Type Parameters:
V - the timeout value type (ignored)
Parameters:
timeoutSelector - a function that returns an observable for each item emitted by the source Observable and that determines the timeout window for the subsequent item
Returns:
an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if an item emitted by the source Observable takes longer to arrive than the time window defined by the selector for the previously emitted item

timeout

public final <V> Observable<T> timeout(Func1<? super T,? extends Observable<V>> timeoutSelector,
                                       Observable<? extends T> other)
Returns an Observable that mirrors the source Observable, but that switches to a fallback Observable if an item emitted by the source Observable doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by an Observable that is a function of the previous item.

Note: The arrival of the first source item is never timed out.

Type Parameters:
V - the timeout value type (ignored)
Parameters:
timeoutSelector - a function that returns an Observable, for each item emitted by the source Observable, that determines the timeout window for the subsequent item
other - the fallback Observable to switch to if the source Observable times out
Returns:
an Observable that mirrors the source Observable, but switches to mirroring a fallback Observable if an item emitted by the source Observable takes longer to arrive than the time window defined by the selector for the previously emitted item

timeout

public final Observable<T> timeout(long timeout,
                                   java.util.concurrent.TimeUnit timeUnit)
Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item. If the next item isn't emitted within the specified timeout duration starting from its predecessor, the resulting Observable terminates and notifies observers of a TimeoutException.

Parameters:
timeout - maximum duration between emitted items before a timeout occurs
timeUnit - the unit of time that applies to the timeout argument.
Returns:
the source Observable modified to notify observers of a TimeoutException in case of a timeout
See Also:
RxJava Wiki: timeout(), MSDN: Observable.Timeout

timeout

public final Observable<T> timeout(long timeout,
                                   java.util.concurrent.TimeUnit timeUnit,
                                   Observable<? extends T> other)
Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item. If the next item isn't emitted within the specified timeout duration starting from its predecessor, the resulting Observable begins instead to mirror a fallback Observable.

Parameters:
timeout - maximum duration between items before a timeout occurs
timeUnit - the unit of time that applies to the timeout argument
other - the fallback Observable to use in case of a timeout
Returns:
the source Observable modified to switch to the fallback Observable in case of a timeout
See Also:
RxJava Wiki: timeout(), MSDN: Observable.Timeout

timeout

public final Observable<T> timeout(long timeout,
                                   java.util.concurrent.TimeUnit timeUnit,
                                   Observable<? extends T> other,
                                   Scheduler scheduler)
Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item using a specified Scheduler. If the next item isn't emitted within the specified timeout duration starting from its predecessor, the resulting Observable begins instead to mirror a fallback Observable.

Parameters:
timeout - maximum duration between items before a timeout occurs
timeUnit - the unit of time that applies to the timeout argument
other - the Observable to use as the fallback in case of a timeout
scheduler - the Scheduler to run the timeout timers on
Returns:
the source Observable modified so that it will switch to the fallback Observable in case of a timeout
See Also:
RxJava Wiki: timeout(), MSDN: Observable.Timeout

timeout

public final Observable<T> timeout(long timeout,
                                   java.util.concurrent.TimeUnit timeUnit,
                                   Scheduler scheduler)
Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item, where this policy is governed on a specified Scheduler. If the next item isn't emitted within the specified timeout duration starting from its predecessor, the resulting Observable terminates and notifies observers of a TimeoutException.

Parameters:
timeout - maximum duration between items before a timeout occurs
timeUnit - the unit of time that applies to the timeout argument
scheduler - the Scheduler to run the timeout timers on
Returns:
the source Observable modified to notify observers of a TimeoutException in case of a timeout
See Also:
RxJava Wiki: timeout(), MSDN: Observable.Timeout

timestamp

public final Observable<Timestamped<T>> timestamp()
Returns an Observable that emits each item emitted by the source Observable, wrapped in a Timestamped object.

Returns:
an Observable that emits timestamped items from the source Observable
See Also:
RxJava Wiki: timestamp(), MSDN: Observable.Timestamp

timestamp

public final Observable<Timestamped<T>> timestamp(Scheduler scheduler)
Returns an Observable that emits each item emitted by the source Observable, wrapped in a Timestamped object whose timestamps are provided by a specified Scheduler.

Parameters:
scheduler - the Scheduler to use as a time source
Returns:
an Observable that emits timestamped items from the source Observable with timestamps provided by the scheduler
See Also:
RxJava Wiki: timestamp(), MSDN: Observable.Timestamp

toBlockingObservable

public final BlockingObservable<T> toBlockingObservable()
Converts an Observable into a BlockingObservable (an Observable with blocking operators).

Returns:
a BlockingObservable version of this Observable
See Also:
RxJava Wiki: Blocking Observable Observers

toList

public final Observable<java.util.List<T>> toList()
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 items and then to invoke the Observer's onNext function once, passing it the entire list, by calling the Observable's toList method prior to calling its Observable.subscribe() method.

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.

Returns:
an Observable that emits a single item: a List containing all of the items emitted by the source Observable
See Also:
RxJava Wiki: toList()

toMap

public final <K> Observable<java.util.Map<K,T>> toMap(Func1<? super T,? extends K> keySelector)
Return an Observable that emits a single HashMap containing all items emitted by the source Observable, mapped by the keys returned by a specified keySelector function.

If more than one source item maps to the same key, the HashMap will contain the latest of those items.

Parameters:
keySelector - the function that extracts the key from a source item to be used in the HashMap
Returns:
an Observable that emits a single item: a HashMap containing the mapped items from the source Observable
See Also:
RxJava Wiki: toMap(), MSDN: Observable.ToDictionary

toMap

public final <K,V> Observable<java.util.Map<K,V>> toMap(Func1<? super T,? extends K> keySelector,
                                                        Func1<? super T,? extends V> valueSelector)
Return an Observable that emits a single HashMap containing values corresponding to items emitted by the source Observable, mapped by the keys returned by a specified keySelector function.

If more than one source item maps to the same key, the HashMap will contain a single entry that corresponds to the latest of those items.

Parameters:
keySelector - the function that extracts the key from a source item to be used in the HashMap
valueSelector - the function that extracts the value from a source item to be used in the HashMap
Returns:
an Observable that emits a single item: a HashMap containing the mapped items from the source Observable
See Also:
RxJava Wiki: toMap(), MSDN: Observable.ToDictionary

toMap

public final <K,V> Observable<java.util.Map<K,V>> toMap(Func1<? super T,? extends K> keySelector,
                                                        Func1<? super T,? extends V> valueSelector,
                                                        Func0<? extends java.util.Map<K,V>> mapFactory)
Return an Observable that emits a single Map, returned by a specified mapFactory function, that contains keys and values extracted from the items emitted by the source Observable.

Parameters:
keySelector - the function that extracts the key from a source item to be used in the Map
valueSelector - the function that extracts the value from the source items to be used as value in the Map
mapFactory - the function that returns a Map instance to be used
Returns:
an Observable that emits a single item: a Map that contains the mapped items emitted by the source Observable
See Also:
RxJava Wiki: toMap()

toMultimap

public final <K> Observable<java.util.Map<K,java.util.Collection<T>>> toMultimap(Func1<? super T,? extends K> keySelector)
Return an Observable that emits a single HashMap that contains an ArrayList of items emitted by the source Observable keyed by a specified keySelector function.

Parameters:
keySelector - the function that extracts the key from the source items to be used as key in the HashMap
Returns:
an Observable that emits a single item: a HashMap that contains an ArrayList of items mapped from the source Observable
See Also:
RxJava Wiki: toMap(), MSDN: Observable.ToLookup

toMultimap

public final <K,V> Observable<java.util.Map<K,java.util.Collection<V>>> toMultimap(Func1<? super T,? extends K> keySelector,
                                                                                   Func1<? super T,? extends V> valueSelector)
Return an Observable that emits a single HashMap that contains an ArrayList of values extracted by a specified valueSelector function from items emitted by the source Observable, keyed by a specified keySelector function.

Parameters:
keySelector - the function that extracts a key from the source items to be used as key in the HashMap
valueSelector - the function that extracts a value from the source items to be used as value in the HashMap
Returns:
an Observable that emits a single item: a HashMap that contains an ArrayList of items mapped from the source Observable
See Also:
RxJava Wiki: toMap(), MSDN: Observable.ToLookup

toMultimap

public final <K,V> Observable<java.util.Map<K,java.util.Collection<V>>> toMultimap(Func1<? super T,? extends K> keySelector,
                                                                                   Func1<? super T,? extends V> valueSelector,
                                                                                   Func0<? extends java.util.Map<K,java.util.Collection<V>>> mapFactory)
Return an Observable that emits a single Map, returned by a specified mapFactory function, that contains an ArrayList of values, extracted by a specified valueSelector function from items emitted by the source Observable and keyed by the keySelector function.

Parameters:
keySelector - the function that extracts a key from the source items to be used as the key in the Map
valueSelector - the function that extracts a value from the source items to be used as the value in the Map
mapFactory - the function that returns a Map instance to be used
Returns:
an Observable that emits a single item: a Map that contains a list items mapped from the source Observable
See Also:
RxJava Wiki: toMap()

toMultimap

public final <K,V> Observable<java.util.Map<K,java.util.Collection<V>>> toMultimap(Func1<? super T,? extends K> keySelector,
                                                                                   Func1<? super T,? extends V> valueSelector,
                                                                                   Func0<? extends java.util.Map<K,java.util.Collection<V>>> mapFactory,
                                                                                   Func1<? super K,? extends java.util.Collection<V>> collectionFactory)
Return an Observable that emits a single Map, returned by a specified mapFactory function, that contains a custom collection of values, extracted by a specified valueSelector function from items emitted by the source Observable, and keyed by the keySelector function.

Parameters:
keySelector - the function that extracts a key from the source items to be used as the key in the Map
valueSelector - the function that extracts a value from the source items to be used as the value in the Map
mapFactory - the function that returns a Map instance to be used
collectionFactory - the function that returns a Collection instance for a particular key to be used in the Map
Returns:
an Observable that emits a single item: a Map that contains the collection of mapped items from the source Observable
See Also:
RxJava Wiki: toMap()

toSortedList

public final Observable<java.util.List<T>> toSortedList()
Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order. Each item emitted by the Observable must implement Comparable with respect to all other items in the sequence.

Returns:
an Observable that emits a list that contains the items emitted by the source Observable in sorted order
Throws:
java.lang.ClassCastException - if any item emitted by the Observable does not implement Comparable with respect to all other items emitted by the Observable
See Also:
RxJava Wiki: toSortedList()

toSortedList

public final Observable<java.util.List<T>> toSortedList(Func2<? super T,? super T,java.lang.Integer> sortFunction)
Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order based on a specified comparison function.

Parameters:
sortFunction - a function that compares two items emitted by the source Observable and returns an Integer that indicates their sort order
Returns:
an Observable that emits a list that contains the items emitted by the source Observable in sorted order
See Also:
RxJava Wiki: toSortedList()

unsubscribeOn

public final Observable<T> unsubscribeOn(Scheduler scheduler)
Asynchronously unsubscribes on the specified Scheduler.

Parameters:
scheduler - the Scheduler to perform subscription and unsubscription actions on
Returns:
the source Observable modified so that its unsubscriptions happen on the specified Scheduler

where

@Deprecated
public final Observable<T> where(Func1<? super T,java.lang.Boolean> predicate)
Deprecated. use Observable.filter(Func1)

Returns an Observable that represents a filtered version of the source Observable.

Parameters:
predicate - a function that evaluates an item emitted by the source Observable, returning true if it passes the filter
Returns:
an Observable that emits only those items emitted by the source Observable that the filter evaluates as true
See Also:
RxJava Wiki: where(), Observable.filter(Func1)

window

public final <TClosing> Observable<Observable<T>> window(Func0<? extends Observable<? extends TClosing>> closingSelector)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping windows. It emits the current window and opens a new one when the Observable produced by the specified closingSelector emits an item. The closingSelector then creates a new Observable to generate the closer of the next window.

Parameters:
closingSelector - a Func0 that produces an Observable for every window created. When this Observable emits an item, window() emits the associated window and begins a new one.
Returns:
an Observable that emits connected, non-overlapping windows of items from the source Observable when closingSelector emits an item
See Also:
RxJava Wiki: window()

window

public final Observable<Observable<T>> window(int count)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping windows, each containing count items. When the source Observable completes or encounters an error, the resulting Observable emits the current window and propagates the notification from the source Observable.

Parameters:
count - the maximum size of each window before it should be emitted
Returns:
an Observable that emits connected, non-overlapping windows, each containing at most count items from the source Observable
See Also:
RxJava Wiki: window()

window

public final Observable<Observable<T>> window(int count,
                                              int skip)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable emits windows every skip items, each containing no more than count items. When the source Observable completes or encounters an error, the resulting Observable emits the current window and propagates the notification from the source Observable.

Parameters:
count - the maximum size of each window before it should be emitted
skip - how many items need to be skipped before starting a new window. Note that if skip and count are equal this is the same operation as Observable.window(int).
Returns:
an Observable that emits windows every skip items containing at most count items from the source Observable
See Also:
RxJava Wiki: window()

window

public final Observable<Observable<T>> window(long timespan,
                                              long timeshift,
                                              java.util.concurrent.TimeUnit unit)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable starts a new window periodically, as determined by the timeshift argument. It emits each window after a fixed timespan, specified by the timespan argument. When the source Observable completes or Observable completes or encounters an error, the resulting Observable emits the current window and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each window collects items before it should be emitted
timeshift - the period of time after which a new window will be created
unit - the unit of time that applies to the timespan and timeshift arguments
Returns:
an Observable that emits new windows periodically as a fixed timespan elapses
See Also:
RxJava Wiki: window()

window

public final Observable<Observable<T>> window(long timespan,
                                              long timeshift,
                                              java.util.concurrent.TimeUnit unit,
                                              Scheduler scheduler)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable starts a new window periodically, as determined by the timeshift argument. It emits each window after a fixed timespan, specified by the timespan argument. When the source Observable completes or Observable completes or encounters an error, the resulting Observable emits the current window and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each window collects items before it should be emitted
timeshift - the period of time after which a new window will be created
unit - the unit of time that applies to the timespan and timeshift arguments
scheduler - the Scheduler to use when determining the end and start of a window
Returns:
an Observable that emits new windows periodically as a fixed timespan elapses
See Also:
RxJava Wiki: window()

window

public final Observable<Observable<T>> window(long timespan,
                                              java.util.concurrent.TimeUnit unit)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping windows, each of a fixed duration specified by the timespan argument. When the source Observable completes or encounters an error, the resulting Observable emits the current window and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each window collects items before it should be emitted and replaced with a new window
unit - the unit of time that applies to the timespan argument
Returns:
an Observable that emits connected, non-overlapping windows represending items emitted by the source Observable during fixed, consecutive durations
See Also:
RxJava Wiki: window()

window

public final Observable<Observable<T>> window(long timespan,
                                              java.util.concurrent.TimeUnit unit,
                                              int count)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping windows, each of a fixed duration as specified by the timespan argument or a maximum size as specified by the count argument (whichever is reached first). When the source Observable completes or encounters an error, the resulting Observable emits the current window and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each window collects items before it should be emitted and replaced with a new window
unit - the unit of time that applies to the timespan argument
count - the maximum size of each window before it should be emitted
Returns:
an Observable that emits connected, non-overlapping windows of items from the source Observable that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
See Also:
RxJava Wiki: window()

window

public final Observable<Observable<T>> window(long timespan,
                                              java.util.concurrent.TimeUnit unit,
                                              int count,
                                              Scheduler scheduler)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping windows, each of a fixed duration specified by the timespan argument or a maximum size specified by the count argument (whichever is reached first). When the source Observable completes or encounters an error, the resulting Observable emits the current window and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each window collects items before it should be emitted and replaced with a new window
unit - the unit of time which applies to the timespan argument
count - the maximum size of each window before it should be emitted
scheduler - the Scheduler to use when determining the end and start of a window
Returns:
an Observable that emits connected, non-overlapping windows of items from the source Observable that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
See Also:
RxJava Wiki: window()

window

public final Observable<Observable<T>> window(long timespan,
                                              java.util.concurrent.TimeUnit unit,
                                              Scheduler scheduler)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable emits connected, non-overlapping windows, each of a fixed duration as specified by the timespan argument. When the source Observable completes or encounters an error, the resulting Observable emits the current window and propagates the notification from the source Observable.

Parameters:
timespan - the period of time each window collects items before it should be emitted and replaced with a new window
unit - the unit of time which applies to the timespan argument
scheduler - the Scheduler to use when determining the end and start of a window
Returns:
an Observable that emits connected, non-overlapping windows containing items emitted by the source Observable within a fixed duration
See Also:
RxJava Wiki: window()

window

public final <TOpening,TClosing> Observable<Observable<T>> window(Observable<? extends TOpening> windowOpenings,
                                                                  Func1<? super TOpening,? extends Observable<? extends TClosing>> closingSelector)
Returns an Observable that emits windows of items it collects from the source Observable. The resulting Observable emits windows that contain those items emitted by the source Observable between the time when the windowOpenings Observable emits an item and when the Observable returned by closingSelector emits an item.

Parameters:
windowOpenings - an Observable that, when it emits an item, causes another window to be created
closingSelector - a Func1 that produces an Observable for every window created. When this Observable emits an item, the associated window is closed and emitted
Returns:
an Observable that emits windows of items emitted by the source Observable that are governed by the specified window-governing Observables
See Also:
RxJava Wiki: window()

window

public final <U> Observable<Observable<T>> window(Observable<U> boundary)
Returns an Observable that emits non-overlapping windows of items it collects from the source Observable where the boundary of each window is determined by the items emitted from a specified boundary-governing Observable.

Type Parameters:
U - the window element type (ignored)
Parameters:
boundary - an Observable whose emitted items close and open windows
Returns:
an Observable that emits non-overlapping windows of items it collects from the source Observable where the boundary of each window is determined by the items emitted from the boundary Observable

zip

public final <T2,R> Observable<R> zip(java.lang.Iterable<? extends T2> other,
                                      Func2<? super T,? super T2,? extends R> zipFunction)
Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source Observable and a specified Iterable sequence.

Note that the other Iterable is evaluated as items are observed from the source Observable; it is not pre-consumed. This allows you to zip infinite streams on either side.

Type Parameters:
T2 - the type of items in the other Iterable
R - the type of items emitted by the resulting Observable
Parameters:
other - the Iterable sequence
zipFunction - a function that combines the pairs of items from the Observable and the Iterable to generate the items to be emitted by the resulting Observable
Returns:
an Observable that pairs up values from the source Observable and the other Iterable sequence and emits the results of zipFunction applied to these pairs

zip

public final <T2,R> Observable<R> zip(Observable<? extends T2> other,
                                      Func2<? super T,? super T2,? extends R> zipFunction)
Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source Observable and another specified Observable.

Type Parameters:
T2 - the type of items emitted by the other Observable
R - the type of items emitted by the resulting Observable
Parameters:
other - the other Observable
zipFunction - a function that combines the pairs of items from the two Observables to generate the items to be emitted by the resulting Observable
Returns:
an Observable that pairs up values from the source Observable and the other Observable and emits the results of zipFunction applied to these pairs