Top Description Constructors Methods
io.reactivex

public abstract Class Observable<T>

extends Object
implements ObservableSource<T>
Class Inheritance
All Implemented Interfaces
io.reactivex.ObservableSource
Known Direct Subclasses
io.reactivex.internal.operators.completable.CompletableToObservable, io.reactivex.internal.operators.maybe.MaybeFlatMapIterableObservable, io.reactivex.internal.operators.maybe.MaybeToObservable, io.reactivex.internal.operators.mixed.CompletableAndThenObservable, io.reactivex.internal.operators.mixed.MaybeFlatMapObservable, io.reactivex.internal.operators.mixed.ObservableConcatMapMaybe, io.reactivex.internal.operators.mixed.ObservableConcatMapSingle, io.reactivex.internal.operators.mixed.ObservableSwitchMapMaybe, io.reactivex.internal.operators.mixed.ObservableSwitchMapSingle, io.reactivex.internal.operators.mixed.SingleFlatMapObservable, io.reactivex.internal.operators.observable.AbstractObservableWithUpstream, io.reactivex.internal.operators.observable.ObservableAmb, io.reactivex.internal.operators.observable.ObservableAutoConnect, io.reactivex.internal.operators.observable.ObservableRangeLong, io.reactivex.internal.operators.observable.ObservableRefCount, io.reactivex.internal.operators.observable.ObservableReplay.MulticastReplay, io.reactivex.internal.operators.observable.ObservableScalarXMap.ScalarXMapObservable, io.reactivex.internal.operators.observable.ObservableSequenceEqual, io.reactivex.internal.operators.observable.ObservableTimer, io.reactivex.internal.operators.observable.ObservableUsing, io.reactivex.internal.operators.observable.ObservableZip, io.reactivex.internal.operators.observable.ObservableZipIterable, io.reactivex.internal.operators.observable.ObservableDelaySubscriptionOther, io.reactivex.internal.operators.observable.ObservableEmpty, io.reactivex.internal.operators.observable.ObservableError, io.reactivex.internal.operators.observable.ObservableFromArray, io.reactivex.internal.operators.observable.ObservableFromCallable, io.reactivex.internal.operators.observable.ObservableFromFuture, io.reactivex.internal.operators.observable.ObservableRange, io.reactivex.internal.operators.observable.ObservableFromIterable, io.reactivex.internal.operators.observable.ObservableFromPublisher, io.reactivex.internal.operators.observable.ObservableFromUnsafeSource, io.reactivex.internal.operators.observable.ObservableGenerate, io.reactivex.internal.operators.observable.ObservableInterval, io.reactivex.internal.operators.observable.ObservableIntervalRange, io.reactivex.internal.operators.observable.ObservableJust, io.reactivex.internal.operators.observable.ObservableCombineLatest, io.reactivex.internal.operators.observable.ObservableCreate, io.reactivex.internal.operators.observable.ObservableDefer, io.reactivex.internal.operators.observable.ObservableNever, io.reactivex.internal.operators.single.SingleFlatMapIterableObservable, io.reactivex.internal.operators.single.SingleToObservable, io.reactivex.observables.ConnectableObservable, io.reactivex.observables.GroupedObservable, io.reactivex.subjects.Subject
Type Parameters
<T>
the type of the items emitted by the Observable
Imports
java.util.*, java.util.concurrent.*, org.reactivestreams.Publisher, io.reactivex.annotations.*, io.reactivex.disposables.Disposable, io.reactivex.exceptions.Exceptions, io.reactivex.functions.*, io.reactivex.internal.functions.*, io.reactivex.internal.fuseable.ScalarCallable, io.reactivex.internal.observers.*, io.reactivex.internal.operators.flowable.*, io.reactivex.internal.operators.mixed.*, io.reactivex.internal.operators.observable.*, io.reactivex.internal.util.*, io.reactivex.observables.*, io.reactivex.observers.*, io.reactivex.plugins.RxJavaPlugins, io.reactivex.schedulers.*

The Observable class is the non-backpressured, optionally multi-valued base reactive class that offers factory methods, intermediate operators and the ability to consume synchronous and/or asynchronous reactive dataflows.

Many operators in the class accept ObservableSource(s), the base reactive interface for such non-backpressured flows, which Observable itself implements as well.

The Observable's operators, by default, run with a buffer size of 128 elements (see Flowable#bufferSize()), that can be overridden globally via the system parameter rx2.buffer-size. Most operators, however, have overloads that allow setting their internal buffer size explicitly.

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

The design of this class was derived from the Reactive Streams design and specification by removing any backpressure-related infrastructure and implementation detail, replacing the org.reactivestreams.Subscription with Disposable as the primary means to dispose of a flow.

The Observable follows the protocol


     onSubscribe onNext* (onError | onComplete)?
where the stream can be disposed through the Disposable instance provided to consumers through Observer.onSubscribe.

Unlike the Observable of version 1.x, subscribe(Observer) does not allow external disposal of a subscription and the Observer instance is expected to expose such capability.

Example:


Disposable d = Observable.just("Hello world!")
    .delay(1, TimeUnit.SECONDS)
    .subscribeWith(new DisposableObserver<String>() {
        @Override public void onStart() {
            System.out.println("Start!");
        }
        @Override public void onNext(String t) {
            System.out.println(t);
        }
        @Override public void onError(Throwable t) {
            t.printStackTrace();
        }
        @Override public void onComplete() {
            System.out.println("Done!");
        }
    });

Thread.sleep(500);
// the sequence can now be disposed via dispose()
d.dispose();
See Also
Flowable, io.reactivex.observers.DisposableObserver

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final Single<Boolean>

Returns:

a Single that emits true if all items emitted by the source ObservableSource satisfy the predicate; otherwise, false
all
(Predicate<? super T>
a function that evaluates an item and returns a Boolean
predicate
)

Returns a Single that emits a Boolean that indicates whether all of the items emitted by the source ObservableSource satisfy a condition.

public static <
the common element type
T
>
Observable<T>

Returns:

an Observable that emits the same sequence as whichever of the source ObservableSources first emitted an item or sent a termination notification
amb
(Iterable<? extends ObservableSource<? extends T>>
an Iterable of ObservableSource sources competing to react first. A subscription to each source will occur in the same order as in the Iterable.
sources
)

Mirrors the one ObservableSource in an Iterable of several ObservableSources that first either emits an item or sends a termination notification.

public static <
the common element type
T
>
Observable<T>

Returns:

an Observable that emits the same sequence as whichever of the source ObservableSources first emitted an item or sent a termination notification
ambArray
(ObservableSource<? extends T>...
an array of ObservableSource sources competing to react first. A subscription to each source will occur in the same order as in the array.
sources
)

Mirrors the one ObservableSource in an array of several ObservableSources that first either emits an item or sends a termination notification.

public final Observable<T>

Returns:

an Observable that emits the same sequence as whichever of the source ObservableSources first emitted an item or sent a termination notification
ambWith
(ObservableSource<? extends T>
an ObservableSource competing to react first. A subscription to this provided source will occur after subscribing to the current source.
other
)

Mirrors the ObservableSource (current or provided) that first either emits an item or sends a termination notification.

public final Single<Boolean>

Returns:

a Single that emits a Boolean that indicates whether any item emitted by the source ObservableSource satisfies the predicate
any
(Predicate<? super T>
the condition to test items emitted by the source ObservableSource
predicate
)

Returns a Single that emits true if any item emitted by the source ObservableSource satisfies a specified condition, otherwise false

Note

this always emits false if the source ObservableSource is empty.

public final <
the resulting object type
R
>
R

Returns:

the converted value
as
(ObservableConverter<T, ? extends R>
the function that receives the current Observable instance and returns a value
converter
)

Calls the specified converter function during assembly time and returns its resulting value.

public final T

Returns:

the first item emitted by this Observable
blockingFirst
()

Returns the first item emitted by this Observable, or throws NoSuchElementException if it emits no items.

public final T

Returns:

the first item emitted by this Observable, or the default value if it emits no items
blockingFirst
(T
a default value to return if this Observable emits no items
defaultItem
)

Returns the first item emitted by this Observable, or a default value if it emits no items.

public final void
blockingForEach(Consumer<? super T>
the Consumer to invoke for each item emitted by the Observable
onNext
)

Consumes the upstream Observable in a blocking fashion and invokes the given Consumer with each upstream item on the current thread until the upstream terminates.

public final Iterable<T>

Returns:

an Iterable version of this Observable
blockingIterable
()

Converts this Observable into an Iterable.

public final Iterable<T>

Returns:

an Iterable version of this Observable
blockingIterable
(int
the number of items to prefetch from the current Observable
bufferSize
)

Converts this Observable into an Iterable.

public final T

Returns:

the last item emitted by this Observable
blockingLast
()

Returns the last item emitted by this Observable, or throws NoSuchElementException if this Observable emits no items.

public final T

Returns:

the last item emitted by the Observable, or the default value if it emits no items
blockingLast
(T
a default value to return if this Observable emits no items
defaultItem
)

Returns the last item emitted by this Observable, or a default value if it emits no items.

public final Iterable<T>

Returns:

an Iterable that always returns the latest item emitted by this Observable
blockingLatest
()

Returns an Iterable that returns the latest item emitted by this Observable, waiting if necessary for one to become available.

public final Iterable<T>

Returns:

an Iterable that on each iteration returns the item that this Observable has most recently emitted
blockingMostRecent
(T
the initial value that the Iterable sequence will yield if this Observable has not yet emitted an item
initialValue
)

Returns an Iterable that always returns the item most recently emitted by this Observable.

public final Iterable<T>

Returns:

an Iterable that blocks upon each iteration until this Observable emits a new item, whereupon the Iterable returns that item
blockingNext
()

Returns an Iterable that blocks until this Observable emits another item, then returns that item.

public final T

Returns:

the single item emitted by this Observable
blockingSingle
()

If this Observable completes after emitting a single item, return that item, otherwise throw a NoSuchElementException.

public final T

Returns:

the single item emitted by this Observable, or the default value if it emits no items
blockingSingle
(T
a default value to return if this Observable emits no items
defaultItem
)

If this Observable completes after emitting a single item, return that item; if it emits more than one item, throw an IllegalArgumentException; if it emits no items, return a default value.

public final void
blockingSubscribe()

Runs the source observable to a terminal event, ignoring any values and rethrowing any exception.

public final void
blockingSubscribe(Consumer<? super T>
the callback action for each source value
onNext
)

Subscribes to the source and calls the given callbacks on the current thread.

public final void
blockingSubscribe(Consumer<? super T>
the callback action for each source value
onNext
,
Consumer<? super Throwable>
the callback action for an error event
onError
)

Subscribes to the source and calls the given callbacks on the current thread.

public final void
blockingSubscribe(Consumer<? super T>
the callback action for each source value
onNext
,
Consumer<? super Throwable>
the callback action for an error event
onError
,
Action
the callback action for the completion event.
onComplete
)

Subscribes to the source and calls the given callbacks on the current thread.

public final void
blockingSubscribe(Observer<? super T>
the Observer instance to forward events and calls to in the current thread
observer
)

Subscribes to the source and calls the Observer methods on the current thread.

public final Observable<List<T>>

Returns:

an Observable that emits connected, non-overlapping buffers, each containing at most count items from the source ObservableSource
buffer
(int
the maximum number of items in each buffer before it should be emitted
count
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final Observable<List<T>>

Returns:

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

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final <
the collection subclass type to buffer into
U extends Collection<? super T>
>
Observable<U>

Returns:

an Observable that emits buffers for every skip item from the source ObservableSource and containing at most count items
buffer
(int
the maximum size of each buffer before it should be emitted
count
,
int
how many items emitted by the source ObservableSource should be skipped before starting a new buffer. Note that when skip and count are equal, this is the same operation as buffer(int).
skip
,
Callable<U>
a factory function that returns an instance of the collection subclass to be used and returned as the buffer
bufferSupplier
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final <
the collection subclass type to buffer into
U extends Collection<? super T>
>
Observable<U>

Returns:

an Observable that emits connected, non-overlapping buffers, each containing at most count items from the source ObservableSource
buffer
(int
the maximum number of items in each buffer before it should be emitted
count
,
Callable<U>
a factory function that returns an instance of the collection subclass to be used and returned as the buffer
bufferSupplier
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final Observable<List<T>>

Returns:

an Observable that emits new buffers of items emitted by the source ObservableSource periodically after a fixed timespan has elapsed
buffer
(long
the period of time each buffer collects items before it is emitted
timespan
,
long
the period of time after which a new buffer will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final Observable<List<T>>

Returns:

an Observable that emits new buffers of items emitted by the source ObservableSource periodically after a fixed timespan has elapsed
buffer
(long
the period of time each buffer collects items before it is emitted
timespan
,
long
the period of time after which a new buffer will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
Scheduler
the Scheduler to use when determining the end and start of a buffer
scheduler
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final <
the collection subclass type to buffer into
U extends Collection<? super T>
>
Observable<U>

Returns:

an Observable that emits new buffers of items emitted by the source ObservableSource periodically after a fixed timespan has elapsed
buffer
(long
the period of time each buffer collects items before it is emitted
timespan
,
long
the period of time after which a new buffer will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
Scheduler
the Scheduler to use when determining the end and start of a buffer
scheduler
,
Callable<U>
a factory function that returns an instance of the collection subclass to be used and returned as the buffer
bufferSupplier
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final Observable<List<T>>

Returns:

an Observable that emits connected, non-overlapping buffers of items emitted by the source ObservableSource within a fixed duration
buffer
(long
the period of time each buffer collects items before it is emitted and replaced with a new buffer
timespan
,
TimeUnit
the unit of time that applies to the timespan argument
unit
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final Observable<List<T>>

Returns:

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

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final Observable<List<T>>

Returns:

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

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final <
the collection subclass type to buffer into
U extends Collection<? super T>
>
Observable<U>

Returns:

an Observable that emits connected, non-overlapping buffers of items emitted by the source ObservableSource after a fixed duration or when the buffer reaches maximum capacity (whichever occurs first)
buffer
(long
the period of time each buffer collects items before it is emitted and replaced with a new buffer
timespan
,
TimeUnit
the unit of time which applies to the timespan argument
unit
,
Scheduler
the Scheduler to use when determining the end and start of a buffer
scheduler
,
int
the maximum size of each buffer before it is emitted
count
,
Callable<U>
a factory function that returns an instance of the collection subclass to be used and returned as the buffer
bufferSupplier
,
boolean
if true the time window is restarted when the max capacity of the current buffer is reached
restartTimerOnMaxSize
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final Observable<List<T>>

Returns:

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

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final <
the element type of the buffer-opening ObservableSource
TOpening
,
the element type of the individual buffer-closing ObservableSources
TClosing
>
Observable<List<T>>

Returns:

an Observable that emits buffers, containing items from the source ObservableSource, that are created and closed when the specified ObservableSources emit items
buffer
(ObservableSource<? extends TOpening>
the ObservableSource that, when it emits an item, causes a new buffer to be created
openingIndicator
,
Function<? super TOpening, ? extends ObservableSource<? extends TClosing>>
the Function that is used to produce an ObservableSource for every buffer created. When this ObservableSource emits an item, the associated buffer is emitted.
closingIndicator
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final <
the element type of the buffer-opening ObservableSource
TOpening
,
the element type of the individual buffer-closing ObservableSources
TClosing
,
the collection subclass type to buffer into
U extends Collection<? super T>
>
Observable<U>

Returns:

an Observable that emits buffers, containing items from the source ObservableSource, that are created and closed when the specified ObservableSources emit items
buffer
(ObservableSource<? extends TOpening>
the ObservableSource that, when it emits an item, causes a new buffer to be created
openingIndicator
,
Function<? super TOpening, ? extends ObservableSource<? extends TClosing>>
the Function that is used to produce an ObservableSource for every buffer created. When this ObservableSource emits an item, the associated buffer is emitted.
closingIndicator
,
Callable<U>
a factory function that returns an instance of the collection subclass to be used and returned as the buffer
bufferSupplier
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final <
the boundary value type (ignored)
B
>
Observable<List<T>>

Returns:

an Observable that emits buffered items from the source ObservableSource when the boundary ObservableSource emits an item
buffer
(ObservableSource<B>
the boundary ObservableSource
boundary
)

Returns an Observable that emits non-overlapping buffered items from the source ObservableSource each time the specified boundary ObservableSource emits an item.

public final <
the boundary value type (ignored)
B
>
Observable<List<T>>

Returns:

an Observable that emits buffered items from the source ObservableSource when the boundary ObservableSource emits an item
buffer
(ObservableSource<B>
the boundary ObservableSource
boundary
,
final int
the initial capacity of each buffer chunk
initialCapacity
)

Returns an Observable that emits non-overlapping buffered items from the source ObservableSource each time the specified boundary ObservableSource emits an item.

public final <
the boundary value type (ignored)
B
,
the collection subclass type to buffer into
U extends Collection<? super T>
>
Observable<U>

Returns:

an Observable that emits buffered items from the source ObservableSource when the boundary ObservableSource emits an item
buffer
(ObservableSource<B>
the boundary ObservableSource
boundary
,
Callable<U>
a factory function that returns an instance of the collection subclass to be used and returned as the buffer
bufferSupplier
)

Returns an Observable that emits non-overlapping buffered items from the source ObservableSource each time the specified boundary ObservableSource emits an item.

public final <
the value type of the boundary-providing ObservableSource
B
>
Observable<List<T>>

Returns:

an Observable that emits a connected, non-overlapping buffer of items from the source ObservableSource each time the ObservableSource created with the closingIndicator argument emits an item
buffer
(Callable<? extends ObservableSource<B>>
a Callable that produces an ObservableSource that governs the boundary between buffers. Whenever the supplied ObservableSource emits an item, buffer emits the current buffer and begins to fill a new one
boundarySupplier
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public final <
the value type of the boundary-providing ObservableSource
B
,
the collection subclass type to buffer into
U extends Collection<? super T>
>
Observable<U>

Returns:

an Observable that emits a connected, non-overlapping buffer of items from the source ObservableSource each time the ObservableSource created with the closingIndicator argument emits an item
buffer
(Callable<? extends ObservableSource<B>>
a Callable that produces an ObservableSource that governs the boundary between buffers. Whenever the supplied ObservableSource emits an item, buffer emits the current buffer and begins to fill a new one
boundarySupplier
,
Callable<U>
a factory function that returns an instance of the collection subclass to be used and returned as the buffer
bufferSupplier
)

Returns an Observable that emits buffers of items it collects from the source ObservableSource.

public static int

Returns:

the default 'island' size or capacity-increment hint
bufferSize
()

Returns the default 'island' size or capacity-increment hint for unbounded buffers.

public final Observable<T>

Returns:

an Observable that, when first subscribed to, caches all of its items and notifications for the benefit of subsequent subscribers
cache
()

Returns an Observable that subscribes to this ObservableSource lazily, caches all of its events and replays them, in the same order as received, to all the downstream subscribers.

public final Observable<T>

Returns:

an Observable that, when first subscribed to, caches all of its items and notifications for the benefit of subsequent subscribers
cacheWithInitialCapacity
(int
hint for number of items to cache (for optimizing underlying data structure)
initialCapacity
)

Returns an Observable that subscribes to this ObservableSource lazily, caches all of its events and replays them, in the same order as received, to all the downstream subscribers.

public final <
the output value type cast to
U
>
Observable<U>

Returns:

an Observable that emits each item from the source ObservableSource after converting it to the specified type
cast
(final Class<U>
the target class type that cast will cast the items emitted by the source ObservableSource into before emitting them from the resulting ObservableSource
clazz
)

Returns an Observable that emits the items emitted by the source ObservableSource, converted to the specified type.

public final <
the accumulator and output type
U
>
Single<U>

Returns:

a Single that emits the result of collecting the values emitted by the source ObservableSource into a single mutable data structure
collect
(Callable<? extends U>
the mutable data structure that will collect the items
initialValueSupplier
,
BiConsumer<? super U, ? super T>
a function that accepts the state and an emitted item, and modifies state accordingly
collector
)

Collects items emitted by the finite source ObservableSource into a single mutable data structure and returns a Single that emits this structure.

public final <
the accumulator and output type
U
>
Single<U>

Returns:

a Single that emits the result of collecting the values emitted by the source ObservableSource into a single mutable data structure
collectInto
(final U
the mutable data structure that will collect the items
initialValue
,
BiConsumer<? super U, ? super T>
a function that accepts the state and an emitted item, and modifies state accordingly
collector
)

Collects items emitted by the finite source ObservableSource into a single mutable data structure and returns a Single that emits this structure.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
,
int
the internal buffer size and prefetch amount applied to every source Observable
bufferSize
,
ObservableSource<? extends T>...
the collection of source ObservableSources
sources
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(Iterable<? extends ObservableSource<? extends T>>
the collection of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(Iterable<? extends ObservableSource<? extends T>>
the collection of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
,
int
the internal buffer size and prefetch amount applied to every source Observable
bufferSize
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T>[]
the collection of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T>[]
the collection of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
,
int
the internal buffer size and prefetch amount applied to every source Observable
bufferSize
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the element type of the first source
T1
,
the element type of the second source
T2
,
the combined output type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
the second source ObservableSource
source2
,
BiFunction<? super T1, ? super T2, ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines two source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from either of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the element type of the first source
T1
,
the element type of the second source
T2
,
the element type of the third source
T3
,
the combined output type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
the second source ObservableSource
source2
,
ObservableSource<? extends T3>
the third source ObservableSource
source3
,
Function3<? super T1, ? super T2, ? super T3, ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines three source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the element type of the first source
T1
,
the element type of the second source
T2
,
the element type of the third source
T3
,
the element type of the fourth source
T4
,
the combined output type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
the second source ObservableSource
source2
,
ObservableSource<? extends T3>
the third source ObservableSource
source3
,
ObservableSource<? extends T4>
the fourth source ObservableSource
source4
,
Function4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines four source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the element type of the first source
T1
,
the element type of the second source
T2
,
the element type of the third source
T3
,
the element type of the fourth source
T4
,
the element type of the fifth source
T5
,
the combined output type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
the second source ObservableSource
source2
,
ObservableSource<? extends T3>
the third source ObservableSource
source3
,
ObservableSource<? extends T4>
the fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
the fifth source ObservableSource
source5
,
Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines five source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the element type of the first source
T1
,
the element type of the second source
T2
,
the element type of the third source
T3
,
the element type of the fourth source
T4
,
the element type of the fifth source
T5
,
the element type of the sixth source
T6
,
the combined output type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
the second source ObservableSource
source2
,
ObservableSource<? extends T3>
the third source ObservableSource
source3
,
ObservableSource<? extends T4>
the fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
the fifth source ObservableSource
source5
,
ObservableSource<? extends T6>
the sixth source ObservableSource
source6
,
Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines six source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the element type of the first source
T1
,
the element type of the second source
T2
,
the element type of the third source
T3
,
the element type of the fourth source
T4
,
the element type of the fifth source
T5
,
the element type of the sixth source
T6
,
the element type of the seventh source
T7
,
the combined output type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
the second source ObservableSource
source2
,
ObservableSource<? extends T3>
the third source ObservableSource
source3
,
ObservableSource<? extends T4>
the fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
the fifth source ObservableSource
source5
,
ObservableSource<? extends T6>
the sixth source ObservableSource
source6
,
ObservableSource<? extends T7>
the seventh source ObservableSource
source7
,
Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines seven source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the element type of the first source
T1
,
the element type of the second source
T2
,
the element type of the third source
T3
,
the element type of the fourth source
T4
,
the element type of the fifth source
T5
,
the element type of the sixth source
T6
,
the element type of the seventh source
T7
,
the element type of the eighth source
T8
,
the combined output type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
the second source ObservableSource
source2
,
ObservableSource<? extends T3>
the third source ObservableSource
source3
,
ObservableSource<? extends T4>
the fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
the fifth source ObservableSource
source5
,
ObservableSource<? extends T6>
the sixth source ObservableSource
source6
,
ObservableSource<? extends T7>
the seventh source ObservableSource
source7
,
ObservableSource<? extends T8>
the eighth source ObservableSource
source8
,
Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines eight source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the element type of the first source
T1
,
the element type of the second source
T2
,
the element type of the third source
T3
,
the element type of the fourth source
T4
,
the element type of the fifth source
T5
,
the element type of the sixth source
T6
,
the element type of the seventh source
T7
,
the element type of the eighth source
T8
,
the element type of the ninth source
T9
,
the combined output type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatest
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
the second source ObservableSource
source2
,
ObservableSource<? extends T3>
the third source ObservableSource
source3
,
ObservableSource<? extends T4>
the fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
the fifth source ObservableSource
source5
,
ObservableSource<? extends T6>
the sixth source ObservableSource
source6
,
ObservableSource<? extends T7>
the seventh source ObservableSource
source7
,
ObservableSource<? extends T8>
the eighth source ObservableSource
source8
,
ObservableSource<? extends T9>
the ninth source ObservableSource
source9
,
Function9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines nine source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatestDelayError
(ObservableSource<? extends T>[]
the collection of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatestDelayError
(Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
,
int
the internal buffer size and prefetch amount applied to every source Observable
bufferSize
,
ObservableSource<? extends T>...
the collection of source ObservableSources
sources
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function and delays any error from the sources until all source ObservableSources terminate.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatestDelayError
(ObservableSource<? extends T>[]
the collection of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
,
int
the internal buffer size and prefetch amount applied to every source Observable
bufferSize
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function and delays any error from the sources until all source ObservableSources terminate.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatestDelayError
(Iterable<? extends ObservableSource<? extends T>>
the collection of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function and delays any error from the sources until all source ObservableSources terminate.

public static <
the common base type of source values
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items that are the result of combining the items emitted by the source ObservableSources by means of the given aggregation function
combineLatestDelayError
(Iterable<? extends ObservableSource<? extends T>>
the collection of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
the aggregation function used to combine the items emitted by the source ObservableSources
combiner
,
int
the internal buffer size and prefetch amount applied to every source Observable
bufferSize
)

Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of the source ObservableSources each time an item is received from any of the source ObservableSources, where this aggregation is defined by a specified function and delays any error from the sources until all source ObservableSources terminate.

public final <
the value type of the output ObservableSource
R
>
Observable<R>

Returns:

the source ObservableSource, transformed by the transformer function
compose
(ObservableTransformer<? super T, ? extends R>
implements the function that transforms the source ObservableSource
composer
)

Transform an ObservableSource by applying a particular Transformer function to it.

public static <
the common value type of the sources
T
>
Observable<T>

Returns:

the new Observable instance
concat
(Iterable<? extends ObservableSource<? extends T>>
the Iterable sequence of ObservableSources
sources
)

Concatenates elements of each ObservableSource provided via an Iterable sequence into a single sequence of elements without interleaving them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items all of the items emitted by the ObservableSources emitted by ObservableSources, one after the other, without interleaving them
concat
(ObservableSource<? extends ObservableSource<? extends T>>
an ObservableSource that emits ObservableSources
sources
)

Returns an Observable that emits the items emitted by each of the ObservableSources emitted by the source ObservableSource, one after the other, without interleaving them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items all of the items emitted by the ObservableSources emitted by ObservableSources, one after the other, without interleaving them
concat
(ObservableSource<? extends ObservableSource<? extends T>>
an ObservableSource that emits ObservableSources
sources
,
int
the number of ObservableSources to prefetch from the sources sequence.
prefetch
)

Returns an Observable that emits the items emitted by each of the ObservableSources emitted by the source ObservableSource, one after the other, without interleaving them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items emitted by the two source ObservableSources, one after the other, without interleaving them
concat
(ObservableSource<? extends T>
an ObservableSource to be concatenated
source1
,
ObservableSource<? extends T>
an ObservableSource to be concatenated
source2
)

Returns an Observable that emits the items emitted by two ObservableSources, one after the other, without interleaving them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items emitted by the three source ObservableSources, one after the other, without interleaving them
concat
(ObservableSource<? extends T>
an ObservableSource to be concatenated
source1
,
ObservableSource<? extends T>
an ObservableSource to be concatenated
source2
,
ObservableSource<? extends T>
an ObservableSource to be concatenated
source3
)

Returns an Observable that emits the items emitted by three ObservableSources, one after the other, without interleaving them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items emitted by the four source ObservableSources, one after the other, without interleaving them
concat
(ObservableSource<? extends T>
an ObservableSource to be concatenated
source1
,
ObservableSource<? extends T>
an ObservableSource to be concatenated
source2
,
ObservableSource<? extends T>
an ObservableSource to be concatenated
source3
,
ObservableSource<? extends T>
an ObservableSource to be concatenated
source4
)

Returns an Observable that emits the items emitted by four ObservableSources, one after the other, without interleaving them.

public static <
the common base value type
T
>
Observable<T>

Returns:

the new Observable instance
concatArray
(ObservableSource<? extends T>...
the array of sources
sources
)

Concatenates a variable number of ObservableSource sources.

public static <
the common base value type
T
>
Observable<T>

Returns:

the new Observable instance
concatArrayDelayError
(ObservableSource<? extends T>...
the array of sources
sources
)

Concatenates a variable number of ObservableSource sources and delays errors from any of them till all terminate.

public static <
the value type
T
>
Observable<T>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatArrayEager
(ObservableSource<? extends T>...
an array of ObservableSources that need to be eagerly concatenated
sources
)

Concatenates an array of ObservableSources eagerly into a single stream of values.

public static <
the value type
T
>
Observable<T>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatArrayEager
(int
the maximum number of concurrent subscriptions at a time, Integer.MAX_VALUE is interpreted as indication to subscribe to all sources at once
maxConcurrency
,
int
the number of elements to prefetch from each ObservableSource source
prefetch
,
ObservableSource<? extends T>...
an array of ObservableSources that need to be eagerly concatenated
sources
)

Concatenates an array of ObservableSources eagerly into a single stream of values.

public static <
the value type
T
>
Observable<T>

Returns:

the new Observable instance with the specified concatenation behavior
concatArrayEagerDelayError
(ObservableSource<? extends T>...
an array of ObservableSources that need to be eagerly concatenated
sources
)

Concatenates an array of ObservableSources eagerly into a single stream of values and delaying any errors until all sources terminate.

public static <
the value type
T
>
Observable<T>

Returns:

the new Observable instance with the specified concatenation behavior
concatArrayEagerDelayError
(int
the maximum number of concurrent subscriptions at a time, Integer.MAX_VALUE is interpreted as indication to subscribe to all sources at once
maxConcurrency
,
int
the number of elements to prefetch from each ObservableSource source
prefetch
,
ObservableSource<? extends T>...
an array of ObservableSources that need to be eagerly concatenated
sources
)

Concatenates an array of ObservableSources eagerly into a single stream of values and delaying any errors until all sources terminate.

public static <
the common element base type
T
>
Observable<T>

Returns:

the new ObservableSource with the concatenating behavior
concatDelayError
(Iterable<? extends ObservableSource<? extends T>>
the Iterable sequence of ObservableSources
sources
)

Concatenates the Iterable sequence of ObservableSources into a single sequence by subscribing to each ObservableSource, one after the other, one at a time and delays any errors till the all inner ObservableSources terminate.

public static <
the common element base type
T
>
Observable<T>

Returns:

the new ObservableSource with the concatenating behavior
concatDelayError
(ObservableSource<? extends ObservableSource<? extends T>>
the ObservableSource sequence of ObservableSources
sources
)

Concatenates the ObservableSource sequence of ObservableSources into a single sequence by subscribing to each inner ObservableSource, one after the other, one at a time and delays any errors till the all inner and the outer ObservableSources terminate.

public static <
the common element base type
T
>
Observable<T>

Returns:

the new ObservableSource with the concatenating behavior
concatDelayError
(ObservableSource<? extends ObservableSource<? extends T>>
the ObservableSource sequence of ObservableSources
sources
,
int
the number of elements to prefetch from the outer ObservableSource
prefetch
,
boolean
if true exceptions from the outer and all inner ObservableSources are delayed to the end if false, exception from the outer ObservableSource is delayed till the current ObservableSource terminates
tillTheEnd
)

Concatenates the ObservableSource sequence of ObservableSources into a single sequence by subscribing to each inner ObservableSource, one after the other, one at a time and delays any errors till the all inner and the outer ObservableSources terminate.

public static <
the value type
T
>
Observable<T>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatEager
(ObservableSource<? extends ObservableSource<? extends T>>
a sequence of ObservableSources that need to be eagerly concatenated
sources
)

Concatenates an ObservableSource sequence of ObservableSources eagerly into a single stream of values.

public static <
the value type
T
>
Observable<T>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatEager
(ObservableSource<? extends ObservableSource<? extends T>>
a sequence of ObservableSources that need to be eagerly concatenated
sources
,
int
the maximum number of concurrently running inner ObservableSources; Integer.MAX_VALUE is interpreted as all inner ObservableSources can be active at the same time
maxConcurrency
,
int
the number of elements to prefetch from each inner ObservableSource source
prefetch
)

Concatenates an ObservableSource sequence of ObservableSources eagerly into a single stream of values.

public static <
the value type
T
>
Observable<T>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatEager
(Iterable<? extends ObservableSource<? extends T>>
a sequence of ObservableSources that need to be eagerly concatenated
sources
)

Concatenates a sequence of ObservableSources eagerly into a single stream of values.

public static <
the value type
T
>
Observable<T>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatEager
(Iterable<? extends ObservableSource<? extends T>>
a sequence of ObservableSources that need to be eagerly concatenated
sources
,
int
the maximum number of concurrently running inner ObservableSources; Integer.MAX_VALUE is interpreted as all inner ObservableSources can be active at the same time
maxConcurrency
,
int
the number of elements to prefetch from each inner ObservableSource source
prefetch
)

Concatenates a sequence of ObservableSources eagerly into a single stream of values.

public final <
the type of the inner ObservableSource sources and thus the output type
R
>
Observable<R>

Returns:

an Observable that emits the result of applying the transformation function to each item emitted by the source ObservableSource and concatenating the ObservableSources obtained from this transformation
concatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
)

Returns a new Observable that emits items resulting from applying a function that you supply to each item emitted by the source ObservableSource, where that function returns an ObservableSource, and then emitting the items that result from concatenating those resulting ObservableSources.

public final <
the type of the inner ObservableSource sources and thus the output type
R
>
Observable<R>

Returns:

an Observable that emits the result of applying the transformation function to each item emitted by the source ObservableSource and concatenating the ObservableSources obtained from this transformation
concatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
,
int
the number of elements to prefetch from the current Observable
prefetch
)

Returns a new Observable that emits items resulting from applying a function that you supply to each item emitted by the source ObservableSource, where that function returns an ObservableSource, and then emitting the items that result from concatenating those resulting ObservableSources.

public final Completable

Returns:

a Completable that signals onComplete when the upstream and all CompletableSources complete
concatMapCompletable
(Function<? super T, ? extends CompletableSource>
a function that, when applied to an item emitted by the source ObservableSource, returns a CompletableSource
mapper
)

Maps each element of the upstream Observable into CompletableSources, subscribes to them one at a time in order and waits until the upstream and all CompletableSources complete.

public final Completable

Returns:

a Completable that signals onComplete when the upstream and all CompletableSources complete
concatMapCompletable
(Function<? super T, ? extends CompletableSource>
a function that, when applied to an item emitted by the source ObservableSource, returns a CompletableSource
mapper
,
int
the number of upstream items expected to be buffered until the current CompletableSource, mapped from the current item, completes.
capacityHint
)

Maps each element of the upstream Observable into CompletableSources, subscribes to them one at a time in order and waits until the upstream and all CompletableSources complete.

public final Completable

Returns:

a new Completable instance
concatMapCompletableDelayError
(Function<? super T, ? extends CompletableSource>
the function called with the upstream item and should return a CompletableSource to become the next source to be subscribed to
mapper
)

Maps the upstream items into CompletableSources and subscribes to them one after the other terminates, delaying all errors till both this Observable and all inner CompletableSources terminate.

public final Completable

Returns:

a new Completable instance
concatMapCompletableDelayError
(Function<? super T, ? extends CompletableSource>
the function called with the upstream item and should return a CompletableSource to become the next source to be subscribed to
mapper
,
boolean
If true, errors from this Observable or any of the inner CompletableSources are delayed until all of them terminate. If false, an error from this Observable is delayed until the current inner CompletableSource terminates and only then is it emitted to the downstream.
tillTheEnd
)

Maps the upstream items into CompletableSources and subscribes to them one after the other terminates, optionally delaying all errors till both this Observable and all inner CompletableSources terminate.

public final Completable

Returns:

a new Completable instance
concatMapCompletableDelayError
(Function<? super T, ? extends CompletableSource>
the function called with the upstream item and should return a CompletableSource to become the next source to be subscribed to
mapper
,
boolean
If true, errors from this Observable or any of the inner CompletableSources are delayed until all of them terminate. If false, an error from this Observable is delayed until the current inner CompletableSource terminates and only then is it emitted to the downstream.
tillTheEnd
,
int
The number of upstream items to prefetch so that fresh items are ready to be mapped when a previous CompletableSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned into CompletableSources.
prefetch
)

Maps the upstream items into CompletableSources and subscribes to them one after the other terminates, optionally delaying all errors till both this Observable and all inner CompletableSources terminate.

public final <
the result value type
R
>
Observable<R>

Returns:

the new ObservableSource instance with the concatenation behavior
concatMapDelayError
(Function<? super T, ? extends ObservableSource<? extends R>>
the function that maps the items of this ObservableSource into the inner ObservableSources.
mapper
)

Maps each of the items into an ObservableSource, subscribes to them one after the other, one at a time and emits their values in order while delaying any error from either this or any of the inner ObservableSources till all of them terminate.

public final <
the result value type
R
>
Observable<R>

Returns:

the new ObservableSource instance with the concatenation behavior
concatMapDelayError
(Function<? super T, ? extends ObservableSource<? extends R>>
the function that maps the items of this ObservableSource into the inner ObservableSources.
mapper
,
int
the number of elements to prefetch from the current Observable
prefetch
,
boolean
if true, all errors from the outer and inner ObservableSource sources are delayed until the end, if false, an error from the main source is signalled when the current ObservableSource source terminates
tillTheEnd
)

Maps each of the items into an ObservableSource, subscribes to them one after the other, one at a time and emits their values in order while delaying any error from either this or any of the inner ObservableSources till all of them terminate.

public final <
the value type
R
>
Observable<R>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatMapEager
(Function<? super T, ? extends ObservableSource<? extends R>>
the function that maps a sequence of values into a sequence of ObservableSources that will be eagerly concatenated
mapper
)

Maps a sequence of values into ObservableSources and concatenates these ObservableSources eagerly into a single ObservableSource.

public final <
the value type
R
>
Observable<R>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatMapEager
(Function<? super T, ? extends ObservableSource<? extends R>>
the function that maps a sequence of values into a sequence of ObservableSources that will be eagerly concatenated
mapper
,
int
the maximum number of concurrent subscribed ObservableSources
maxConcurrency
,
int
hints about the number of expected values from each inner ObservableSource, must be positive
prefetch
)

Maps a sequence of values into ObservableSources and concatenates these ObservableSources eagerly into a single ObservableSource.

public final <
the value type
R
>
Observable<R>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatMapEagerDelayError
(Function<? super T, ? extends ObservableSource<? extends R>>
the function that maps a sequence of values into a sequence of ObservableSources that will be eagerly concatenated
mapper
,
boolean
if true, all errors from the outer and inner ObservableSource sources are delayed until the end, if false, an error from the main source is signalled when the current ObservableSource source terminates
tillTheEnd
)

Maps a sequence of values into ObservableSources and concatenates these ObservableSources eagerly into a single ObservableSource.

public final <
the value type
R
>
Observable<R>

Returns:

the new ObservableSource instance with the specified concatenation behavior
concatMapEagerDelayError
(Function<? super T, ? extends ObservableSource<? extends R>>
the function that maps a sequence of values into a sequence of ObservableSources that will be eagerly concatenated
mapper
,
int
the maximum number of concurrent subscribed ObservableSources
maxConcurrency
,
int
the number of elements to prefetch from each source ObservableSource
prefetch
,
boolean
if true, exceptions from the current Observable and all the inner ObservableSources are delayed until all of them terminate, if false, exception from the current Observable is delayed until the currently running ObservableSource terminates
tillTheEnd
)

Maps a sequence of values into ObservableSources and concatenates these ObservableSources eagerly into a single ObservableSource.

public final <
the type of item emitted by the resulting ObservableSource
U
>
Observable<U>

Returns:

an Observable that emits the results of concatenating the items emitted by the source ObservableSource with the values in the Iterables corresponding to those items, as generated by collectionSelector
concatMapIterable
(final Function<? super T, ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the source ObservableSource
mapper
)

Returns an Observable that concatenate each item emitted by the source ObservableSource with the values in an Iterable corresponding to that item that is generated by a selector.

public final <
the type of item emitted by the resulting ObservableSource
U
>
Observable<U>

Returns:

an Observable that emits the results of concatenating the items emitted by the source ObservableSource with the values in the Iterables corresponding to those items, as generated by collectionSelector
concatMapIterable
(final Function<? super T, ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the source ObservableSource
mapper
,
int
the number of elements to prefetch from the current Observable
prefetch
)

Returns an Observable that concatenate each item emitted by the source ObservableSource with the values in an Iterable corresponding to that item that is generated by a selector.

public final <
the result type of the inner MaybeSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapMaybe
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the upstream item and should return a MaybeSource to become the next source to be subscribed to
mapper
)

Maps the upstream items into MaybeSources and subscribes to them one after the other succeeds or completes, emits their success value if available or terminates immediately if either this Observable or the current inner MaybeSource fail.

public final <
the result type of the inner MaybeSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapMaybe
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the upstream item and should return a MaybeSource to become the next source to be subscribed to
mapper
,
int
The number of upstream items to prefetch so that fresh items are ready to be mapped when a previous MaybeSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned into MaybeSources.
prefetch
)

Maps the upstream items into MaybeSources and subscribes to them one after the other succeeds or completes, emits their success value if available or terminates immediately if either this Observable or the current inner MaybeSource fail.

public final <
the result type of the inner MaybeSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapMaybeDelayError
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the upstream item and should return a MaybeSource to become the next source to be subscribed to
mapper
)

Maps the upstream items into MaybeSources and subscribes to them one after the other terminates, emits their success value if available and delaying all errors till both this Observable and all inner MaybeSources terminate.

public final <
the result type of the inner MaybeSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapMaybeDelayError
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the upstream item and should return a MaybeSource to become the next source to be subscribed to
mapper
,
boolean
If true, errors from this Observable or any of the inner MaybeSources are delayed until all of them terminate. If false, an error from this Observable is delayed until the current inner MaybeSource terminates and only then is it emitted to the downstream.
tillTheEnd
)

Maps the upstream items into MaybeSources and subscribes to them one after the other terminates, emits their success value if available and optionally delaying all errors till both this Observable and all inner MaybeSources terminate.

public final <
the result type of the inner MaybeSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapMaybeDelayError
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the upstream item and should return a MaybeSource to become the next source to be subscribed to
mapper
,
boolean
If true, errors from this Observable or any of the inner MaybeSources are delayed until all of them terminate. If false, an error from this Observable is delayed until the current inner MaybeSource terminates and only then is it emitted to the downstream.
tillTheEnd
,
int
The number of upstream items to prefetch so that fresh items are ready to be mapped when a previous MaybeSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned into MaybeSources.
prefetch
)

Maps the upstream items into MaybeSources and subscribes to them one after the other terminates, emits their success value if available and optionally delaying all errors till both this Observable and all inner MaybeSources terminate.

public final <
the result type of the inner SingleSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapSingle
(Function<? super T, ? extends SingleSource<? extends R>>
the function called with the upstream item and should return a SingleSource to become the next source to be subscribed to
mapper
)

Maps the upstream items into SingleSources and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either this Observable or the current inner SingleSource fail.

public final <
the result type of the inner SingleSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapSingle
(Function<? super T, ? extends SingleSource<? extends R>>
the function called with the upstream item and should return a SingleSource to become the next source to be subscribed to
mapper
,
int
The number of upstream items to prefetch so that fresh items are ready to be mapped when a previous SingleSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned into SingleSources.
prefetch
)

Maps the upstream items into SingleSources and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either this Observable or the current inner SingleSource fail.

public final <
the result type of the inner SingleSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapSingleDelayError
(Function<? super T, ? extends SingleSource<? extends R>>
the function called with the upstream item and should return a SingleSource to become the next source to be subscribed to
mapper
)

Maps the upstream items into SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and delays all errors till both this Observable and all inner SingleSources terminate.

public final <
the result type of the inner SingleSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapSingleDelayError
(Function<? super T, ? extends SingleSource<? extends R>>
the function called with the upstream item and should return a SingleSource to become the next source to be subscribed to
mapper
,
boolean
If true, errors from this Observable or any of the inner SingleSources are delayed until all of them terminate. If false, an error from this Observable is delayed until the current inner SingleSource terminates and only then is it emitted to the downstream.
tillTheEnd
)

Maps the upstream items into SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and optionally delays all errors till both this Observable and all inner SingleSources terminate.

public final <
the result type of the inner SingleSources
R
>
Observable<R>

Returns:

a new Observable instance
concatMapSingleDelayError
(Function<? super T, ? extends SingleSource<? extends R>>
the function called with the upstream item and should return a SingleSource to become the next source to be subscribed to
mapper
,
boolean
If true, errors from this Observable or any of the inner SingleSources are delayed until all of them terminate. If false, an error from this Observable is delayed until the current inner SingleSource terminates and only then is it emitted to the downstream.
tillTheEnd
,
int
The number of upstream items to prefetch so that fresh items are ready to be mapped when a previous SingleSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned into SingleSources.
prefetch
)

Maps the upstream items into SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and optionally delays errors till both this Observable and all inner SingleSources terminate.

public final Observable<T>

Returns:

an Observable that emits items emitted by the two source ObservableSources, one after the other, without interleaving them
concatWith
(ObservableSource<? extends T>
an ObservableSource to be concatenated after the current
other
)

Returns an Observable that emits the items emitted from the current ObservableSource, then the next, one after the other, without interleaving them.

public final Observable<T>

Returns:

the new Observable instance
concatWith
(SingleSource<? extends T>
the SingleSource whose signal should be emitted after this Observable completes normally.
other
)

Returns an Observable that emits the items from this Observable followed by the success item or error event of the other SingleSource.

public final Observable<T>

Returns:

the new Observable instance
concatWith
(MaybeSource<? extends T>
the MaybeSource whose signal should be emitted after this Observable completes normally.
other
)

Returns an Observable that emits the items from this Observable followed by the success item or terminal events of the other MaybeSource.

public final Observable<T>

Returns:

the new Observable instance
concatWith
(CompletableSource
the CompletableSource to subscribe to once the current Observable completes normally
other
)

Returns an Observable that emits items from this Observable and when it completes normally, the other CompletableSource is subscribed to and the returned Observable emits its terminal events.

public final Single<Boolean>

Returns:

a Single that emits true if the specified item is emitted by the source ObservableSource, or false if the source ObservableSource completes without emitting that item
contains
(final Object
the item to search for in the emissions from the source ObservableSource
element
)

Returns a Single that emits a Boolean that indicates whether the source ObservableSource emitted a specified item.

public final Single<Long>

Returns:

a Single that emits a single item: the number of items emitted by the source ObservableSource as a 64-bit Long item
count
()

Returns a Single that counts the total number of items emitted by the source ObservableSource and emits this count as a 64-bit Long.

public static <
the element type
T
>
Observable<T>

Returns:

the new Observable instance
create
(ObservableOnSubscribe<T>
the emitter that is called when an Observer subscribes to the returned Observable
source
)

Provides an API (via a cold Observable) that bridges the reactive world with the callback-style world.

public final <
the debounce value type (ignored)
U
>
Observable<T>

Returns:

an Observable that omits items emitted by the source ObservableSource that are followed by another item within a computed debounce duration
debounce
(Function<? super T, ? extends ObservableSource<U>>
function to retrieve a sequence that indicates the throttle duration for each item
debounceSelector
)

Returns an Observable that mirrors the source ObservableSource, except that it drops items emitted by the source ObservableSource that are followed by another item within a computed debounce duration.

public final Observable<T>

Returns:

an Observable that filters out items from the source ObservableSource that are too quickly followed by newer items
debounce
(long
the length of the window of time that must pass after the emission of an item from the source ObservableSource in which that ObservableSource emits no items in order for the item to be emitted by the resulting ObservableSource
timeout
,
TimeUnit
the unit of time for the specified timeout
unit
)

Returns an Observable that mirrors the source ObservableSource, except that it drops items emitted by the source ObservableSource that are followed by newer items before a timeout value expires.

public final Observable<T>

Returns:

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

Returns an Observable that mirrors the source ObservableSource, except that it drops items emitted by the source ObservableSource that are followed by newer items before a timeout value expires on a specified Scheduler.

public final Observable<T>

Returns:

an Observable that emits either the specified default item if the source ObservableSource emits no items, or the items emitted by the source ObservableSource
defaultIfEmpty
(T
the item to emit if the source ObservableSource emits no items
defaultItem
)

Returns an Observable that emits the items emitted by the source ObservableSource or a specified default item if the source ObservableSource is empty.

public static <
the type of the items emitted by the ObservableSource
T
>
Observable<T>

Returns:

an Observable whose Observers' subscriptions trigger an invocation of the given ObservableSource factory function
defer
(Callable<? extends ObservableSource<? extends T>>
the ObservableSource factory function to invoke for each Observer that subscribes to the resulting ObservableSource
supplier
)

Returns an Observable that calls an ObservableSource factory to create an ObservableSource for each new Observer that subscribes.

public final <
the item delay value type (ignored)
U
>
Observable<T>

Returns:

an Observable that delays the emissions of the source ObservableSource via another ObservableSource on a per-item basis
delay
(final Function<? super T, ? extends ObservableSource<U>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource, which is then used to delay the emission of that item by the resulting ObservableSource until the ObservableSource returned from itemDelay emits an item
itemDelay
)

Returns an Observable that delays the emissions of the source ObservableSource via another ObservableSource on a per-item basis.

public final Observable<T>

Returns:

the source ObservableSource shifted in time by the specified delay
delay
(long
the delay to shift the source by
delay
,
TimeUnit
the TimeUnit in which period is defined
unit
)

Returns an Observable that emits the items emitted by the source ObservableSource shifted forward in time by a specified delay.

public final Observable<T>

Returns:

the source ObservableSource shifted in time by the specified delay
delay
(long
the delay to shift the source by
delay
,
TimeUnit
the TimeUnit in which period is defined
unit
,
boolean
if true, the upstream exception is signalled with the given delay, after all preceding normal elements, if false, the upstream exception is signalled immediately
delayError
)

Returns an Observable that emits the items emitted by the source ObservableSource shifted forward in time by a specified delay.

public final Observable<T>

Returns:

the source ObservableSource shifted in time by the specified delay
delay
(long
the delay to shift the source by
delay
,
TimeUnit
the time unit of delay
unit
,
Scheduler
the Scheduler to use for delaying
scheduler
)

Returns an Observable that emits the items emitted by the source ObservableSource shifted forward in time by a specified delay.

public final Observable<T>

Returns:

the source ObservableSource shifted in time by the specified delay
delay
(long
the delay to shift the source by
delay
,
TimeUnit
the time unit of delay
unit
,
Scheduler
the Scheduler to use for delaying
scheduler
,
boolean
if true, the upstream exception is signalled with the given delay, after all preceding normal elements, if false, the upstream exception is signalled immediately
delayError
)

Returns an Observable that emits the items emitted by the source ObservableSource shifted forward in time by a specified delay.

public final <
the subscription delay value type (ignored)
U
,
the item delay value type (ignored)
V
>
Observable<T>

Returns:

an Observable that delays the subscription and emissions of the source ObservableSource via another ObservableSource on a per-item basis
delay
(ObservableSource<U>
a function that returns an ObservableSource that triggers the subscription to the source ObservableSource once it emits any item
subscriptionDelay
,
Function<? super T, ? extends ObservableSource<V>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource, which is then used to delay the emission of that item by the resulting ObservableSource until the ObservableSource returned from itemDelay emits an item
itemDelay
)

Returns an Observable that delays the subscription to and emissions from the source ObservableSource via another ObservableSource on a per-item basis.

public final <
the value type of the other Observable, irrelevant
U
>
Observable<T>

Returns:

an Observable that delays the subscription to this Observable until the other Observable emits an element or completes normally.
delaySubscription
(ObservableSource<U>
the other Observable that should trigger the subscription to this Observable.
other
)

Returns an Observable that delays the subscription to this Observable until the other Observable emits an element or completes normally.

public final Observable<T>

Returns:

an Observable that delays the subscription to the source ObservableSource by the given amount
delaySubscription
(long
the time to delay the subscription
delay
,
TimeUnit
the time unit of delay
unit
)

Returns an Observable that delays the subscription to the source ObservableSource by a given amount of time.

public final Observable<T>

Returns:

an Observable that delays the subscription to the source ObservableSource by a given amount, waiting and subscribing on the given Scheduler
delaySubscription
(long
the time to delay the subscription
delay
,
TimeUnit
the time unit of delay
unit
,
Scheduler
the Scheduler on which the waiting and subscription will happen
scheduler
)

Returns an Observable that delays the subscription to the source ObservableSource by a given amount of time, both waiting and subscribing on a given Scheduler.

public final <
the output value type
T2
>
Observable<T2>

Returns:

an Observable that emits the items and notifications embedded in the Notification objects emitted by the source ObservableSource
dematerialize
()

Deprecated in 2.2.4; inherently type-unsafe as it overrides the output generic type. Use dematerialize(Function) instead.
Returns an Observable that reverses the effect of materialize by transforming the Notification objects emitted by the source ObservableSource into the items or notifications they represent.
public final <
the output value type
R
>
Observable<R>

Returns:

an Observable that emits the items and notifications embedded in the Notification objects selected from the items emitted by the source ObservableSource
dematerialize
(Function<? super T, Notification<R>>
function that returns the upstream item and should return a Notification to signal the corresponding Observer event to the downstream.
selector
)

Returns an Observable that reverses the effect of materialize by transforming the Notification objects extracted from the source items via a selector function into their respective Observer signal types.

public final Observable<T>

Returns:

an Observable that emits only those items emitted by the source ObservableSource that are distinct from each other
distinct
()

Returns an Observable that emits all items emitted by the source ObservableSource that are distinct based on Object#equals(Object) comparison.

public final <
the key type
K
>
Observable<T>

Returns:

an Observable that emits those items emitted by the source ObservableSource that have distinct keys
distinct
(Function<? super T, K>
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
keySelector
)

Returns an Observable that emits all items emitted by the source ObservableSource that are distinct according to a key selector function and based on Object#equals(Object) comparison of the objects returned by the key selector function.

public final <
the key type
K
>
Observable<T>

Returns:

an Observable that emits those items emitted by the source ObservableSource that have distinct keys
distinct
(Function<? super T, K>
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
keySelector
,
Callable<? extends Collection<? super K>>
function called for each individual Observer to return a Collection subtype for holding the extracted keys and whose add() method's return indicates uniqueness.
collectionSupplier
)

Returns an Observable that emits all items emitted by the source ObservableSource that are distinct according to a key selector function and based on Object#equals(Object) comparison of the objects returned by the key selector function.

public final Observable<T>

Returns:

an Observable that emits those items from the source ObservableSource that are distinct from their immediate predecessors
distinctUntilChanged
()

Returns an Observable that emits all items emitted by the source ObservableSource that are distinct from their immediate predecessors based on Object#equals(Object) comparison.

public final <
the key type
K
>
Observable<T>

Returns:

an Observable that emits those items from the source ObservableSource whose keys are distinct from those of their immediate predecessors
distinctUntilChanged
(Function<? super T, K>
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
keySelector
)

Returns an Observable that emits all items emitted by the source ObservableSource that are distinct from their immediate predecessors, according to a key selector function and based on Object#equals(Object) comparison of those objects returned by the key selector function.

public final Observable<T>

Returns:

an Observable that emits those items from the source ObservableSource that are distinct from their immediate predecessors
distinctUntilChanged
(BiPredicate<? super T, ? super T>
the function that receives the previous item and the current item and is expected to return true if the two are equal, thus skipping the current value.
comparer
)

Returns an Observable that emits all items emitted by the source ObservableSource that are distinct from their immediate predecessors when compared with each other via the provided comparator function.

public final Observable<T>

Returns:

the new Observable instance
doAfterNext
(Consumer<? super T>
the Consumer that will be called after emitting an item from upstream to the downstream
onAfterNext
)

Calls the specified consumer with the current item after this item has been emitted to the downstream.

public final Observable<T>

Returns:

an Observable that emits the same items as the source ObservableSource, then invokes the Action
doAfterTerminate
(Action
an Action to be invoked when the source ObservableSource finishes
onFinally
)

Registers an Action to be called when this ObservableSource invokes either onComplete or onError.

public final Observable<T>

Returns:

the new Observable instance
doFinally
(Action
the action called when this Observable terminates or gets disposed
onFinally
)

Calls the specified action after this Observable signals onError or onCompleted or gets disposed by the downstream.

public final Observable<T>

Returns:

the source ObservableSource with the side-effecting behavior applied
doOnComplete
(Action
the action to invoke when the source ObservableSource calls onComplete
onComplete
)

Modifies the source ObservableSource so that it invokes an action when it calls onComplete.

public final Observable<T>

Returns:

the source ObservableSource modified so as to call this Action when appropriate
doOnDispose
(Action
the action that gets called when the source ObservableSource's Disposable is disposed
onDispose
)

Calls the dispose Action if the downstream disposes the sequence.

private Observable<T>

Returns:

the source ObservableSource with the side-effecting behavior applied
doOnEach
(Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete, Action onAfterTerminate)

Calls the appropriate onXXX consumer (shared between all subscribers) whenever a signal with the same type passes through, before forwarding them to downstream.

public final Observable<T>

Returns:

the source ObservableSource with the side-effecting behavior applied
doOnEach
(final Consumer<? super Notification<T>>
the action to invoke for each item emitted by the source ObservableSource
onNotification
)

Modifies the source ObservableSource so that it invokes an action for each item it emits.

public final Observable<T>

Returns:

the source ObservableSource with the side-effecting behavior applied
doOnEach
(final Observer<? super T>
the observer to be notified about onNext, onError and onComplete events on its respective methods before the actual downstream Observer gets notified.
observer
)

Modifies the source ObservableSource so that it notifies an Observer for each item and terminal event it emits.

public final Observable<T>

Returns:

the source ObservableSource with the side-effecting behavior applied
doOnError
(Consumer<? super Throwable>
the action to invoke if the source ObservableSource calls onError
onError
)

Modifies the source ObservableSource so that it invokes an action if it calls onError.

public final Observable<T>

Returns:

the source ObservableSource with the side-effecting behavior applied
doOnLifecycle
(final Consumer<? super Disposable>
a Consumer called with the Disposable sent via Observer.onSubscribe()
onSubscribe
,
final Action
called when the downstream disposes the Disposable via dispose()
onDispose
)

Calls the appropriate onXXX method (shared between all Observer) for the lifecycle events of the sequence (subscription, disposal).

public final Observable<T>

Returns:

the source ObservableSource with the side-effecting behavior applied
doOnNext
(Consumer<? super T>
the action to invoke when the source ObservableSource calls onNext
onNext
)

Modifies the source ObservableSource so that it invokes an action when it calls onNext.

public final Observable<T>

Returns:

the source ObservableSource modified so as to call this Consumer when appropriate
doOnSubscribe
(Consumer<? super Disposable>
the Consumer that gets called when an Observer subscribes to the current Observable
onSubscribe
)

Modifies the source ObservableSource so that it invokes the given action when it is subscribed from its subscribers.

public final Observable<T>

Returns:

the source ObservableSource with the side-effecting behavior applied
doOnTerminate
(final Action
the action to invoke when the source ObservableSource calls onComplete or onError
onTerminate
)

Modifies the source ObservableSource so that it invokes an action when it calls onComplete or onError.

public final Maybe<T>

Returns:

a Maybe that emits a single item: the item at the specified position in the sequence of those emitted by the source ObservableSource
elementAt
(long
the zero-based index of the item to retrieve
index
)

Returns a Maybe that emits the single item at a specified index in a sequence of emissions from this Observable or completes if this Observable signals fewer elements than index.

public final Single<T>

Returns:

a Single that emits the item at the specified position in the sequence emitted by the source ObservableSource, or the default item if that index is outside the bounds of the source sequence
elementAt
(long
the zero-based index of the item to retrieve
index
,
T
the default item
defaultItem
)

Returns a Single that emits the item found at a specified index in a sequence of emissions from this Observable, or a default item if that index is out of range.

public final Single<T>

Returns:

a Single that emits the item at the specified position in the sequence emitted by the source ObservableSource, or the default item if that index is outside the bounds of the source sequence
elementAtOrError
(long
the zero-based index of the item to retrieve
index
)

Returns a Single that emits the item found at a specified index in a sequence of emissions from this Observable or signals a NoSuchElementException if this Observable signals fewer elements than index.

public static <
the type of the items (ostensibly) emitted by the ObservableSource
T
>
Observable<T>

Returns:

an Observable that emits no items to the Observer but immediately invokes the Observer's onComplete method
empty
()

Returns an Observable that emits no items to the Observer and immediately invokes its onComplete method.

public static <
the type of the items (ostensibly) emitted by the ObservableSource
T
>
Observable<T>

Returns:

an Observable that invokes the Observer's onError method when the Observer subscribes to it
error
(Callable<? extends Throwable>
a Callable factory to return a Throwable for each individual Observer
errorSupplier
)

Returns an Observable that invokes an Observer's onError method when the Observer subscribes to it.

public static <
the type of the items (ostensibly) emitted by the ObservableSource
T
>
Observable<T>

Returns:

an Observable that invokes the Observer's onError method when the Observer subscribes to it
error
(final Throwable
the particular Throwable to pass to onError
exception
)

Returns an Observable that invokes an Observer's onError method when the Observer subscribes to it.

public final Observable<T>

Returns:

an Observable that emits only those items emitted by the source ObservableSource that the filter evaluates as true
filter
(Predicate<? super T>
a function that evaluates each item emitted by the source ObservableSource, returning true if it passes the filter
predicate
)

Filters items emitted by an ObservableSource by only emitting those that satisfy a specified predicate.

public final Single<T>

Returns:

the new Single instance
first
(T
the default item to emit if the source ObservableSource doesn't emit anything
defaultItem
)

Returns a Single that emits only the very first item emitted by the source ObservableSource, or a default item if the source ObservableSource completes without emitting any items.

public final Maybe<T>

Returns:

the new Maybe instance
firstElement
()

Returns a Maybe that emits only the very first item emitted by the source ObservableSource, or completes if the source ObservableSource is empty.

public final Single<T>

Returns:

the new Single instance
firstOrError
()

Returns a Single that emits only the very first item emitted by this Observable or signals a NoSuchElementException if this Observable is empty.

public final <
the value type of the inner ObservableSources and the output type
R
>
Observable<R>

Returns:

an Observable that emits the result of applying the transformation function to each item emitted by the source ObservableSource and merging the results of the ObservableSources obtained from this transformation
flatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
)

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source ObservableSource, where that function returns an ObservableSource, and then merging those resulting ObservableSources and emitting the results of this merger.

public final <
the value type of the inner ObservableSources and the output type
R
>
Observable<R>

Returns:

an Observable that emits the result of applying the transformation function to each item emitted by the source ObservableSource and merging the results of the ObservableSources obtained from this transformation
flatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
,
boolean
if true, exceptions from the current Observable and all inner ObservableSources are delayed until all of them terminate if false, the first one signalling an exception will terminate the whole sequence immediately
delayErrors
)

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source ObservableSource, where that function returns an ObservableSource, and then merging those resulting ObservableSources and emitting the results of this merger.

public final <
the value type of the inner ObservableSources and the output type
R
>
Observable<R>

Returns:

an Observable that emits the result of applying the transformation function to each item emitted by the source ObservableSource and merging the results of the ObservableSources obtained from this transformation
flatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
,
boolean
if true, exceptions from the current Observable and all inner ObservableSources are delayed until all of them terminate if false, the first one signalling an exception will terminate the whole sequence immediately
delayErrors
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source ObservableSource, where that function returns an ObservableSource, and then merging those resulting ObservableSources and emitting the results of this merger, while limiting the maximum number of concurrent subscriptions to these ObservableSources.

public final <
the value type of the inner ObservableSources and the output type
R
>
Observable<R>

Returns:

an Observable that emits the result of applying the transformation function to each item emitted by the source ObservableSource and merging the results of the ObservableSources obtained from this transformation
flatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
,
boolean
if true, exceptions from the current Observable and all inner ObservableSources are delayed until all of them terminate if false, the first one signalling an exception will terminate the whole sequence immediately
delayErrors
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
,
int
the number of elements to prefetch from each inner ObservableSource
bufferSize
)

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source ObservableSource, where that function returns an ObservableSource, and then merging those resulting ObservableSources and emitting the results of this merger, while limiting the maximum number of concurrent subscriptions to these ObservableSources.

public final <
the result type
R
>
Observable<R>

Returns:

an Observable that emits the results of merging the ObservableSources returned from applying the specified functions to the emissions and notifications of the source ObservableSource
flatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that returns an ObservableSource to merge for each item emitted by the source ObservableSource
onNextMapper
,
Function<? super Throwable, ? extends ObservableSource<? extends R>>
a function that returns an ObservableSource to merge for an onError notification from the source ObservableSource
onErrorMapper
,
Callable<? extends ObservableSource<? extends R>>
a function that returns an ObservableSource to merge for an onComplete notification from the source ObservableSource
onCompleteSupplier
)

Returns an Observable that applies a function to each item emitted or notification raised by the source ObservableSource and then flattens the ObservableSources returned from these functions and emits the resulting items.

public final <
the result type
R
>
Observable<R>

Returns:

an Observable that emits the results of merging the ObservableSources returned from applying the specified functions to the emissions and notifications of the source ObservableSource
flatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that returns an ObservableSource to merge for each item emitted by the source ObservableSource
onNextMapper
,
Function<Throwable, ? extends ObservableSource<? extends R>>
a function that returns an ObservableSource to merge for an onError notification from the source ObservableSource
onErrorMapper
,
Callable<? extends ObservableSource<? extends R>>
a function that returns an ObservableSource to merge for an onComplete notification from the source ObservableSource
onCompleteSupplier
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Returns an Observable that applies a function to each item emitted or notification raised by the source ObservableSource and then flattens the ObservableSources returned from these functions and emits the resulting items, while limiting the maximum number of concurrent subscriptions to these ObservableSources.

public final <
the value type of the inner ObservableSources and the output type
R
>
Observable<R>

Returns:

an Observable that emits the result of applying the transformation function to each item emitted by the source ObservableSource and merging the results of the ObservableSources obtained from this transformation
flatMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source ObservableSource, where that function returns an ObservableSource, and then merging those resulting ObservableSources and emitting the results of this merger, while limiting the maximum number of concurrent subscriptions to these ObservableSources.

public final <
the type of items emitted by the collection ObservableSource
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that emits the results of applying a function to a pair of values emitted by the source ObservableSource and the collection ObservableSource
flatMap
(Function<? super T, ? extends ObservableSource<? extends U>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource
mapper
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines one item emitted by each of the source and collection ObservableSources and returns an item to be emitted by the resulting ObservableSource
resultSelector
)

Returns an Observable that emits the results of a specified function to the pair of values emitted by the source ObservableSource and a specified collection ObservableSource.

public final <
the type of items emitted by the collection ObservableSource
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that emits the results of applying a function to a pair of values emitted by the source ObservableSource and the collection ObservableSource
flatMap
(Function<? super T, ? extends ObservableSource<? extends U>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource
mapper
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines one item emitted by each of the source and collection ObservableSources and returns an item to be emitted by the resulting ObservableSource
combiner
,
boolean
if true, exceptions from the current Observable and all inner ObservableSources are delayed until all of them terminate if false, the first one signalling an exception will terminate the whole sequence immediately
delayErrors
)

Returns an Observable that emits the results of a specified function to the pair of values emitted by the source ObservableSource and a specified collection ObservableSource.

public final <
the type of items emitted by the collection ObservableSource
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that emits the results of applying a function to a pair of values emitted by the source ObservableSource and the collection ObservableSource
flatMap
(Function<? super T, ? extends ObservableSource<? extends U>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource
mapper
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines one item emitted by each of the source and collection ObservableSources and returns an item to be emitted by the resulting ObservableSource
combiner
,
boolean
if true, exceptions from the current Observable and all inner ObservableSources are delayed until all of them terminate if false, the first one signalling an exception will terminate the whole sequence immediately
delayErrors
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Returns an Observable that emits the results of a specified function to the pair of values emitted by the source ObservableSource and a specified collection ObservableSource, while limiting the maximum number of concurrent subscriptions to these ObservableSources.

public final <
the type of items emitted by the collection ObservableSource
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that emits the results of applying a function to a pair of values emitted by the source ObservableSource and the collection ObservableSource
flatMap
(final Function<? super T, ? extends ObservableSource<? extends U>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource
mapper
,
final BiFunction<? super T, ? super U, ? extends R>
a function that combines one item emitted by each of the source and collection ObservableSources and returns an item to be emitted by the resulting ObservableSource
combiner
,
boolean
if true, exceptions from the current Observable and all inner ObservableSources are delayed until all of them terminate if false, the first one signalling an exception will terminate the whole sequence immediately
delayErrors
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
,
int
the number of elements to prefetch from the inner ObservableSources.
bufferSize
)

Returns an Observable that emits the results of a specified function to the pair of values emitted by the source ObservableSource and a specified collection ObservableSource, while limiting the maximum number of concurrent subscriptions to these ObservableSources.

public final <
the type of items emitted by the collection ObservableSource
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that emits the results of applying a function to a pair of values emitted by the source ObservableSource and the collection ObservableSource
flatMap
(Function<? super T, ? extends ObservableSource<? extends U>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource
mapper
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines one item emitted by each of the source and collection ObservableSources and returns an item to be emitted by the resulting ObservableSource
combiner
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Returns an Observable that emits the results of a specified function to the pair of values emitted by the source ObservableSource and a specified collection ObservableSource, while limiting the maximum number of concurrent subscriptions to these ObservableSources.

public final Completable

Returns:

the new Completable instance
flatMapCompletable
(Function<? super T, ? extends CompletableSource>
the function that received each source value and transforms them into CompletableSources.
mapper
)

Maps each element of the upstream Observable into CompletableSources, subscribes to them and waits until the upstream and all CompletableSources complete.

public final Completable

Returns:

the new Completable instance
flatMapCompletable
(Function<? super T, ? extends CompletableSource>
the function that received each source value and transforms them into CompletableSources.
mapper
,
boolean
if true errors from the upstream and inner CompletableSources are delayed until each of them terminates.
delayErrors
)

Maps each element of the upstream Observable into CompletableSources, subscribes to them and waits until the upstream and all CompletableSources complete, optionally delaying all errors.

public final <
the type of item emitted by the resulting Iterable
U
>
Observable<U>

Returns:

an Observable that emits the results of merging the items emitted by the source ObservableSource with the values in the Iterables corresponding to those items, as generated by collectionSelector
flatMapIterable
(final Function<? super T, ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the source ObservableSource
mapper
)

Returns an Observable that merges each item emitted by the source ObservableSource with the values in an Iterable corresponding to that item that is generated by a selector.

public final <
the collection element type
U
,
the type of item emitted by the resulting Iterable
V
>
Observable<V>

Returns:

an Observable that emits the items returned by resultSelector for each item in the source ObservableSource
flatMapIterable
(final Function<? super T, ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for each item emitted by the source ObservableSource
mapper
,
BiFunction<? super T, ? super U, ? extends V>
a function that returns an item based on the item emitted by the source ObservableSource and the Iterable returned for that item by the collectionSelector
resultSelector
)

Returns an Observable that emits the results of applying a function to the pair of values from the source ObservableSource and an Iterable corresponding to that item that is generated by a selector.

public final <
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
flatMapMaybe
(Function<? super T, ? extends MaybeSource<? extends R>>
the function that received each source value and transforms them into MaybeSources.
mapper
)

Maps each element of the upstream Observable into MaybeSources, subscribes to all of them and merges their onSuccess values, in no particular order, into a single Observable sequence.

public final <
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
flatMapMaybe
(Function<? super T, ? extends MaybeSource<? extends R>>
the function that received each source value and transforms them into MaybeSources.
mapper
,
boolean
if true errors from the upstream and inner MaybeSources are delayed until each of them terminates.
delayErrors
)

Maps each element of the upstream Observable into MaybeSources, subscribes to them and merges their onSuccess values, in no particular order, into a single Observable sequence, optionally delaying all errors.

public final <
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
flatMapSingle
(Function<? super T, ? extends SingleSource<? extends R>>
the function that received each source value and transforms them into SingleSources.
mapper
)

Maps each element of the upstream Observable into SingleSources, subscribes to all of them and merges their onSuccess values, in no particular order, into a single Observable sequence.

public final <
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
flatMapSingle
(Function<? super T, ? extends SingleSource<? extends R>>
the function that received each source value and transforms them into SingleSources.
mapper
,
boolean
if true errors from the upstream and inner SingleSources are delayed until each of them terminates.
delayErrors
)

Maps each element of the upstream Observable into SingleSources, subscribes to them and merges their onSuccess values, in no particular order, into a single Observable sequence, optionally delaying all errors.

public final Disposable

Returns:

a Disposable that allows disposing of an asynchronous sequence
forEach
(Consumer<? super T>
Consumer to execute for each item.
onNext
)

Subscribes to the ObservableSource and receives notifications for each element.

public final Disposable

Returns:

a Disposable that allows disposing of an asynchronous sequence
forEachWhile
(Predicate<? super T>
Predicate to execute for each item.
onNext
)

Subscribes to the ObservableSource and receives notifications for each element until the onNext Predicate returns false.

public final Disposable

Returns:

a Disposable that allows disposing of an asynchronous sequence
forEachWhile
(Predicate<? super T>
Predicate to execute for each item.
onNext
,
Consumer<? super Throwable>
Consumer to execute when an error is emitted.
onError
)

Subscribes to the ObservableSource and receives notifications for each element and error events until the onNext Predicate returns false.

public final Disposable

Returns:

a Disposable that allows disposing of an asynchronous sequence
forEachWhile
(final Predicate<? super T>
Predicate to execute for each item.
onNext
,
Consumer<? super Throwable>
Consumer to execute when an error is emitted.
onError
,
final Action
Action to execute when completion is signalled.
onComplete
)

Subscribes to the ObservableSource and receives notifications for each element and the terminal events until the onNext Predicate returns false.

public static <
the type of items in the Array and the type of items to be emitted by the resulting ObservableSource
T
>
Observable<T>

Returns:

an Observable that emits each item in the source Array
fromArray
(T...
the array of elements
items
)

Converts an Array into an ObservableSource that emits the items in the Array.

public static <
the type of the item emitted by the ObservableSource
T
>
Observable<T>

Returns:

an Observable whose Observers' subscriptions trigger an invocation of the given function
fromCallable
(Callable<? extends T>
a function, the execution of which should be deferred; fromCallable will invoke this function only when an observer subscribes to the ObservableSource that fromCallable returns
supplier
)

Returns an Observable that, when an observer subscribes to it, invokes a function you specify and then emits the value returned from that function.

public static <
the type of object that the Future returns, and also the type of item to be emitted by the resulting ObservableSource
T
>
Observable<T>

Returns:

an Observable that emits the item from the source Future
fromFuture
(Future<? extends T>
the source Future
future
)

Converts a Future into an ObservableSource.

public static <
the type of object that the Future returns, and also the type of item to be emitted by the resulting ObservableSource
T
>
Observable<T>

Returns:

an Observable that emits the item from the source Future
fromFuture
(Future<? extends T>
the source Future
future
,
long
the maximum time to wait before calling get
timeout
,
TimeUnit
the TimeUnit of the timeout argument
unit
)

Converts a Future into an ObservableSource, with a timeout on the Future.

public static <
the type of object that the Future returns, and also the type of item to be emitted by the resulting ObservableSource
T
>
Observable<T>

Returns:

an Observable that emits the item from the source Future
fromFuture
(Future<? extends T>
the source Future
future
,
long
the maximum time to wait before calling get
timeout
,
TimeUnit
the TimeUnit of the timeout argument
unit
,
Scheduler
the Scheduler to wait for the Future on. Use a Scheduler such as Schedulers#io() that can block and wait on the Future
scheduler
)

Converts a Future into an ObservableSource, with a timeout on the Future.

public static <
the type of object that the Future returns, and also the type of item to be emitted by the resulting ObservableSource
T
>
Observable<T>

Returns:

an Observable that emits the item from the source Future
fromFuture
(Future<? extends T>
the source Future
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
scheduler
)

Converts a Future, operating on a specified Scheduler, into an ObservableSource.

public static <
the type of items in the Iterable sequence and the type of items to be emitted by the resulting ObservableSource
T
>
Observable<T>

Returns:

an Observable that emits each item in the source Iterable sequence
fromIterable
(Iterable<? extends T>
the source Iterable sequence
source
)

Converts an Iterable sequence into an ObservableSource that emits the items in the sequence.

public static <
the value type of the flow
T
>
Observable<T>

Returns:

the new Observable instance
fromPublisher
(Publisher<? extends T>
the Publisher to convert
publisher
)

Converts an arbitrary Reactive Streams Publisher into an Observable.

public static <
the generated value type
T
>
Observable<T>

Returns:

the new Observable instance
generate
(final Consumer<Emitter<T>>
the Consumer called whenever a particular downstream Observer has requested a value. The callback then should call onNext, onError or onComplete to signal a value or a terminal event. Signalling multiple onNext in a call will make the operator signal IllegalStateException.
generator
)

Returns a cold, synchronous and stateless generator of values.

public static <
the generated value type
T
,
the type of the per-Observer state
S
>
Observable<T>

Returns:

the new Observable instance
generate
(Callable<S>
the Callable to generate the initial state for each Observer
initialState
,
final BiConsumer<S, Emitter<T>>
the Consumer called with the current state whenever a particular downstream Observer has requested a value. The callback then should call onNext, onError or onComplete to signal a value or a terminal event. Signalling multiple onNext in a call will make the operator signal IllegalStateException.
generator
)

Returns a cold, synchronous and stateful generator of values.

public static <
the generated value type
T
,
the type of the per-Observer state
S
>
Observable<T>

Returns:

the new Observable instance
generate
(final Callable<S>
the Callable to generate the initial state for each Observer
initialState
,
final BiConsumer<S, Emitter<T>>
the Consumer called with the current state whenever a particular downstream Observer has requested a value. The callback then should call onNext, onError or onComplete to signal a value or a terminal event. Signalling multiple onNext in a call will make the operator signal IllegalStateException.
generator
,
Consumer<? super S>
the Consumer that is called with the current state when the generator terminates the sequence or it gets disposed
disposeState
)

Returns a cold, synchronous and stateful generator of values.

public static <
the generated value type
T
,
the type of the per-Observer state
S
>
Observable<T>

Returns:

the new Observable instance
generate
(Callable<S>
the Callable to generate the initial state for each Observer
initialState
,
BiFunction<S, Emitter<T>, S>
the Function called with the current state whenever a particular downstream Observer has requested a value. The callback then should call onNext, onError or onComplete to signal a value or a terminal event and should return a (new) state for the next invocation. Signalling multiple onNext in a call will make the operator signal IllegalStateException.
generator
)

Returns a cold, synchronous and stateful generator of values.

public static <
the generated value type
T
,
the type of the per-Observer state
S
>
Observable<T>

Returns:

the new Observable instance
generate
(Callable<S>
the Callable to generate the initial state for each Observer
initialState
,
BiFunction<S, Emitter<T>, S>
the Function called with the current state whenever a particular downstream Observer has requested a value. The callback then should call onNext, onError or onComplete to signal a value or a terminal event and should return a (new) state for the next invocation. Signalling multiple onNext in a call will make the operator signal IllegalStateException.
generator
,
Consumer<? super S>
the Consumer that is called with the current state when the generator terminates the sequence or it gets disposed
disposeState
)

Returns a cold, synchronous and stateful generator of values.

public final <
the key type
K
>
Observable<GroupedObservable<K, T>>

Returns:

an ObservableSource that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source ObservableSource that share that key value
groupBy
(Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
)

Groups the items emitted by an ObservableSource according to a specified criterion, and emits these grouped items as GroupedObservables.

public final <
the key type
K
>
Observable<GroupedObservable<K, T>>

Returns:

an ObservableSource that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source ObservableSource that share that key value
groupBy
(Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
boolean
if true, the exception from the current Observable is delayed in each group until that specific group emitted the normal values; if false, the exception bypasses values in the groups and is reported immediately.
delayError
)

Groups the items emitted by an ObservableSource according to a specified criterion, and emits these grouped items as GroupedObservables.

public final <
the key type
K
,
the element type
V
>
Observable<GroupedObservable<K, V>>

Returns:

an ObservableSource that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source ObservableSource that share that key value
groupBy
(Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
Function<? super T, ? extends V>
a function that extracts the return element for each item
valueSelector
)

Groups the items emitted by an ObservableSource according to a specified criterion, and emits these grouped items as GroupedObservables.

public final <
the key type
K
,
the element type
V
>
Observable<GroupedObservable<K, V>>

Returns:

an ObservableSource that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source ObservableSource that share that key value
groupBy
(Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
Function<? super T, ? extends V>
a function that extracts the return element for each item
valueSelector
,
boolean
if true, the exception from the current Observable is delayed in each group until that specific group emitted the normal values; if false, the exception bypasses values in the groups and is reported immediately.
delayError
)

Groups the items emitted by an ObservableSource according to a specified criterion, and emits these grouped items as GroupedObservables.

public final <
the key type
K
,
the element type
V
>
Observable<GroupedObservable<K, V>>

Returns:

an ObservableSource that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source ObservableSource that share that key value
groupBy
(Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
Function<? super T, ? extends V>
a function that extracts the return element for each item
valueSelector
,
boolean
if true, the exception from the current Observable is delayed in each group until that specific group emitted the normal values; if false, the exception bypasses values in the groups and is reported immediately.
delayError
,
int
the hint for how many GroupedObservables and element in each GroupedObservable should be buffered
bufferSize
)

Groups the items emitted by an ObservableSource according to a specified criterion, and emits these grouped items as GroupedObservables.

public final <
the value type of the right ObservableSource source
TRight
,
the element type of the left duration ObservableSources
TLeftEnd
,
the element type of the right duration ObservableSources
TRightEnd
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items based on combining those items emitted by the source ObservableSources whose durations overlap
groupJoin
(ObservableSource<? extends TRight>
the other ObservableSource to correlate items from the source ObservableSource with
other
,
Function<? super T, ? extends ObservableSource<TLeftEnd>>
a function that returns an ObservableSource whose emissions indicate the duration of the values of the source ObservableSource
leftEnd
,
Function<? super TRight, ? extends ObservableSource<TRightEnd>>
a function that returns an ObservableSource whose emissions indicate the duration of the values of the right ObservableSource
rightEnd
,
BiFunction<? super T, ? super Observable<TRight>, ? extends R>
a function that takes an item emitted by each ObservableSource and returns the value to be emitted by the resulting ObservableSource
resultSelector
)

Returns an Observable that correlates two ObservableSources when they overlap in time and groups the results.

public final Observable<T>

Returns:

the new Observable instance
hide
()

Hides the identity of this Observable and its Disposable.

public final Completable

Returns:

the new Completable instance
ignoreElements
()

Ignores all items emitted by the source ObservableSource and only calls onComplete or onError.

public static Observable<Long>

Returns:

an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter
interval
(long
the initial delay time to wait before emitting the first value of 0L
initialDelay
,
long
the period of time between emissions of the subsequent numbers
period
,
TimeUnit
the time unit for both initialDelay and period
unit
)

Returns an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter.

public static Observable<Long>

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
interval
(long
the initial delay time to wait before emitting the first value of 0L
initialDelay
,
long
the period of time between emissions of the subsequent numbers
period
,
TimeUnit
the time unit for both initialDelay and period
unit
,
Scheduler
the Scheduler on which the waiting happens and items are emitted
scheduler
)

Returns an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter, on a specified Scheduler.

public static Observable<Long>

Returns:

an Observable that emits a sequential number each time interval
interval
(long
the period size in time units (see below)
period
,
TimeUnit
time units to use for the interval size
unit
)

Returns an Observable that emits a sequential number every specified interval of time.

public static Observable<Long>

Returns:

an Observable that emits a sequential number each time interval
interval
(long
the period size in time units (see below)
period
,
TimeUnit
time units to use for the interval size
unit
,
Scheduler
the Scheduler to use for scheduling the items
scheduler
)

Returns an Observable that emits a sequential number every specified interval of time, on a specified Scheduler.

public static Observable<Long>

Returns:

the new Observable instance
intervalRange
(long
that start value of the range
start
,
long
the number of values to emit in total, if zero, the operator emits an onComplete after the initial delay.
count
,
long
the initial delay before signalling the first value (the start)
initialDelay
,
long
the period between subsequent values
period
,
TimeUnit
the unit of measure of the initialDelay and period amounts
unit
)

Signals a range of long values, the first after some initial delay and the rest periodically after.

public static Observable<Long>

Returns:

the new Observable instance
intervalRange
(long
that start value of the range
start
,
long
the number of values to emit in total, if zero, the operator emits an onComplete after the initial delay.
count
,
long
the initial delay before signalling the first value (the start)
initialDelay
,
long
the period between subsequent values
period
,
TimeUnit
the unit of measure of the initialDelay and period amounts
unit
,
Scheduler
the target scheduler where the values and terminal signals will be emitted
scheduler
)

Signals a range of long values, the first after some initial delay and the rest periodically after.

public final Single<Boolean>

Returns:

a Single that emits a Boolean
isEmpty
()

Returns a Single that emits true if the source ObservableSource is empty, otherwise false.

public final <
the value type of the right ObservableSource source
TRight
,
the element type of the left duration ObservableSources
TLeftEnd
,
the element type of the right duration ObservableSources
TRightEnd
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items correlating to items emitted by the source ObservableSources that have overlapping durations
join
(ObservableSource<? extends TRight>
the second ObservableSource to join items from
other
,
Function<? super T, ? extends ObservableSource<TLeftEnd>>
a function to select a duration for each item emitted by the source ObservableSource, used to determine overlap
leftEnd
,
Function<? super TRight, ? extends ObservableSource<TRightEnd>>
a function to select a duration for each item emitted by the right ObservableSource, used to determine overlap
rightEnd
,
BiFunction<? super T, ? super TRight, ? extends R>
a function that computes an item to be emitted by the resulting ObservableSource for any two overlapping items emitted by the two ObservableSources
resultSelector
)

Correlates the items emitted by two ObservableSources based on overlapping durations.

public static <
the type of that item
T
>
Observable<T>

Returns:

an Observable that emits value as a single item and then completes
just
(T
the item to emit
item
)

Returns an Observable that signals the given (constant reference) item and then completes.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
)

Converts two items into an ObservableSource that emits those items.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
)

Converts three items into an ObservableSource that emits those items.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
,
T
fourth item
item4
)

Converts four items into an ObservableSource that emits those items.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
,
T
fourth item
item4
,
T
fifth item
item5
)

Converts five items into an ObservableSource that emits those items.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
,
T
fourth item
item4
,
T
fifth item
item5
,
T
sixth item
item6
)

Converts six items into an ObservableSource that emits those items.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
,
T
fourth item
item4
,
T
fifth item
item5
,
T
sixth item
item6
,
T
seventh item
item7
)

Converts seven items into an ObservableSource that emits those items.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
,
T
fourth item
item4
,
T
fifth item
item5
,
T
sixth item
item6
,
T
seventh item
item7
,
T
eighth item
item8
)

Converts eight items into an ObservableSource that emits those items.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
,
T
fourth item
item4
,
T
fifth item
item5
,
T
sixth item
item6
,
T
seventh item
item7
,
T
eighth item
item8
,
T
ninth item
item9
)

Converts nine items into an ObservableSource that emits those items.

public static <
the type of these items
T
>
Observable<T>

Returns:

an Observable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
,
T
fourth item
item4
,
T
fifth item
item5
,
T
sixth item
item6
,
T
seventh item
item7
,
T
eighth item
item8
,
T
ninth item
item9
,
T
tenth item
item10
)

Converts ten items into an ObservableSource that emits those items.

public final Single<T>

Returns:

a Single that emits only the last item emitted by the source ObservableSource, or a default item if the source ObservableSource is empty
last
(T
the default item to emit if the source ObservableSource is empty
defaultItem
)

Returns a Single that emits only the last item emitted by this Observable, or a default item if this Observable completes without emitting any items.

public final Maybe<T>

Returns:

a Maybe that emits the last item from the source ObservableSource or notifies observers of an error
lastElement
()

Returns a Maybe that emits the last item emitted by this Observable or completes if this Observable is empty.

public final Single<T>

Returns:

a Single that emits only the last item emitted by the source ObservableSource. If the source ObservableSource completes without emitting any items a NoSuchElementException will be thrown.
lastOrError
()

Returns a Single that emits only the last item emitted by this Observable or signals a NoSuchElementException if this Observable is empty.

public final <
the output value type
R
>
Observable<R>

Returns:

the new Observable instance
lift
(ObservableOperator<? extends R, ? super T>
the ObservableOperator that receives the downstream's Observer and should return an Observer with custom behavior to be used as the consumer for the current Observable.
lifter
)

This method requires advanced knowledge about building operators, please consider other standard composition methods first; Returns an Observable which, when subscribed to, invokes the apply(Observer) method of the provided ObservableOperator for each individual downstream Observer and allows the insertion of a custom operator by accessing the downstream's Observer during this subscription phase and providing a new Observer, containing the custom operator's intended business logic, that will be used in the subscription process going further upstream.

public final <
the output type
R
>
Observable<R>

Returns:

an Observable that emits the items from the source ObservableSource, transformed by the specified function
map
(Function<? super T, ? extends R>
a function to apply to each item emitted by the ObservableSource
mapper
)

Returns an Observable that applies a specified function to each item emitted by the source ObservableSource and emits the results of these function applications.

public final Observable<Notification<T>>

Returns:

an Observable that emits items that are the result of materializing the items and notifications of the source ObservableSource
materialize
()

Returns an Observable that represents all of the emissions and notifications from the source ObservableSource into emissions marked with their original types within Notification objects.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
merge
(Iterable<? extends ObservableSource<? extends T>>
the Iterable of ObservableSources
sources
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
,
int
the number of items to prefetch from each inner ObservableSource
bufferSize
)

Flattens an Iterable of ObservableSources into one ObservableSource, without any transformation, while limiting the number of concurrent subscriptions to these ObservableSources.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
merge
(Iterable<? extends ObservableSource<? extends T>>
the Iterable of ObservableSources
sources
)

Flattens an Iterable of ObservableSources into one ObservableSource, without any transformation.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
merge
(Iterable<? extends ObservableSource<? extends T>>
the Iterable of ObservableSources
sources
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Flattens an Iterable of ObservableSources into one ObservableSource, without any transformation, while limiting the number of concurrent subscriptions to these ObservableSources.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the ObservableSources emitted by the source ObservableSource
merge
(ObservableSource<? extends ObservableSource<? extends T>>
an ObservableSource that emits ObservableSources
sources
)

Flattens an ObservableSource that emits ObservableSources into a single ObservableSource that emits the items emitted by those ObservableSources, without any transformation.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the ObservableSources emitted by the source ObservableSource
merge
(ObservableSource<? extends ObservableSource<? extends T>>
an ObservableSource that emits ObservableSources
sources
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Flattens an ObservableSource that emits ObservableSources into a single ObservableSource that emits the items emitted by those ObservableSources, without any transformation, while limiting the maximum number of concurrent subscriptions to these ObservableSources.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items emitted by the source ObservableSources
merge
(ObservableSource<? extends T>
an ObservableSource to be merged
source1
,
ObservableSource<? extends T>
an ObservableSource to be merged
source2
)

Flattens two ObservableSources into a single ObservableSource, without any transformation.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items emitted by the source ObservableSources
merge
(ObservableSource<? extends T>
an ObservableSource to be merged
source1
,
ObservableSource<? extends T>
an ObservableSource to be merged
source2
,
ObservableSource<? extends T>
an ObservableSource to be merged
source3
)

Flattens three ObservableSources into a single ObservableSource, without any transformation.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items emitted by the source ObservableSources
merge
(ObservableSource<? extends T>
an ObservableSource to be merged
source1
,
ObservableSource<? extends T>
an ObservableSource to be merged
source2
,
ObservableSource<? extends T>
an ObservableSource to be merged
source3
,
ObservableSource<? extends T>
an ObservableSource to be merged
source4
)

Flattens four ObservableSources into a single ObservableSource, without any transformation.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
mergeArray
(int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
,
int
the number of items to prefetch from each inner ObservableSource
bufferSize
,
ObservableSource<? extends T>...
the array of ObservableSources
sources
)

Flattens an Iterable of ObservableSources into one ObservableSource, without any transformation, while limiting the number of concurrent subscriptions to these ObservableSources.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items emitted by the ObservableSources in the Array
mergeArray
(ObservableSource<? extends T>...
the array of ObservableSources
sources
)

Flattens an Array of ObservableSources into one ObservableSource, without any transformation.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
mergeArrayDelayError
(int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
,
int
the number of items to prefetch from each inner ObservableSource
bufferSize
,
ObservableSource<? extends T>...
the array of ObservableSources
sources
)

Flattens an array of ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from each of the source ObservableSources without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to these ObservableSources.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
mergeArrayDelayError
(ObservableSource<? extends T>...
the Iterable of ObservableSources
sources
)

Flattens an Iterable of ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from each of the source ObservableSources without being interrupted by an error notification from one of them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
mergeDelayError
(Iterable<? extends ObservableSource<? extends T>>
the Iterable of ObservableSources
sources
)

Flattens an Iterable of ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from each of the source ObservableSources without being interrupted by an error notification from one of them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
mergeDelayError
(Iterable<? extends ObservableSource<? extends T>>
the Iterable of ObservableSources
sources
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
,
int
the number of items to prefetch from each inner ObservableSource
bufferSize
)

Flattens an Iterable of ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from each of the source ObservableSources without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to these ObservableSources.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits items that are the result of flattening the items emitted by the ObservableSources in the Iterable
mergeDelayError
(Iterable<? extends ObservableSource<? extends T>>
the Iterable of ObservableSources
sources
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Flattens an Iterable of ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from each of the source ObservableSources without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to these ObservableSources.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items emitted by the ObservableSources emitted by the source ObservableSource
mergeDelayError
(ObservableSource<? extends ObservableSource<? extends T>>
an ObservableSource that emits ObservableSources
sources
)

Flattens an ObservableSource that emits ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from all of the source ObservableSources without being interrupted by an error notification from one of them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items emitted by the ObservableSources emitted by the source ObservableSource
mergeDelayError
(ObservableSource<? extends ObservableSource<? extends T>>
an ObservableSource that emits ObservableSources
sources
,
int
the maximum number of ObservableSources that may be subscribed to concurrently
maxConcurrency
)

Flattens an ObservableSource that emits ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from all of the source ObservableSources without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to these ObservableSources.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items that are emitted by the two source ObservableSources
mergeDelayError
(ObservableSource<? extends T>
an ObservableSource to be merged
source1
,
ObservableSource<? extends T>
an ObservableSource to be merged
source2
)

Flattens two ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from each of the source ObservableSources without being interrupted by an error notification from one of them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items that are emitted by the source ObservableSources
mergeDelayError
(ObservableSource<? extends T>
an ObservableSource to be merged
source1
,
ObservableSource<? extends T>
an ObservableSource to be merged
source2
,
ObservableSource<? extends T>
an ObservableSource to be merged
source3
)

Flattens three ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from all of the source ObservableSources without being interrupted by an error notification from one of them.

public static <
the common element base type
T
>
Observable<T>

Returns:

an Observable that emits all of the items that are emitted by the source ObservableSources
mergeDelayError
(ObservableSource<? extends T>
an ObservableSource to be merged
source1
,
ObservableSource<? extends T>
an ObservableSource to be merged
source2
,
ObservableSource<? extends T>
an ObservableSource to be merged
source3
,
ObservableSource<? extends T>
an ObservableSource to be merged
source4
)

Flattens four ObservableSources into one ObservableSource, in a way that allows an Observer to receive all successfully emitted items from all of the source ObservableSources without being interrupted by an error notification from one of them.

public final Observable<T>

Returns:

an Observable that emits all of the items emitted by the source ObservableSources
mergeWith
(ObservableSource<? extends T>
an ObservableSource to be merged
other
)

Flattens this and another ObservableSource into a single ObservableSource, without any transformation.

public final Observable<T>

Returns:

the new Observable instance
mergeWith
(SingleSource<? extends T>
the SingleSource whose success value to merge with
other
)

Merges the sequence of items of this Observable with the success value of the other SingleSource.

public final Observable<T>

Returns:

the new Observable instance
mergeWith
(MaybeSource<? extends T>
the MaybeSource which provides a success value to merge with or completes
other
)

Merges the sequence of items of this Observable with the success value of the other MaybeSource or waits both to complete normally if the MaybeSource is empty.

public final Observable<T>

Returns:

the new Observable instance
mergeWith
(CompletableSource
the CompletableSource to await for completion
other
)

Relays the items of this Observable and completes only when the other CompletableSource completes as well.

public static <
the type of items (not) emitted by the ObservableSource
T
>
Observable<T>

Returns:

an Observable that never emits any items or sends any notifications to an Observer
never
()

Returns an Observable that never sends any items or notifications to an Observer.

public final Observable<T>

Returns:

the source ObservableSource modified so that its Observers are notified on the specified Scheduler
observeOn
(Scheduler
the Scheduler to notify Observers on
scheduler
)

Modifies an ObservableSource to perform its emissions and notifications on a specified Scheduler, asynchronously with an unbounded buffer with Flowable#bufferSize() "island size".

public final Observable<T>

Returns:

the source ObservableSource modified so that its Observers are notified on the specified Scheduler
observeOn
(Scheduler
the Scheduler to notify Observers on
scheduler
,
boolean
indicates if the onError notification may not cut ahead of onNext notification on the other side of the scheduling boundary. If true a sequence ending in onError will be replayed in the same order as was received from upstream
delayError
)

Modifies an ObservableSource to perform its emissions and notifications on a specified Scheduler, asynchronously with an unbounded buffer with Flowable#bufferSize() "island size" and optionally delays onError notifications.

public final Observable<T>

Returns:

the source ObservableSource modified so that its Observers are notified on the specified Scheduler
observeOn
(Scheduler
the Scheduler to notify Observers on
scheduler
,
boolean
indicates if the onError notification may not cut ahead of onNext notification on the other side of the scheduling boundary. If true a sequence ending in onError will be replayed in the same order as was received from upstream
delayError
,
int
the size of the buffer.
bufferSize
)

Modifies an ObservableSource to perform its emissions and notifications on a specified Scheduler, asynchronously with an unbounded buffer of configurable "island size" and optionally delays onError notifications.

public final <
the output type
U
>
Observable<U>

Returns:

an Observable that emits items from the source ObservableSource of type clazz
ofType
(final Class<U>
the class type to filter the items emitted by the source ObservableSource
clazz
)

Filters the items emitted by an ObservableSource, only emitting those of the specified type.

public final Observable<T>

Returns:

the original ObservableSource, with appropriately modified behavior
onErrorResumeNext
(Function<? super Throwable, ? extends ObservableSource<? extends T>>
a function that returns an ObservableSource that will take over if the source ObservableSource encounters an error
resumeFunction
)

Instructs an ObservableSource to pass control to another ObservableSource rather than invoking onError if it encounters an error.

public final Observable<T>

Returns:

the original ObservableSource, with appropriately modified behavior
onErrorResumeNext
(final ObservableSource<? extends T>
the next ObservableSource source that will take over if the source ObservableSource encounters an error
next
)

Instructs an ObservableSource to pass control to another ObservableSource rather than invoking onError if it encounters an error.

public final Observable<T>

Returns:

the original ObservableSource with appropriately modified behavior
onErrorReturn
(Function<? super Throwable, ? extends T>
a function that returns a single value that will be emitted along with a regular onComplete in case the current Observable signals an onError event
valueSupplier
)

Instructs an ObservableSource to emit an item (returned by a specified function) rather than invoking onError if it encounters an error.

public final Observable<T>

Returns:

the original ObservableSource with appropriately modified behavior
onErrorReturnItem
(final T
the value that is emitted along with a regular onComplete in case the current Observable signals an exception
item
)

Instructs an ObservableSource to emit an item (returned by a specified function) rather than invoking onError if it encounters an error.

public final Observable<T>

Returns:

the original ObservableSource, with appropriately modified behavior
onExceptionResumeNext
(final ObservableSource<? extends T>
the next ObservableSource that will take over if the source ObservableSource encounters an exception
next
)

Instructs an ObservableSource to pass control to another ObservableSource rather than invoking onError if it encounters an java.lang.Exception.

public final Observable<T>

Returns:

an Observable which nulls out references to the upstream producer and downstream Observer if the sequence is terminated or downstream calls dispose()
onTerminateDetach
()

Nulls out references to the upstream producer and downstream Observer if the sequence is terminated or downstream calls dispose().

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that upon connection causes the source ObservableSource to emit items to its Observers
publish
()

Returns a ConnectableObservable, which is a variety of ObservableSource that waits until its connect method is called before it begins emitting items to those Observers that have subscribed to it.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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
(Function<? super Observable<T>, ? extends ObservableSource<R>>
a function that can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Observers to the given source will receive all notifications of the source from the time of the subscription forward.
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.

public static Observable<Integer>

Returns:

an Observable that emits a range of sequential Integers
range
(final int
the value of the first Integer in the sequence
start
,
final int
the number of sequential Integers to generate
count
)

Returns an Observable that emits a sequence of Integers within a specified range.

public static Observable<Long>

Returns:

an Observable that emits a range of sequential Longs
rangeLong
(long
the value of the first Long in the sequence
start
,
long
the number of sequential Longs to generate
count
)

Returns an Observable that emits a sequence of Longs within a specified range.

public final Maybe<T>

Returns:

a Maybe that emits a single item that is the result of accumulating the items emitted by the source ObservableSource
reduce
(BiFunction<T, T, T>
an accumulator function to be invoked on each item emitted by the source ObservableSource, whose result will be used in the next accumulator call
reducer
)

Returns a Maybe that applies a specified accumulator function to the first item emitted by a source ObservableSource, then feeds the result of that function along with the second item emitted by the source ObservableSource into the same function, and so on until all items have been emitted by the finite source ObservableSource, and emits the final result from the final call to your function as its sole item.

public final <
the accumulator and output value type
R
>
Single<R>

Returns:

a Single that emits a single item that is the result of accumulating the output from the items emitted by the source ObservableSource
reduce
(R
the initial (seed) accumulator value
seed
,
BiFunction<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the source ObservableSource, the result of which will be used in the next accumulator call
reducer
)

Returns a Single that applies a specified accumulator function to the first item emitted by a source ObservableSource and a specified seed value, then feeds the result of that function along with the second item emitted by an ObservableSource into the same function, and so on until all items have been emitted by the finite source ObservableSource, emitting the final result from the final call to your function as its sole item.

public final <
the accumulator and output value type
R
>
Single<R>

Returns:

a Single that emits a single item that is the result of accumulating the output from the items emitted by the source ObservableSource
reduceWith
(Callable<R>
the Callable that provides the initial (seed) accumulator value for each individual Observer
seedSupplier
,
BiFunction<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the source ObservableSource, the result of which will be used in the next accumulator call
reducer
)

Returns a Single that applies a specified accumulator function to the first item emitted by a source ObservableSource and a seed value derived from calling a specified seedSupplier, then feeds the result of that function along with the second item emitted by an ObservableSource into the same function, and so on until all items have been emitted by the finite source ObservableSource, emitting the final result from the final call to your function as its sole item.

public final Observable<T>

Returns:

an Observable that emits the items emitted by the source ObservableSource repeatedly and in sequence
repeat
()

Returns an Observable that repeats the sequence of items emitted by the source ObservableSource indefinitely.

public final Observable<T>

Returns:

an Observable that repeats the sequence of items emitted by the source ObservableSource at most count times
repeat
(long
the number of times the source ObservableSource items are repeated, a count of 0 will yield an empty sequence
times
)

Returns an Observable that repeats the sequence of items emitted by the source ObservableSource at most count times.

public final Observable<T>

Returns:

the new Observable instance
repeatUntil
(BooleanSupplier
a boolean supplier that is called when the current Observable completes; if it returns true, the returned Observable completes; if it returns false, the upstream Observable is resubscribed.
stop
)

Returns an Observable that repeats the sequence of items emitted by the source ObservableSource until the provided stop function returns true.

public final Observable<T>

Returns:

the source ObservableSource modified with repeat logic
repeatWhen
(final Function<? super Observable<Object>, ? extends ObservableSource<?>>
receives an ObservableSource of notifications with which a user can complete or error, aborting the repeat.
handler
)

Returns an Observable that emits the same values as the source ObservableSource with the exception of an onComplete.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that upon connection causes the source ObservableSource to emit its items to its Observers
replay
()

Returns a ConnectableObservable that shares a single subscription to the underlying ObservableSource that will replay all of its items and notifications to any future Observer.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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 ObservableSource
replay
(Function<? super Observable<T>, ? extends ObservableSource<R>>
the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the ObservableSource
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 ObservableSource.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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 ObservableSource replaying no more than bufferSize items
replay
(Function<? super Observable<T>, ? extends ObservableSource<R>>
the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the ObservableSource
selector
,
final int
the buffer size that limits the number of items the connectable ObservableSource can replay
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 ObservableSource, replaying bufferSize notifications.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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 ObservableSource, and replays no more than bufferSize items that were emitted within the window defined by time
replay
(Function<? super Observable<T>, ? extends ObservableSource<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the ObservableSource
selector
,
int
the buffer size that limits the number of items the connectable ObservableSource can replay
bufferSize
,
long
the duration of the window in which the replayed items must have been emitted
time
,
TimeUnit
the time unit of time
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 ObservableSource, replaying no more than bufferSize items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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 ObservableSource, and replays no more than bufferSize items that were emitted within the window defined by time
replay
(Function<? super Observable<T>, ? extends ObservableSource<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the ObservableSource
selector
,
final int
the buffer size that limits the number of items the connectable ObservableSource can replay
bufferSize
,
final long
the duration of the window in which the replayed items must have been emitted
time
,
final TimeUnit
the time unit of time
unit
,
final Scheduler
the Scheduler that is the time source for the window
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 ObservableSource, replaying no more than bufferSize items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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 ObservableSource, replaying no more than bufferSize notifications
replay
(final Function<? super Observable<T>, ? extends ObservableSource<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the ObservableSource
selector
,
final int
the buffer size that limits the number of items the connectable ObservableSource can replay
bufferSize
,
final Scheduler
the Scheduler on which the replay is observed
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 ObservableSource, replaying a maximum of bufferSize items.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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 ObservableSource, replaying all items that were emitted within the window defined by time
replay
(Function<? super Observable<T>, ? extends ObservableSource<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the ObservableSource
selector
,
long
the duration of the window in which the replayed items must have been emitted
time
,
TimeUnit
the time unit of time
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 ObservableSource, replaying all items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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 ObservableSource, replaying all items that were emitted within the window defined by time
replay
(Function<? super Observable<T>, ? extends ObservableSource<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the ObservableSource
selector
,
final long
the duration of the window in which the replayed items must have been emitted
time
,
final TimeUnit
the time unit of time
unit
,
final Scheduler
the scheduler that is the time source for the window
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 ObservableSource, replaying all items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

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 ObservableSource, replaying all items
replay
(final Function<? super Observable<T>, ? extends ObservableSource<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the ObservableSource
selector
,
final Scheduler
the Scheduler where the replay is observed
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 ObservableSource.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source ObservableSource and replays at most bufferSize items emitted by that ObservableSource
replay
(final int
the buffer size that limits the number of items that can be replayed
bufferSize
)

Returns a ConnectableObservable that shares a single subscription to the source ObservableSource that replays at most bufferSize items emitted by that ObservableSource.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source ObservableSource and replays at most bufferSize items that were emitted during the window defined by time
replay
(int
the buffer size that limits the number of items that can be replayed
bufferSize
,
long
the duration of the window in which the replayed items must have been emitted
time
,
TimeUnit
the time unit of time
unit
)

Returns a ConnectableObservable that shares a single subscription to the source ObservableSource and replays at most bufferSize items that were emitted during a specified time window.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source ObservableSource and replays at most bufferSize items that were emitted during the window defined by time
replay
(final int
the buffer size that limits the number of items that can be replayed
bufferSize
,
final long
the duration of the window in which the replayed items must have been emitted
time
,
final TimeUnit
the time unit of time
unit
,
final Scheduler
the scheduler that is used as a time source for the window
scheduler
)

Returns a ConnectableObservable that shares a single subscription to the source ObservableSource and that replays a maximum of bufferSize items that are emitted within a specified time window.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source ObservableSource and replays at most bufferSize items that were emitted by the ObservableSource
replay
(final int
the buffer size that limits the number of items that can be replayed
bufferSize
,
final Scheduler
the scheduler on which the Observers will observe the emitted items
scheduler
)

Returns a ConnectableObservable that shares a single subscription to the source ObservableSource and replays at most bufferSize items emitted by that ObservableSource.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source ObservableSource and replays the items that were emitted during the window defined by time
replay
(long
the duration of the window in which the replayed items must have been emitted
time
,
TimeUnit
the time unit of time
unit
)

Returns a ConnectableObservable that shares a single subscription to the source ObservableSource and replays all items emitted by that ObservableSource within a specified time window.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source ObservableSource and replays the items that were emitted during the window defined by time
replay
(final long
the duration of the window in which the replayed items must have been emitted
time
,
final TimeUnit
the time unit of time
unit
,
final Scheduler
the Scheduler that is the time source for the window
scheduler
)

Returns a ConnectableObservable that shares a single subscription to the source ObservableSource and replays all items emitted by that ObservableSource within a specified time window.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source ObservableSource that will replay all of its items and notifications to any future Observer on the given Scheduler
replay
(final Scheduler
the Scheduler on which the Observers will observe the emitted items
scheduler
)

Returns a ConnectableObservable that shares a single subscription to the source ObservableSource that will replay all of its items and notifications to any future Observer on the given Scheduler.

public final Observable<T>

Returns:

the source ObservableSource modified with retry logic
retry
()

Returns an Observable that mirrors the source ObservableSource, resubscribing to it if it calls onError (infinite retry count).

public final Observable<T>

Returns:

the source ObservableSource modified with retry logic
retry
(BiPredicate<? super Integer, ? super Throwable>
the predicate that determines if a resubscription may happen in case of a specific exception and retry count
predicate
)

Returns an Observable that mirrors the source ObservableSource, resubscribing to it if it calls onError and the predicate returns true for that specific exception and retry count.

public final Observable<T>

Returns:

the source ObservableSource modified with retry logic
retry
(long
the number of times to resubscribe if the current Observable fails
times
)

Returns an Observable that mirrors the source ObservableSource, resubscribing to it if it calls onError up to a specified number of retries.

public final Observable<T>

Returns:

the new Observable instance
retry
(long
the number of times to resubscribe if the current Observable fails
times
,
Predicate<? super Throwable>
the predicate called with the failure Throwable and should return true to trigger a retry.
predicate
)

Retries at most times or until the predicate returns false, whichever happens first.

public final Observable<T>

Returns:

the new Observable instance
retry
(Predicate<? super Throwable>
the predicate that receives the failure Throwable and should return true to trigger a retry.
predicate
)

Retries the current Observable if the predicate returns true.

public final Observable<T>

Returns:

the new Observable instance
retryUntil
(final BooleanSupplier
the function that should return true to stop retrying
stop
)

Retries until the given stop function returns true.

public final Observable<T>

Returns:

the source ObservableSource modified with retry logic
retryWhen
(final Function<? super Observable<Throwable>, ? extends ObservableSource<?>>
receives an ObservableSource of notifications with which a user can complete or error, aborting the retry
handler
)

Returns an Observable that emits the same values as the source ObservableSource with the exception of an onError.

public final void
safeSubscribe(Observer<? super T>
the incoming Observer instance
observer
)

Subscribes to the current Observable and wraps the given Observer into a SafeObserver (if not already a SafeObserver) that deals with exceptions thrown by a misbehaving Observer (that doesn't follow the Reactive Streams specification).

public final Observable<T>

Returns:

an Observable that emits the results of sampling the items emitted by the source ObservableSource at the specified time interval
sample
(long
the sampling rate
period
,
TimeUnit
the TimeUnit in which period is defined
unit
)

Returns an Observable that emits the most recently emitted item (if any) emitted by the source ObservableSource within periodic time intervals.

public final Observable<T>

Returns:

an Observable that emits the results of sampling the items emitted by the source ObservableSource at the specified time interval
sample
(long
the sampling rate
period
,
TimeUnit
the TimeUnit in which period is defined
unit
,
boolean
if true and the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion if false, an unsampled last item is ignored.
emitLast
)

Returns an Observable that emits the most recently emitted item (if any) emitted by the source ObservableSource within periodic time intervals and optionally emit the very last upstream item when the upstream completes.

public final Observable<T>

Returns:

an Observable that emits the results of sampling the items emitted by the source ObservableSource at the specified time interval
sample
(long
the sampling rate
period
,
TimeUnit
the TimeUnit in which period is defined
unit
,
Scheduler
the Scheduler to use when sampling
scheduler
)

Returns an Observable that emits the most recently emitted item (if any) emitted by the source ObservableSource within periodic time intervals, where the intervals are defined on a particular Scheduler.

public final Observable<T>

Returns:

an Observable that emits the results of sampling the items emitted by the source ObservableSource at the specified time interval
sample
(long
the sampling rate
period
,
TimeUnit
the TimeUnit in which period is defined
unit
,
Scheduler
the Scheduler to use when sampling
scheduler
,
boolean
if true and the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion if false, an unsampled last item is ignored.
emitLast
)

Returns an Observable that emits the most recently emitted item (if any) emitted by the source ObservableSource within periodic time intervals, where the intervals are defined on a particular Scheduler and optionally emit the very last upstream item when the upstream completes.

public final <
the element type of the sampler ObservableSource
U
>
Observable<T>

Returns:

an Observable that emits the results of sampling the items emitted by this ObservableSource whenever the sampler ObservableSource emits an item or completes
sample
(ObservableSource<U>
the ObservableSource to use for sampling the source ObservableSource
sampler
)

Returns an Observable that, when the specified sampler ObservableSource emits an item or completes, emits the most recently emitted item (if any) emitted by the source ObservableSource since the previous emission from the sampler ObservableSource.

public final <
the element type of the sampler ObservableSource
U
>
Observable<T>

Returns:

an Observable that emits the results of sampling the items emitted by this ObservableSource whenever the sampler ObservableSource emits an item or completes
sample
(ObservableSource<U>
the ObservableSource to use for sampling the source ObservableSource
sampler
,
boolean
if true and the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion if false, an unsampled last item is ignored.
emitLast
)

Returns an Observable that, when the specified sampler ObservableSource emits an item or completes, emits the most recently emitted item (if any) emitted by the source ObservableSource since the previous emission from the sampler ObservableSource and optionally emit the very last upstream item when the upstream or other ObservableSource complete.

public final Observable<T>

Returns:

an Observable that emits the results of each call to the accumulator function
scan
(BiFunction<T, T, T>
an accumulator function to be invoked on each item emitted by the source ObservableSource, whose result will be emitted to Observers via onNext and used in the next accumulator call
accumulator
)

Returns an Observable that applies a specified accumulator function to the first item emitted by a source ObservableSource, then feeds the result of that function along with the second item emitted by the source ObservableSource into the same function, and so on until all items have been emitted by the source ObservableSource, emitting the result of each of these iterations.

public final <
the initial, accumulator and result type
R
>
Observable<R>

Returns:

an Observable that emits initialValue followed by the results of each call to the accumulator function
scan
(final R
the initial (seed) accumulator item
initialValue
,
BiFunction<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the source ObservableSource, whose result will be emitted to Observers via onNext and used in the next accumulator call
accumulator
)

Returns an Observable that applies a specified accumulator function to the first item emitted by a source ObservableSource and a seed value, then feeds the result of that function along with the second item emitted by the source ObservableSource into the same function, and so on until all items have been emitted by the source ObservableSource, emitting the result of each of these iterations.

public final <
the initial, accumulator and result type
R
>
Observable<R>

Returns:

an Observable that emits initialValue followed by the results of each call to the accumulator function
scanWith
(Callable<R>
a Callable that returns the initial (seed) accumulator item for each individual Observer
seedSupplier
,
BiFunction<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the source ObservableSource, whose result will be emitted to Observers via onNext and used in the next accumulator call
accumulator
)

Returns an Observable that applies a specified accumulator function to the first item emitted by a source ObservableSource and a seed value, then feeds the result of that function along with the second item emitted by the source ObservableSource into the same function, and so on until all items have been emitted by the source ObservableSource, emitting the result of each of these iterations.

public static <
the type of items emitted by each ObservableSource
T
>
Single<Boolean>

Returns:

a Single that emits a Boolean value that indicates whether the two sequences are the same
sequenceEqual
(ObservableSource<? extends T>
the first ObservableSource to compare
source1
,
ObservableSource<? extends T>
the second ObservableSource to compare
source2
)

Returns a Single that emits a Boolean value that indicates whether two ObservableSource sequences are the same by comparing the items emitted by each ObservableSource pairwise.

public static <
the type of items emitted by each ObservableSource
T
>
Single<Boolean>

Returns:

a Single that emits a Boolean value that indicates whether the two ObservableSource two sequences are the same according to the specified function
sequenceEqual
(ObservableSource<? extends T>
the first ObservableSource to compare
source1
,
ObservableSource<? extends T>
the second ObservableSource to compare
source2
,
BiPredicate<? super T, ? super T>
a function used to compare items emitted by each ObservableSource
isEqual
)

Returns a Single that emits a Boolean value that indicates whether two ObservableSource sequences are the same by comparing the items emitted by each ObservableSource pairwise based on the results of a specified equality function.

public static <
the type of items emitted by each ObservableSource
T
>
Single<Boolean>

Returns:

an Observable that emits a Boolean value that indicates whether the two ObservableSource two sequences are the same according to the specified function
sequenceEqual
(ObservableSource<? extends T>
the first ObservableSource to compare
source1
,
ObservableSource<? extends T>
the second ObservableSource to compare
source2
,
BiPredicate<? super T, ? super T>
a function used to compare items emitted by each ObservableSource
isEqual
,
int
the number of items to prefetch from the first and second source ObservableSource
bufferSize
)

Returns a Single that emits a Boolean value that indicates whether two ObservableSource sequences are the same by comparing the items emitted by each ObservableSource pairwise based on the results of a specified equality function.

public static <
the type of items emitted by each ObservableSource
T
>
Single<Boolean>

Returns:

a Single that emits a Boolean value that indicates whether the two sequences are the same
sequenceEqual
(ObservableSource<? extends T>
the first ObservableSource to compare
source1
,
ObservableSource<? extends T>
the second ObservableSource to compare
source2
,
int
the number of items to prefetch from the first and second source ObservableSource
bufferSize
)

Returns a Single that emits a Boolean value that indicates whether two ObservableSource sequences are the same by comparing the items emitted by each ObservableSource pairwise.

public final Observable<T>

Returns:

an ObservableSource that is guaranteed to be well-behaved and to make only serialized calls to its observers
serialize
()

Forces an ObservableSource's emissions and notifications to be serialized and for it to obey the ObservableSource contract in other ways.

public final Observable<T>

Returns:

an ObservableSource that upon connection causes the source ObservableSource to emit items to its Observers
share
()

Returns a new ObservableSource that multicasts (and shares a single subscription to) the original ObservableSource.

public final Single<T>

Returns:

the new Single instance
single
(T
a default value to emit if the source ObservableSource emits no item
defaultItem
)

Returns a Single that emits the single item emitted by this Observable, if this Observable emits only a single item, or a default item if the source ObservableSource emits no items.

public final Maybe<T>

Returns:

a Maybe that emits the single item emitted by the source ObservableSource
singleElement
()

Returns a Maybe that completes if this Observable is empty or emits the single item emitted by this Observable, or signals an IllegalArgumentException if this Observable emits more than one item.

public final Single<T>

Returns:

the new Single instance
singleOrError
()

Returns a Single that emits the single item emitted by this Observable if this Observable emits only a single item, otherwise if this Observable completes without emitting any items or emits more than one item a NoSuchElementException or IllegalArgumentException will be signalled respectively.

public final Observable<T>

Returns:

an Observable that is identical to the source ObservableSource except that it does not emit the first count items that the source ObservableSource emits
skip
(long
the number of items to skip
count
)

Returns an Observable that skips the first count items emitted by the source ObservableSource and emits the remainder.

public final Observable<T>

Returns:

an Observable that skips values emitted by the source ObservableSource before the time window defined by time elapses and the emits the remainder
skip
(long
the length of the time window to skip
time
,
TimeUnit
the time unit of time
unit
)

Returns an Observable that skips values emitted by the source ObservableSource before a specified time window elapses.

public final Observable<T>

Returns:

an Observable that skips values emitted by the source ObservableSource before the time window defined by time and scheduler elapses, and then emits the remainder
skip
(long
the length of the time window to skip
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler on which the timed wait happens
scheduler
)

Returns an Observable that skips values emitted by the source ObservableSource before a specified time window on a specified Scheduler elapses.

public final Observable<T>

Returns:

an Observable that emits the items emitted by the source ObservableSource except for the dropped ones at the end
skipLast
(int
number of items to drop from the end of the source sequence
count
)

Returns an Observable that drops a specified number of items from the end of the sequence emitted by the source ObservableSource.

public final Observable<T>

Returns:

an Observable that drops those items emitted by the source ObservableSource in a time window before the source completes defined by time
skipLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
)

Returns an Observable that drops items emitted by the source ObservableSource during a specified time window before the source completes.

public final Observable<T>

Returns:

an Observable that drops those items emitted by the source ObservableSource in a time window before the source completes defined by time
skipLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
boolean
if true, an exception signalled by the current Observable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signalled and all regular elements dropped
delayError
)

Returns an Observable that drops items emitted by the source ObservableSource during a specified time window before the source completes.

public final Observable<T>

Returns:

an Observable that drops those items emitted by the source ObservableSource in a time window before the source completes defined by time and scheduler
skipLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the scheduler used as the time source
scheduler
)

Returns an Observable that drops items emitted by the source ObservableSource during a specified time window (defined on a specified scheduler) before the source completes.

public final Observable<T>

Returns:

an Observable that drops those items emitted by the source ObservableSource in a time window before the source completes defined by time and scheduler
skipLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the scheduler used as the time source
scheduler
,
boolean
if true, an exception signalled by the current Observable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signalled and all regular elements dropped
delayError
)

Returns an Observable that drops items emitted by the source ObservableSource during a specified time window (defined on a specified scheduler) before the source completes.

public final Observable<T>

Returns:

an Observable that drops those items emitted by the source ObservableSource in a time window before the source completes defined by time and scheduler
skipLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the scheduler used as the time source
scheduler
,
boolean
if true, an exception signalled by the current Observable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signalled and all regular elements dropped
delayError
,
int
the hint about how many elements to expect to be skipped
bufferSize
)

Returns an Observable that drops items emitted by the source ObservableSource during a specified time window (defined on a specified scheduler) before the source completes.

public final <
the element type of the other ObservableSource
U
>
Observable<T>

Returns:

an Observable that skips items from the source ObservableSource until the second ObservableSource emits an item, then emits the remaining items
skipUntil
(ObservableSource<U>
the second ObservableSource that has to emit an item before the source ObservableSource's elements begin to be mirrored by the resulting ObservableSource
other
)

Returns an Observable that skips items emitted by the source ObservableSource until a second ObservableSource emits an item.

public final Observable<T>

Returns:

an Observable that begins emitting items emitted by the source ObservableSource when the specified predicate becomes false
skipWhile
(Predicate<? super T>
a function to test each item emitted from the source ObservableSource
predicate
)

Returns an Observable that skips all items emitted by the source ObservableSource as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.

public final Observable<T>

Returns:

an Observable that emits the items emitted by the source ObservableSource in sorted order
sorted
()

Returns an Observable that emits the events emitted by source ObservableSource, in a sorted order.

public final Observable<T>

Returns:

an Observable that emits the items emitted by the source ObservableSource in sorted order
sorted
(Comparator<? super T>
a function that compares two items emitted by the source ObservableSource and returns an Integer that indicates their sort order
sortFunction
)

Returns an Observable that emits the events emitted by source ObservableSource, in a sorted order based on a specified comparison function.

public final Observable<T>

Returns:

an Observable that emits the items in the specified Iterable and then emits the items emitted by the source ObservableSource
startWith
(Iterable<? extends T>
an Iterable that contains the items you want the modified ObservableSource to emit first
items
)

Returns an Observable that emits the items in a specified Iterable before it begins to emit items emitted by the source ObservableSource.

public final Observable<T>

Returns:

an Observable that emits the items in the specified ObservableSource and then emits the items emitted by the source ObservableSource
startWith
(ObservableSource<? extends T>
an ObservableSource that contains the items you want the modified ObservableSource to emit first
other
)

Returns an Observable that emits the items in a specified ObservableSource before it begins to emit items emitted by the source ObservableSource.

public final Observable<T>

Returns:

an Observable that emits the specified item before it begins to emit items emitted by the source ObservableSource
startWith
(T
the item to emit first
item
)

Returns an Observable that emits a specified item before it begins to emit items emitted by the source ObservableSource.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source ObservableSource
startWithArray
(T...
the array of values to emit first
items
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source ObservableSource.

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the ObservableSource has finished sending them
subscribe
()

Subscribes to an ObservableSource and ignores onNext and onComplete emissions.

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the ObservableSource has finished sending them
subscribe
(Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the ObservableSource
onNext
)

Subscribes to an ObservableSource and provides a callback to handle the items it emits.

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the ObservableSource has finished sending them
subscribe
(Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the ObservableSource
onNext
,
Consumer<? super Throwable>
the Consumer<Throwable> you have designed to accept any error notification from the ObservableSource
onError
)

Subscribes to an ObservableSource and provides callbacks to handle the items it emits and any error notification it issues.

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the ObservableSource has finished sending them
subscribe
(Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the ObservableSource
onNext
,
Consumer<? super Throwable>
the Consumer<Throwable> you have designed to accept any error notification from the ObservableSource
onError
,
Action
the Action you have designed to accept a completion notification from the ObservableSource
onComplete
)

Subscribes to an ObservableSource and provides callbacks to handle the items it emits and any error or completion notification it issues.

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the ObservableSource has finished sending them
subscribe
(Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the ObservableSource
onNext
,
Consumer<? super Throwable>
the Consumer<Throwable> you have designed to accept any error notification from the ObservableSource
onError
,
Action
the Action you have designed to accept a completion notification from the ObservableSource
onComplete
,
Consumer<? super Disposable>
the Consumer that receives the upstream's Disposable
onSubscribe
)

Subscribes to an ObservableSource and provides callbacks to handle the items it emits and any error or completion notification it issues.

public final void
subscribe(Observer<? super T>
the Observer, not null
observer
)

Implements io.reactivex.ObservableSource.subscribe.

Subscribes the given Observer to this ObservableSource instance.
protected abstract void
subscribeActual(Observer<? super T>
the incoming Observer, never null
observer
)

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Observers.

public final Observable<T>

Returns:

the source ObservableSource modified so that its subscriptions happen on the specified Scheduler
subscribeOn
(Scheduler
the Scheduler to perform subscription actions on
scheduler
)

Asynchronously subscribes Observers to this ObservableSource on the specified Scheduler.

public final <
the type of the Observer to use and return
E extends Observer<? super T>
>
E

Returns:

the input observer
subscribeWith
(E
the Observer (subclass) to use and return, not null
observer
)

Subscribes a given Observer (subclass) to this Observable and returns the given Observer as is.

public final Observable<T>

Returns:

an ObservableSource that emits the items emitted by the source ObservableSource or the items of an alternate ObservableSource if the source ObservableSource is empty.
switchIfEmpty
(ObservableSource<? extends T>
the alternate ObservableSource to subscribe to if the source does not emit any items
other
)

Returns an Observable that emits the items emitted by the source ObservableSource or the items of an alternate ObservableSource if the source ObservableSource is empty.

public final <
the element type of the inner ObservableSources and the output
R
>
Observable<R>

Returns:

an Observable that emits the items emitted by the ObservableSource returned from applying func to the most recently emitted item emitted by the source ObservableSource
switchMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
)

Returns a new ObservableSource by applying a function that you supply to each item emitted by the source ObservableSource that returns an ObservableSource, and then emitting the items emitted by the most recently emitted of these ObservableSources.

public final <
the element type of the inner ObservableSources and the output
R
>
Observable<R>

Returns:

an Observable that emits the items emitted by the ObservableSource returned from applying func to the most recently emitted item emitted by the source ObservableSource
switchMap
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
,
int
the number of elements to prefetch from the current active inner ObservableSource
bufferSize
)

Returns a new ObservableSource by applying a function that you supply to each item emitted by the source ObservableSource that returns an ObservableSource, and then emitting the items emitted by the most recently emitted of these ObservableSources.

public final Completable

Returns:

the new Completable instance
switchMapCompletable
(Function<? super T, ? extends CompletableSource>
the function called with each upstream item and should return a CompletableSource to be subscribed to and awaited for (non blockingly) for its terminal event
mapper
)

Maps the upstream values into CompletableSources, subscribes to the newer one while disposing the subscription to the previous CompletableSource, thus keeping at most one active CompletableSource running.

public final Completable

Returns:

the new Completable instance
switchMapCompletableDelayError
(Function<? super T, ? extends CompletableSource>
the function called with each upstream item and should return a CompletableSource to be subscribed to and awaited for (non blockingly) for its terminal event
mapper
)

Maps the upstream values into CompletableSources, subscribes to the newer one while disposing the subscription to the previous CompletableSource, thus keeping at most one active CompletableSource running and delaying any main or inner errors until all of them terminate.

public final <
the element type of the inner ObservableSources and the output
R
>
Observable<R>

Returns:

an Observable that emits the items emitted by the ObservableSource returned from applying func to the most recently emitted item emitted by the source ObservableSource
switchMapDelayError
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
)

Returns a new ObservableSource by applying a function that you supply to each item emitted by the source ObservableSource that returns an ObservableSource, and then emitting the items emitted by the most recently emitted of these ObservableSources and delays any error until all ObservableSources terminate.

public final <
the element type of the inner ObservableSources and the output
R
>
Observable<R>

Returns:

an Observable that emits the items emitted by the ObservableSource returned from applying func to the most recently emitted item emitted by the source ObservableSource
switchMapDelayError
(Function<? super T, ? extends ObservableSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns an ObservableSource
mapper
,
int
the number of elements to prefetch from the current active inner ObservableSource
bufferSize
)

Returns a new ObservableSource by applying a function that you supply to each item emitted by the source ObservableSource that returns an ObservableSource, and then emitting the items emitted by the most recently emitted of these ObservableSources and delays any error until all ObservableSources terminate.

public final <
the output value type
R
>
Observable<R>

Returns:

the new Observable instance
switchMapMaybe
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the current upstream event and should return a MaybeSource to replace the current active inner source and get subscribed to.
mapper
)

Maps the upstream items into MaybeSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one if available while failing immediately if this Observable or any of the active inner MaybeSources fail.

public final <
the output value type
R
>
Observable<R>

Returns:

the new Observable instance
switchMapMaybeDelayError
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the current upstream event and should return a MaybeSource to replace the current active inner source and get subscribed to.
mapper
)

Maps the upstream items into MaybeSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one if available, delaying errors from this Observable or the inner MaybeSources until all terminate.

public final <
the element type of the inner SingleSources and the output
R
>
Observable<R>

Returns:

an Observable that emits the item emitted by the SingleSource returned from applying func to the most recently emitted item emitted by the source ObservableSource
switchMapSingle
(Function<? super T, ? extends SingleSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns a SingleSource
mapper
)

Returns a new ObservableSource by applying a function that you supply to each item emitted by the source ObservableSource that returns a SingleSource, and then emitting the item emitted by the most recently emitted of these SingleSources.

public final <
the element type of the inner SingleSources and the output
R
>
Observable<R>

Returns:

an Observable that emits the item emitted by the SingleSource returned from applying func to the most recently emitted item emitted by the source ObservableSource
switchMapSingleDelayError
(Function<? super T, ? extends SingleSource<? extends R>>
a function that, when applied to an item emitted by the source ObservableSource, returns a SingleSource
mapper
)

Returns a new ObservableSource by applying a function that you supply to each item emitted by the source ObservableSource that returns a SingleSource, and then emitting the item emitted by the most recently emitted of these SingleSources and delays any error until all SingleSources terminate.

public static <
the item type
T
>
Observable<T>

Returns:

an Observable that emits the items emitted by the ObservableSource most recently emitted by the source ObservableSource
switchOnNext
(ObservableSource<? extends ObservableSource<? extends T>>
the source ObservableSource that emits ObservableSources
sources
,
int
the number of items to prefetch from the inner ObservableSources
bufferSize
)

Converts an ObservableSource that emits ObservableSources into an ObservableSource that emits the items emitted by the most recently emitted of those ObservableSources.

public static <
the item type
T
>
Observable<T>

Returns:

an Observable that emits the items emitted by the ObservableSource most recently emitted by the source ObservableSource
switchOnNext
(ObservableSource<? extends ObservableSource<? extends T>>
the source ObservableSource that emits ObservableSources
sources
)

Converts an ObservableSource that emits ObservableSources into an ObservableSource that emits the items emitted by the most recently emitted of those ObservableSources.

public static <
the item type
T
>
Observable<T>

Returns:

an Observable that emits the items emitted by the ObservableSource most recently emitted by the source ObservableSource
switchOnNextDelayError
(ObservableSource<? extends ObservableSource<? extends T>>
the source ObservableSource that emits ObservableSources
sources
)

Converts an ObservableSource that emits ObservableSources into an ObservableSource that emits the items emitted by the most recently emitted of those ObservableSources and delays any exception until all ObservableSources terminate.

public static <
the item type
T
>
Observable<T>

Returns:

an Observable that emits the items emitted by the ObservableSource most recently emitted by the source ObservableSource
switchOnNextDelayError
(ObservableSource<? extends ObservableSource<? extends T>>
the source ObservableSource that emits ObservableSources
sources
,
int
the number of items to prefetch from the inner ObservableSources
prefetch
)

Converts an ObservableSource that emits ObservableSources into an ObservableSource that emits the items emitted by the most recently emitted of those ObservableSources and delays any exception until all ObservableSources terminate.

public final Observable<T>

Returns:

an Observable that emits only the first count items emitted by the source ObservableSource, or all of the items from the source ObservableSource if that ObservableSource emits fewer than count items
take
(long
the maximum number of items to emit
count
)

Returns an Observable that emits only the first count items emitted by the source ObservableSource.

public final Observable<T>

Returns:

an Observable that emits those items emitted by the source ObservableSource before the time runs out
take
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
)

Returns an Observable that emits those items emitted by source ObservableSource before a specified time runs out.

public final Observable<T>

Returns:

an Observable that emits those items emitted by the source ObservableSource before the time runs out, according to the specified Scheduler
take
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler used for time source
scheduler
)

Returns an Observable that emits those items emitted by source ObservableSource before a specified time (on a specified Scheduler) runs out.

public final Observable<T>

Returns:

an Observable that emits at most the last count items emitted by the source ObservableSource
takeLast
(int
the maximum number of items to emit from the end of the sequence of items emitted by the source ObservableSource
count
)

Returns an Observable that emits at most the last count items emitted by the source ObservableSource.

public final Observable<T>

Returns:

an Observable that emits at most count items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
)

Returns an Observable that emits at most a specified number of items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed.

public final Observable<T>

Returns:

an Observable that emits at most count items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed, where the timing information is provided by the given scheduler
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the observed items
scheduler
)

Returns an Observable that emits at most a specified number of items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed, where the timing information is provided by a given Scheduler.

public final Observable<T>

Returns:

an Observable that emits at most count items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed, where the timing information is provided by the given scheduler
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the observed items
scheduler
,
boolean
if true, an exception signalled by the current Observable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signalled and all regular elements dropped
delayError
,
int
the hint about how many elements to expect to be last
bufferSize
)

Returns an Observable that emits at most a specified number of items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed, where the timing information is provided by a given Scheduler.

public final Observable<T>

Returns:

an Observable that emits the items from the source ObservableSource that were emitted in the window of time before the ObservableSource completed specified by time
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
)

Returns an Observable that emits the items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed.

public final Observable<T>

Returns:

an Observable that emits the items from the source ObservableSource that were emitted in the window of time before the ObservableSource completed specified by time
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
boolean
if true, an exception signalled by the current Observable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signalled and all regular elements dropped
delayError
)

Returns an Observable that emits the items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed.

public final Observable<T>

Returns:

an Observable that emits the items from the source ObservableSource that were emitted in the window of time before the ObservableSource completed specified by time, where the timing information is provided by scheduler
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the Observed items
scheduler
)

Returns an Observable that emits the items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed, where the timing information is provided by a specified Scheduler.

public final Observable<T>

Returns:

an Observable that emits the items from the source ObservableSource that were emitted in the window of time before the ObservableSource completed specified by time, where the timing information is provided by scheduler
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the Observed items
scheduler
,
boolean
if true, an exception signalled by the current Observable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signalled and all regular elements dropped
delayError
)

Returns an Observable that emits the items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed, where the timing information is provided by a specified Scheduler.

public final Observable<T>

Returns:

an Observable that emits the items from the source ObservableSource that were emitted in the window of time before the ObservableSource completed specified by time, where the timing information is provided by scheduler
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the Observed items
scheduler
,
boolean
if true, an exception signalled by the current Observable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signalled and all regular elements dropped
delayError
,
int
the hint about how many elements to expect to be last
bufferSize
)

Returns an Observable that emits the items from the source ObservableSource that were emitted in a specified window of time before the ObservableSource completed, where the timing information is provided by a specified Scheduler.

public final <
the type of items emitted by other
U
>
Observable<T>

Returns:

an Observable that emits the items emitted by the source Observable until such time as other emits its first item
takeUntil
(ObservableSource<U>
the ObservableSource whose first emitted item will cause takeUntil to stop emitting items from the source Observable
other
)

Returns an Observable that emits the items emitted by the source Observable until a second ObservableSource emits an item.

public final Observable<T>

Returns:

an Observable that first emits items emitted by the source Observable, checks the specified condition after each item, and then completes when the condition is satisfied.
takeUntil
(Predicate<? super T>
a function that evaluates an item emitted by the source Observable and returns a Boolean
stopPredicate
)

Returns an Observable that emits items emitted by the source Observable, checks the specified predicate for each item, and then completes when the condition is satisfied.

public final Observable<T>

Returns:

an Observable that emits the items from the source ObservableSource so long as each item satisfies the condition defined by predicate, then completes
takeWhile
(Predicate<? super T>
a function that evaluates an item emitted by the source ObservableSource and returns a Boolean
predicate
)

Returns an Observable that emits items emitted by the source ObservableSource so long as each item satisfied a specified condition, and then completes as soon as this condition is not satisfied.

public final TestObserver<T>

Returns:

the new TestObserver instance
test
()

Creates a TestObserver and subscribes it to this Observable.

public final TestObserver<T>

Returns:

the new TestObserver instance
test
(boolean
dispose the TestObserver before it is subscribed to this Observable?
dispose
)

Creates a TestObserver, optionally disposes it and then subscribes it to this Observable.

public final Observable<T>

Returns:

an Observable that performs the throttle operation
throttleFirst
(long
time to wait before emitting another item after emitting the last item
windowDuration
,
TimeUnit
the unit of time of windowDuration
unit
)

Returns an Observable that emits only the first item emitted by the source ObservableSource during sequential time windows of a specified duration.

public final Observable<T>

Returns:

an Observable that performs the throttle operation
throttleFirst
(long
time to wait before emitting another item after emitting the last item
skipDuration
,
TimeUnit
the unit of time of skipDuration
unit
,
Scheduler
the Scheduler to use internally to manage the timers that handle timeout for each event
scheduler
)

Returns an Observable that emits only the first item emitted by the source ObservableSource during sequential time windows of a specified duration, where the windows are managed by a specified Scheduler.

public final Observable<T>

Returns:

an Observable that performs the throttle operation
throttleLast
(long
duration of windows within which the last item emitted by the source ObservableSource will be emitted
intervalDuration
,
TimeUnit
the unit of time of intervalDuration
unit
)

Returns an Observable that emits only the last item emitted by the source ObservableSource during sequential time windows of a specified duration.

public final Observable<T>

Returns:

an Observable that performs the throttle operation
throttleLast
(long
duration of windows within which the last item emitted by the source ObservableSource will be emitted
intervalDuration
,
TimeUnit
the unit of time of intervalDuration
unit
,
Scheduler
the Scheduler to use internally to manage the timers that handle timeout for each event
scheduler
)

Returns an Observable that emits only the last item emitted by the source ObservableSource during sequential time windows of a specified duration, where the duration is governed by a specified Scheduler.

public final Observable<T>

Returns:

the new Observable instance
throttleLatest
(long
the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream again
timeout
,
TimeUnit
the time unit
unit
)

Throttles items from the upstream Observable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.

public final Observable<T>

Returns:

the new Observable instance
throttleLatest
(long
the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream again
timeout
,
TimeUnit
the time unit
unit
,
boolean
If true, the very last item from the upstream will be emitted immediately when the upstream completes, regardless if there is a timeout window active or not. If false, the very last upstream item is ignored and the flow terminates.
emitLast
)

Throttles items from the upstream Observable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.

public final Observable<T>

Returns:

the new Observable instance
throttleLatest
(long
the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream again
timeout
,
TimeUnit
the time unit
unit
,
Scheduler
the Scheduler where the timed wait and latest item emission will be performed
scheduler
)

Throttles items from the upstream Observable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.

public final Observable<T>

Returns:

the new Observable instance
throttleLatest
(long
the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream again
timeout
,
TimeUnit
the time unit
unit
,
Scheduler
the Scheduler where the timed wait and latest item emission will be performed
scheduler
,
boolean
If true, the very last item from the upstream will be emitted immediately when the upstream completes, regardless if there is a timeout window active or not. If false, the very last upstream item is ignored and the flow terminates.
emitLast
)

Throttles items from the upstream Observable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.

public final Observable<T>

Returns:

an Observable that filters out items from the source ObservableSource that are too quickly followed by newer items
throttleWithTimeout
(long
the length of the window of time that must pass after the emission of an item from the source ObservableSource in which that ObservableSource emits no items in order for the item to be emitted by the resulting ObservableSource
timeout
,
TimeUnit
the unit of time for the specified timeout
unit
)

Returns an Observable that mirrors the source ObservableSource, except that it drops items emitted by the source ObservableSource that are followed by newer items before a timeout value expires.

public final Observable<T>

Returns:

an Observable that filters out items from the source ObservableSource that are too quickly followed by newer items
throttleWithTimeout
(long
the length of the window of time that must pass after the emission of an item from the source ObservableSource in which that ObservableSource emits no items in order for the item to be emitted by the resulting ObservableSource
timeout
,
TimeUnit
the unit of time for the specified timeout
unit
,
Scheduler
the Scheduler to use internally to manage the timers that handle the timeout for each item
scheduler
)

Returns an Observable that mirrors the source ObservableSource, except that it drops items emitted by the source ObservableSource that are followed by newer items before a timeout value expires on a specified Scheduler.

public final Observable<Timed<T>>

Returns:

an Observable that emits time interval information items
timeInterval
()

Returns an Observable that emits records of the time interval between consecutive items emitted by the source ObservableSource.

public final Observable<Timed<T>>

Returns:

an Observable that emits time interval information items
timeInterval
(Scheduler
the Scheduler used to compute time intervals
scheduler
)

Returns an Observable that emits records of the time interval between consecutive items emitted by the source ObservableSource, where this interval is computed on a specified Scheduler.

public final Observable<Timed<T>>

Returns:

an Observable that emits time interval information items
timeInterval
(TimeUnit
the time unit for the current time
unit
)

Returns an Observable that emits records of the time interval between consecutive items emitted by the source ObservableSource.

public final Observable<Timed<T>>

Returns:

an Observable that emits time interval information items
timeInterval
(TimeUnit
the time unit for the current time
unit
,
Scheduler
the Scheduler used to compute time intervals
scheduler
)

Returns an Observable that emits records of the time interval between consecutive items emitted by the source ObservableSource, where this interval is computed on a specified Scheduler.

public final <
the timeout value type (ignored)
V
>
Observable<T>

Returns:

an Observable that mirrors the source ObservableSource, but notifies observers of a TimeoutException if an item emitted by the source ObservableSource takes longer to arrive than the time window defined by the selector for the previously emitted item
timeout
(Function<? super T, ? extends ObservableSource<V>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource and that determines the timeout window for the subsequent item
itemTimeoutIndicator
)

Returns an Observable that mirrors the source ObservableSource, but notifies observers of a TimeoutException if an item emitted by the source ObservableSource doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by an ObservableSource that is a function of the previous item.

public final <
the timeout value type (ignored)
V
>
Observable<T>

Returns:

an Observable that mirrors the source ObservableSource, but switches to mirroring a fallback ObservableSource if an item emitted by the source ObservableSource takes longer to arrive than the time window defined by the selector for the previously emitted item
timeout
(Function<? super T, ? extends ObservableSource<V>>
a function that returns an ObservableSource, for each item emitted by the source ObservableSource, that determines the timeout window for the subsequent item
itemTimeoutIndicator
,
ObservableSource<? extends T>
the fallback ObservableSource to switch to if the source ObservableSource times out
other
)

Returns an Observable that mirrors the source ObservableSource, but that switches to a fallback ObservableSource if an item emitted by the source ObservableSource doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by an ObservableSource that is a function of the previous item.

public final Observable<T>

Returns:

the source ObservableSource modified to notify observers of a TimeoutException in case of a timeout
timeout
(long
maximum duration between emitted items before a timeout occurs
timeout
,
TimeUnit
the unit of time that applies to the timeout argument.
timeUnit
)

Returns an Observable that mirrors the source ObservableSource but applies a timeout policy for each emitted item.

public final Observable<T>

Returns:

the source ObservableSource modified to switch to the fallback ObservableSource in case of a timeout
timeout
(long
maximum duration between items before a timeout occurs
timeout
,
TimeUnit
the unit of time that applies to the timeout argument
timeUnit
,
ObservableSource<? extends T>
the fallback ObservableSource to use in case of a timeout
other
)

Returns an Observable that mirrors the source ObservableSource but applies a timeout policy for each emitted item.

public final Observable<T>

Returns:

the source ObservableSource modified so that it will switch to the fallback ObservableSource in case of a timeout
timeout
(long
maximum duration between items before a timeout occurs
timeout
,
TimeUnit
the unit of time that applies to the timeout argument
timeUnit
,
Scheduler
the Scheduler to run the timeout timers on
scheduler
,
ObservableSource<? extends T>
the ObservableSource to use as the fallback in case of a timeout
other
)

Returns an Observable that mirrors the source ObservableSource but applies a timeout policy for each emitted item using a specified Scheduler.

public final Observable<T>

Returns:

the source ObservableSource modified to notify observers of a TimeoutException in case of a timeout
timeout
(long
maximum duration between items before a timeout occurs
timeout
,
TimeUnit
the unit of time that applies to the timeout argument
timeUnit
,
Scheduler
the Scheduler to run the timeout timers on
scheduler
)

Returns an Observable that mirrors the source ObservableSource but applies a timeout policy for each emitted item, where this policy is governed on a specified Scheduler.

public final <
the first timeout value type (ignored)
U
,
the subsequent timeout value type (ignored)
V
>
Observable<T>

Returns:

an Observable that mirrors the source ObservableSource, 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
(ObservableSource<U>
a function that returns an ObservableSource that determines the timeout window for the first source item
firstTimeoutIndicator
,
Function<? super T, ? extends ObservableSource<V>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
itemTimeoutIndicator
)

Returns an Observable that mirrors the source ObservableSource, but notifies observers of a TimeoutException if either the first item emitted by the source ObservableSource or any subsequent item doesn't arrive within time windows defined by other ObservableSources.

public final <
the first timeout value type (ignored)
U
,
the subsequent timeout value type (ignored)
V
>
Observable<T>

Returns:

an Observable that mirrors the source ObservableSource, but switches to the other ObservableSource if either the first item emitted by the source ObservableSource or any subsequent item doesn't arrive within time windows defined by the timeout selectors
timeout
(ObservableSource<U>
a function that returns an ObservableSource which determines the timeout window for the first source item
firstTimeoutIndicator
,
Function<? super T, ? extends ObservableSource<V>>
a function that returns an ObservableSource for each item emitted by the source ObservableSource and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
itemTimeoutIndicator
,
ObservableSource<? extends T>
the fallback ObservableSource to switch to if the source ObservableSource times out
other
)

Returns an Observable that mirrors the source ObservableSource, but switches to a fallback ObservableSource if either the first item emitted by the source ObservableSource or any subsequent item doesn't arrive within time windows defined by other ObservableSources.

private Observable<T>
timeout0(long timeout, TimeUnit timeUnit, ObservableSource<? extends T> other, Scheduler scheduler)

private <U, V> Observable<T>
timeout0(ObservableSource<U> firstTimeoutIndicator, Function<? super T, ? extends ObservableSource<V>> itemTimeoutIndicator, ObservableSource<? extends T> other)

public static Observable<Long>

Returns:

an Observable that 0L after a specified delay, and then completes
timer
(long
the initial delay before emitting a single 0L
delay
,
TimeUnit
time units to use for delay
unit
)

Returns an Observable that emits 0L after a specified delay, and then completes.

public static Observable<Long>

Returns:

an Observable that emits 0L after a specified delay, on a specified Scheduler, and then completes
timer
(long
the initial delay before emitting a single 0L
delay
,
TimeUnit
time units to use for delay
unit
,
Scheduler
the Scheduler to use for scheduling the item
scheduler
)

Returns an Observable that emits 0L after a specified delay, on a specified Scheduler, and then completes.

public final Observable<Timed<T>>

Returns:

an Observable that emits timestamped items from the source ObservableSource
timestamp
()

Returns an Observable that emits each item emitted by the source ObservableSource, wrapped in a Timed object.

public final Observable<Timed<T>>

Returns:

an Observable that emits timestamped items from the source ObservableSource with timestamps provided by the scheduler
timestamp
(Scheduler
the Scheduler to use as a time source
scheduler
)

Returns an Observable that emits each item emitted by the source ObservableSource, wrapped in a Timed object whose timestamps are provided by a specified Scheduler.

public final Observable<Timed<T>>

Returns:

an Observable that emits timestamped items from the source ObservableSource
timestamp
(TimeUnit
the time unit for the current time
unit
)

Returns an Observable that emits each item emitted by the source ObservableSource, wrapped in a Timed object.

public final Observable<Timed<T>>

Returns:

an Observable that emits timestamped items from the source ObservableSource with timestamps provided by the scheduler
timestamp
(final TimeUnit
the time unit for the current time
unit
,
final Scheduler
the Scheduler to use as a time source
scheduler
)

Returns an Observable that emits each item emitted by the source ObservableSource, wrapped in a Timed object whose timestamps are provided by a specified Scheduler.

public final <
the resulting object type
R
>
R

Returns:

the value returned by the function
to
(Function<? super Observable<T>, R>
the function that receives the current Observable instance and returns a value
converter
)

Calls the specified converter function during assembly time and returns its resulting value.

public final Flowable<T>

Returns:

the new Flowable instance
toFlowable
(BackpressureStrategy
the backpressure strategy to apply
strategy
)

Converts the current Observable into a Flowable by applying the specified backpressure strategy.

public final Future<T>

Returns:

a Future that expects a single item to be emitted by this Observable
toFuture
()

Returns a Future representing the only value emitted by this Observable.

public final Single<List<T>>

Returns:

a Single that emits a single item: a List containing all of the items emitted by the source ObservableSource
toList
()

Returns a Single that emits a single item, a list composed of all the items emitted by the finite source ObservableSource.

public final Single<List<T>>

Returns:

a Single that emits a single item: a List containing all of the items emitted by the source ObservableSource
toList
(final int
the number of elements expected from the current Observable
capacityHint
)

Returns a Single that emits a single item, a list composed of all the items emitted by the finite source ObservableSource.

public final <
the subclass of a collection of Ts
U extends Collection<? super T>
>
Single<U>

Returns:

a Single that emits a single item: a List containing all of the items emitted by the source ObservableSource
toList
(Callable<U>
the Callable returning the collection (for each individual Observer) to be filled in
collectionSupplier
)

Returns a Single that emits a single item, a list composed of all the items emitted by the finite source ObservableSource.

public final <
the key type of the Map
K
>
Single<Map<K, T>>

Returns:

a Single that emits a single item: a HashMap containing the mapped items from the source ObservableSource
toMap
(final Function<? super T, ? extends K>
the function that extracts the key from a source item to be used in the HashMap
keySelector
)

Returns a Single that emits a single HashMap containing all items emitted by the finite source ObservableSource, mapped by the keys returned by a specified keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Single<Map<K, V>>

Returns:

a Single that emits a single item: a HashMap containing the mapped items from the source ObservableSource
toMap
(final Function<? super T, ? extends K>
the function that extracts the key from a source item to be used in the HashMap
keySelector
,
final Function<? super T, ? extends V>
the function that extracts the value from a source item to be used in the HashMap
valueSelector
)

Returns a Single that emits a single HashMap containing values corresponding to items emitted by the finite source ObservableSource, mapped by the keys returned by a specified keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Single<Map<K, V>>

Returns:

a Single that emits a single item: a Map that contains the mapped items emitted by the source ObservableSource
toMap
(final Function<? super T, ? extends K>
the function that extracts the key from a source item to be used in the Map
keySelector
,
final Function<? super T, ? extends V>
the function that extracts the value from the source items to be used as value in the Map
valueSelector
,
Callable<? extends Map<K, V>>
the function that returns a Map instance to be used
mapSupplier
)

Returns a Single that emits a single Map, returned by a specified mapFactory function, that contains keys and values extracted from the items emitted by the finite source ObservableSource.

public final <
the key type of the Map
K
>
Single<Map<K, Collection<T>>>

Returns:

a Single that emits a single item: a HashMap that contains an ArrayList of items mapped from the source ObservableSource
toMultimap
(Function<? super T, ? extends K>
the function that extracts the key from the source items to be used as key in the HashMap
keySelector
)

Returns a Single that emits a single HashMap that contains an ArrayList of items emitted by the finite source ObservableSource keyed by a specified keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Single<Map<K, Collection<V>>>

Returns:

a Single that emits a single item: a HashMap that contains an ArrayList of items mapped from the source ObservableSource
toMultimap
(Function<? super T, ? extends K>
the function that extracts a key from the source items to be used as key in the HashMap
keySelector
,
Function<? super T, ? extends V>
the function that extracts a value from the source items to be used as value in the HashMap
valueSelector
)

Returns a Single that emits a single HashMap that contains an ArrayList of values extracted by a specified valueSelector function from items emitted by the finite source ObservableSource, keyed by a specified keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Single<Map<K, Collection<V>>>

Returns:

a Single that emits a single item: a Map that contains the collection of mapped items from the source ObservableSource
toMultimap
(final Function<? super T, ? extends K>
the function that extracts a key from the source items to be used as the key in the Map
keySelector
,
final Function<? super T, ? extends V>
the function that extracts a value from the source items to be used as the value in the Map
valueSelector
,
final Callable<? extends Map<K, Collection<V>>>
the function that returns a Map instance to be used
mapSupplier
,
final Function<? super K, ? extends Collection<? super V>>
the function that returns a Collection instance for a particular key to be used in the Map
collectionFactory
)

Returns a Single 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 ObservableSource, and keyed by the keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Single<Map<K, Collection<V>>>

Returns:

a Single that emits a single item: a Map that contains a list items mapped from the source ObservableSource
toMultimap
(Function<? super T, ? extends K>
the function that extracts a key from the source items to be used as the key in the Map
keySelector
,
Function<? super T, ? extends V>
the function that extracts a value from the source items to be used as the value in the Map
valueSelector
,
Callable<Map<K, Collection<V>>>
the function that returns a Map instance to be used
mapSupplier
)

Returns a Single 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 finite source ObservableSource and keyed by the keySelector function.

public final Single<List<T>>

Returns:

a Single that emits a list that contains the items emitted by the source ObservableSource in sorted order
toSortedList
()

Returns a Single that emits a list that contains the items emitted by the finite source ObservableSource, in a sorted order.

public final Single<List<T>>

Returns:

a Single that emits a list that contains the items emitted by the source ObservableSource in sorted order
toSortedList
(final Comparator<? super T>
a function that compares two items emitted by the source ObservableSource and returns an Integer that indicates their sort order
comparator
)

Returns a Single that emits a list that contains the items emitted by the finite source ObservableSource, in a sorted order based on a specified comparison function.

public final Single<List<T>>

Returns:

a Single that emits a list that contains the items emitted by the source ObservableSource in sorted order
toSortedList
(final Comparator<? super T>
a function that compares two items emitted by the source ObservableSource and returns an Integer that indicates their sort order
comparator
,
int
the initial capacity of the ArrayList used to accumulate items before sorting
capacityHint
)

Returns a Single that emits a list that contains the items emitted by the finite source ObservableSource, in a sorted order based on a specified comparison function.

public final Single<List<T>>

Returns:

a Single that emits a list that contains the items emitted by the source ObservableSource in sorted order
toSortedList
(int
the initial capacity of the ArrayList used to accumulate items before sorting
capacityHint
)

Returns a Single that emits a list that contains the items emitted by the finite source ObservableSource, in a sorted order.

public static <
the value type emitted
T
>
Observable<T>

Returns:

the new Observable instance
unsafeCreate
(ObservableSource<T>
the ObservableSource instance to wrap
onSubscribe
)

Create an Observable by wrapping an ObservableSource which has to be implemented according to the Reactive Streams based Observable specification by handling disposal correctly; no safeguards are provided by the Observable itself.

public final Observable<T>

Returns:

the source ObservableSource modified so that its dispose() calls happen on the specified Scheduler
unsubscribeOn
(Scheduler
the Scheduler to perform the call to dispose() of the upstream Disposable
scheduler
)

Modifies the source ObservableSource so that subscribers will dispose it on a specified Scheduler.

public static <
the element type of the generated ObservableSource
T
,
the type of the resource associated with the output sequence
D
>
Observable<T>

Returns:

the ObservableSource whose lifetime controls the lifetime of the dependent resource object
using
(Callable<? extends D>
the factory function to create a resource object that depends on the ObservableSource
resourceSupplier
,
Function<? super D, ? extends ObservableSource<? extends T>>
the factory function to create an ObservableSource
sourceSupplier
,
Consumer<? super D>
the function that will dispose of the resource
disposer
)

Constructs an ObservableSource that creates a dependent resource object which is disposed of when the downstream calls dispose().

public static <
the element type of the generated ObservableSource
T
,
the type of the resource associated with the output sequence
D
>
Observable<T>

Returns:

the ObservableSource whose lifetime controls the lifetime of the dependent resource object
using
(Callable<? extends D>
the factory function to create a resource object that depends on the ObservableSource
resourceSupplier
,
Function<? super D, ? extends ObservableSource<? extends T>>
the factory function to create an ObservableSource
sourceSupplier
,
Consumer<? super D>
the function that will dispose of the resource
disposer
,
boolean
if true then disposal will happen either on a dispose() call or just before emission of a terminal event (onComplete or onError).
eager
)

Constructs an ObservableSource that creates a dependent resource object which is disposed of just before termination if you have set disposeEagerly to true and a dispose() call does not occur before termination.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows, each containing at most count items from the source ObservableSource
window
(long
the maximum size of each window before it should be emitted
count
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits windows every skip items containing at most count items from the source ObservableSource
window
(long
the maximum size of each window before it should be emitted
count
,
long
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 window(long).
skip
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits windows every skip items containing at most count items from the source ObservableSource
window
(long
the maximum size of each window before it should be emitted
count
,
long
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 window(long).
skip
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits new windows periodically as a fixed timespan elapses
window
(long
the period of time each window collects items before it should be emitted
timespan
,
long
the period of time after which a new window will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits new windows periodically as a fixed timespan elapses
window
(long
the period of time each window collects items before it should be emitted
timespan
,
long
the period of time after which a new window will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits new windows periodically as a fixed timespan elapses
window
(long
the period of time each window collects items before it should be emitted
timespan
,
long
the period of time after which a new window will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows representing items emitted by the source ObservableSource during fixed, consecutive durations
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time that applies to the timespan argument
unit
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source ObservableSource that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time that applies to the timespan argument
unit
,
long
the maximum size of each window before it should be emitted
count
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source ObservableSource that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time that applies to the timespan argument
unit
,
long
the maximum size of each window before it should be emitted
count
,
boolean
if true, when a window reaches the capacity limit, the timer is restarted as well
restart
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows containing items emitted by the source ObservableSource within a fixed duration
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time which applies to the timespan argument
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source ObservableSource that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time which applies to the timespan argument
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
,
long
the maximum size of each window before it should be emitted
count
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source ObservableSource that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time which applies to the timespan argument
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
,
long
the maximum size of each window before it should be emitted
count
,
boolean
if true, when a window reaches the capacity limit, the timer is restarted as well
restart
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source ObservableSource that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time which applies to the timespan argument
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
,
long
the maximum size of each window before it should be emitted
count
,
boolean
if true, when a window reaches the capacity limit, the timer is restarted as well
restart
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final <
the window element type (ignored)
B
>
Observable<Observable<T>>

Returns:

an Observable that emits non-overlapping windows of items it collects from the source ObservableSource where the boundary of each window is determined by the items emitted from the boundary ObservableSource
window
(ObservableSource<B>
an ObservableSource whose emitted items close and open windows
boundary
)

Returns an Observable that emits non-overlapping windows of items it collects from the source ObservableSource where the boundary of each window is determined by the items emitted from a specified boundary-governing ObservableSource.

public final <
the window element type (ignored)
B
>
Observable<Observable<T>>

Returns:

an Observable that emits non-overlapping windows of items it collects from the source ObservableSource where the boundary of each window is determined by the items emitted from the boundary ObservableSource
window
(ObservableSource<B>
an ObservableSource whose emitted items close and open windows
boundary
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns an Observable that emits non-overlapping windows of items it collects from the source ObservableSource where the boundary of each window is determined by the items emitted from a specified boundary-governing ObservableSource.

public final <
the element type of the window-opening ObservableSource
U
,
the element type of the window-closing ObservableSources
V
>
Observable<Observable<T>>

Returns:

an Observable that emits windows of items emitted by the source ObservableSource that are governed by the specified window-governing ObservableSources
window
(ObservableSource<U>
an ObservableSource that, when it emits an item, causes another window to be created
openingIndicator
,
Function<? super U, ? extends ObservableSource<V>>
a Function that produces an ObservableSource for every window created. When this ObservableSource emits an item, the associated window is closed and emitted
closingIndicator
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final <
the element type of the window-opening ObservableSource
U
,
the element type of the window-closing ObservableSources
V
>
Observable<Observable<T>>

Returns:

an Observable that emits windows of items emitted by the source ObservableSource that are governed by the specified window-governing ObservableSources
window
(ObservableSource<U>
an ObservableSource that, when it emits an item, causes another window to be created
openingIndicator
,
Function<? super U, ? extends ObservableSource<V>>
a Function that produces an ObservableSource for every window created. When this ObservableSource emits an item, the associated window is closed and emitted
closingIndicator
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final <
the element type of the boundary ObservableSource
B
>
Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source ObservableSource whenever closingIndicator emits an item
window
(Callable<? extends ObservableSource<B>>
a Callable that returns an ObservableSource that governs the boundary between windows. When the source ObservableSource emits an item, window emits the current window and begins a new one.
boundary
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final <
the element type of the boundary ObservableSource
B
>
Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source ObservableSource whenever closingIndicator emits an item
window
(Callable<? extends ObservableSource<B>>
a Callable that returns an ObservableSource that governs the boundary between windows. When the source ObservableSource emits an item, window emits the current window and begins a new one.
boundary
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns an Observable that emits windows of items it collects from the source ObservableSource.

public final <
the element type of the other ObservableSource
U
,
the result type of the combination
R
>
Observable<R>

Returns:

an Observable that merges the specified ObservableSource into this ObservableSource by using the resultSelector function only when the source ObservableSource sequence (this instance) emits an item
withLatestFrom
(ObservableSource<? extends U>
the other ObservableSource
other
,
BiFunction<? super T, ? super U, ? extends R>
the function to call when this ObservableSource emits an item and the other ObservableSource has already emitted an item, to generate the item to be emitted by the resulting ObservableSource
combiner
)

Merges the specified ObservableSource into this ObservableSource sequence by using the resultSelector function only when the source ObservableSource (this instance) emits an item.

public final <
the first other source's value type
T1
,
the second other source's value type
T2
,
the result value type
R
>
Observable<R>

Returns:

the new ObservableSource instance
withLatestFrom
(ObservableSource<T1>
the first other ObservableSource
o1
,
ObservableSource<T2>
the second other ObservableSource
o2
,
Function3<? super T, ? super T1, ? super T2, R>
the function called with an array of values from each participating ObservableSource
combiner
)

Combines the value emission from this ObservableSource with the latest emissions from the other ObservableSources via a function to produce the output item.

public final <
the first other source's value type
T1
,
the second other source's value type
T2
,
the third other source's value type
T3
,
the result value type
R
>
Observable<R>

Returns:

the new ObservableSource instance
withLatestFrom
(ObservableSource<T1>
the first other ObservableSource
o1
,
ObservableSource<T2>
the second other ObservableSource
o2
,
ObservableSource<T3>
the third other ObservableSource
o3
,
Function4<? super T, ? super T1, ? super T2, ? super T3, R>
the function called with an array of values from each participating ObservableSource
combiner
)

Combines the value emission from this ObservableSource with the latest emissions from the other ObservableSources via a function to produce the output item.

public final <
the first other source's value type
T1
,
the second other source's value type
T2
,
the third other source's value type
T3
,
the fourth other source's value type
T4
,
the result value type
R
>
Observable<R>

Returns:

the new ObservableSource instance
withLatestFrom
(ObservableSource<T1>
the first other ObservableSource
o1
,
ObservableSource<T2>
the second other ObservableSource
o2
,
ObservableSource<T3>
the third other ObservableSource
o3
,
ObservableSource<T4>
the fourth other ObservableSource
o4
,
Function5<? super T, ? super T1, ? super T2, ? super T3, ? super T4, R>
the function called with an array of values from each participating ObservableSource
combiner
)

Combines the value emission from this ObservableSource with the latest emissions from the other ObservableSources via a function to produce the output item.

public final <
the result value type
R
>
Observable<R>

Returns:

the new ObservableSource instance
withLatestFrom
(ObservableSource<?>[]
the array of other sources
others
,
Function<? super Object[], R>
the function called with an array of values from each participating ObservableSource
combiner
)

Combines the value emission from this ObservableSource with the latest emissions from the other ObservableSources via a function to produce the output item.

public final <
the result value type
R
>
Observable<R>

Returns:

the new ObservableSource instance
withLatestFrom
(Iterable<? extends ObservableSource<?>>
the iterable of other sources
others
,
Function<? super Object[], R>
the function called with an array of values from each participating ObservableSource
combiner
)

Combines the value emission from this ObservableSource with the latest emissions from the other ObservableSources via a function to produce the output item.

public static <
the value type
T
>
Observable<T>

Returns:

the new Observable instance or the same as the source
wrap
(ObservableSource<T>
the source ObservableSource instance
source
)

Wraps an ObservableSource into an Observable if not already an Observable.

public static <
the common value type
T
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(Iterable<? extends ObservableSource<? extends T>>
an Iterable of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an Iterable of other ObservableSources.

public static <
the value type of the inner ObservableSources
T
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends ObservableSource<? extends T>>
an ObservableSource of source ObservableSources
sources
,
final Function<? super Object[], ? extends R>
a function that, when applied to an item emitted by each of the ObservableSources emitted by ws, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of n items emitted, in sequence, by the n ObservableSources emitted by a specified ObservableSource.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
BiFunction<? super T1, ? super T2, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
BiFunction<? super T1, ? super T2, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
,
boolean
delay errors from any of the source ObservableSources till the other terminates
delayError
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
BiFunction<? super T1, ? super T2, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
,
boolean
delay errors from any of the source ObservableSources till the other terminates
delayError
,
int
the number of elements to prefetch from each source ObservableSource
bufferSize
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the value type of the third source
T3
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
ObservableSource<? extends T3>
a third source ObservableSource
source3
,
Function3<? super T1, ? super T2, ? super T3, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of three items emitted, in sequence, by three other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the value type of the third source
T3
,
the value type of the fourth source
T4
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
ObservableSource<? extends T3>
a third source ObservableSource
source3
,
ObservableSource<? extends T4>
a fourth source ObservableSource
source4
,
Function4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of four items emitted, in sequence, by four other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the value type of the third source
T3
,
the value type of the fourth source
T4
,
the value type of the fifth source
T5
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
ObservableSource<? extends T3>
a third source ObservableSource
source3
,
ObservableSource<? extends T4>
a fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
a fifth source ObservableSource
source5
,
Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of five items emitted, in sequence, by five other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the value type of the third source
T3
,
the value type of the fourth source
T4
,
the value type of the fifth source
T5
,
the value type of the sixth source
T6
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
ObservableSource<? extends T3>
a third source ObservableSource
source3
,
ObservableSource<? extends T4>
a fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
a fifth source ObservableSource
source5
,
ObservableSource<? extends T6>
a sixth source ObservableSource
source6
,
Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of six items emitted, in sequence, by six other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the value type of the third source
T3
,
the value type of the fourth source
T4
,
the value type of the fifth source
T5
,
the value type of the sixth source
T6
,
the value type of the seventh source
T7
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
ObservableSource<? extends T3>
a third source ObservableSource
source3
,
ObservableSource<? extends T4>
a fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
a fifth source ObservableSource
source5
,
ObservableSource<? extends T6>
a sixth source ObservableSource
source6
,
ObservableSource<? extends T7>
a seventh source ObservableSource
source7
,
Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of seven items emitted, in sequence, by seven other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the value type of the third source
T3
,
the value type of the fourth source
T4
,
the value type of the fifth source
T5
,
the value type of the sixth source
T6
,
the value type of the seventh source
T7
,
the value type of the eighth source
T8
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
ObservableSource<? extends T3>
a third source ObservableSource
source3
,
ObservableSource<? extends T4>
a fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
a fifth source ObservableSource
source5
,
ObservableSource<? extends T6>
a sixth source ObservableSource
source6
,
ObservableSource<? extends T7>
a seventh source ObservableSource
source7
,
ObservableSource<? extends T8>
an eighth source ObservableSource
source8
,
Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of eight items emitted, in sequence, by eight other ObservableSources.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the value type of the third source
T3
,
the value type of the fourth source
T4
,
the value type of the fifth source
T5
,
the value type of the sixth source
T6
,
the value type of the seventh source
T7
,
the value type of the eighth source
T8
,
the value type of the ninth source
T9
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(ObservableSource<? extends T1>
the first source ObservableSource
source1
,
ObservableSource<? extends T2>
a second source ObservableSource
source2
,
ObservableSource<? extends T3>
a third source ObservableSource
source3
,
ObservableSource<? extends T4>
a fourth source ObservableSource
source4
,
ObservableSource<? extends T5>
a fifth source ObservableSource
source5
,
ObservableSource<? extends T6>
a sixth source ObservableSource
source6
,
ObservableSource<? extends T7>
a seventh source ObservableSource
source7
,
ObservableSource<? extends T8>
an eighth source ObservableSource
source8
,
ObservableSource<? extends T9>
a ninth source ObservableSource
source9
,
Function9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of nine items emitted, in sequence, by nine other ObservableSources.

public static <
the common element type
T
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zipArray
(Function<? super Object[], ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
,
boolean
delay errors signalled by any of the source ObservableSource until all ObservableSources terminate
delayError
,
int
the number of elements to prefetch from each source ObservableSource
bufferSize
,
ObservableSource<? extends T>...
an array of source ObservableSources
sources
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an array of other ObservableSources.

public static <
the common source value type
T
,
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zipIterable
(Iterable<? extends ObservableSource<? extends T>>
an Iterable of source ObservableSources
sources
,
Function<? super Object[], ? extends R>
a function that, when applied to an item emitted by each of the source ObservableSources, results in an item that will be emitted by the resulting ObservableSource
zipper
,
boolean
delay errors signalled by any of the source ObservableSource until all ObservableSources terminate
delayError
,
int
the number of elements to prefetch from each source ObservableSource
bufferSize
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an Iterable of other ObservableSources.

public final <
the type of items in the other Iterable
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that pairs up values from the source ObservableSource and the other Iterable sequence and emits the results of zipFunction applied to these pairs
zipWith
(Iterable<U>
the Iterable sequence
other
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines the pairs of items from the ObservableSource and the Iterable to generate the items to be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source ObservableSource and a specified Iterable sequence.

public final <
the type of items emitted by the other ObservableSource
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that pairs up values from the source ObservableSource and the other ObservableSource and emits the results of zipFunction applied to these pairs
zipWith
(ObservableSource<? extends U>
the other ObservableSource
other
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines the pairs of items from the two ObservableSources to generate the items to be emitted by the resulting ObservableSource
zipper
)

Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source ObservableSource and another specified ObservableSource.

public final <
the type of items emitted by the other ObservableSource
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that pairs up values from the source ObservableSource and the other ObservableSource and emits the results of zipFunction applied to these pairs
zipWith
(ObservableSource<? extends U>
the other ObservableSource
other
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines the pairs of items from the two ObservableSources to generate the items to be emitted by the resulting ObservableSource
zipper
,
boolean
if true, errors from the current Observable or the other ObservableSource is delayed until both terminate
delayError
)

Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source ObservableSource and another specified ObservableSource.

public final <
the type of items emitted by the other ObservableSource
U
,
the type of items emitted by the resulting ObservableSource
R
>
Observable<R>

Returns:

an Observable that pairs up values from the source ObservableSource and the other ObservableSource and emits the results of zipFunction applied to these pairs
zipWith
(ObservableSource<? extends U>
the other ObservableSource
other
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines the pairs of items from the two ObservableSources to generate the items to be emitted by the resulting ObservableSource
zipper
,
boolean
if true, errors from the current Observable or the other ObservableSource is delayed until both terminate
delayError
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source ObservableSource and another specified ObservableSource.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait