Top Description Inners Fields Constructors Methods
rx

public Class Observable<T>

extends Object
Class Inheritance
Known Direct Subclasses
rx.internal.operators.CachedObservable, rx.internal.util.ScalarSynchronousObservable, rx.observables.AsyncOnSubscribe.UnicastSubject, rx.observables.ConnectableObservable, rx.observables.GroupedObservable, rx.subjects.Subject
Type Parameters
<T>
the type of the items emitted by the Observable
Imports
java.util.*, java.util.concurrent.*, rx.annotations.*, rx.exceptions.*, rx.functions.*, rx.internal.observers.AssertableSubscriberObservable, rx.internal.operators.*, rx.internal.util.*, rx.observables.*, rx.observers.SafeSubscriber, .AssertableSubscriber, rx.plugins.*, rx.schedulers.*, rx.subscriptions.Subscriptions

The Observable class that implements the Reactive Pattern.

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

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

For more information see the ReactiveX documentation.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Observable.OnSubscribe<
the output value type
T
>

Invoked when Observable.subscribe is called.

public static interface
Observable.Operator<
the downstream's value type (output)
R
,
the upstream's value type (input)
T
>

Operator function for lifting into an Observable.

public static interface
Observable.Transformer<
the input Observable's value type
T
,
the output Observable's value type
R
>

Function that receives the current Observable and should return another Observable, possibly with given element type, in exchange that will be subscribed to by the downstream operators and subscribers.

Field Summary

Modifier and TypeField and Description
pack-priv final Observable.OnSubscribe<T>

Constructor Summary

AccessConstructor and Description
protected
Observable(Observable.OnSubscribe<T>
OnSubscribe to be executed when subscribe(Subscriber) is called
f
)

Creates an Observable with a Function to execute when it is subscribed to.

Method Summary

Modifier and TypeMethod and Description
public final Observable<Boolean>

Returns:

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

Returns an Observable that emits a Boolean that indicates whether all of the items emitted by the source Observable 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 Observables first emitted an item or sent a termination notification
amb
(Iterable<? extends Observable<? extends T>>
an Iterable of Observable sources competing to react first
sources
)

Mirrors the one Observable in an Iterable of several Observables 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 Observables first emitted an item or sent a termination notification
amb
(Observable<? extends T>
an Observable competing to react first
o1
,
Observable<? extends T>
an Observable competing to react first
o2
)

Given two Observables, mirrors the one that first either emits an item or sends a termination notification.

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

Returns:

an Observable that emits the same sequence as whichever of the source Observables first emitted an item or sent a termination notification
amb
(Observable<? extends T>
an Observable competing to react first
o1
,
Observable<? extends T>
an Observable competing to react first
o2
,
Observable<? extends T>
an Observable competing to react first
o3
)

Given three Observables, mirrors the one that first either emits an item or sends a termination notification.

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

Returns:

an Observable that emits the same sequence as whichever of the source Observables first emitted an item or sent a termination notification
amb
(Observable<? extends T>
an Observable competing to react first
o1
,
Observable<? extends T>
an Observable competing to react first
o2
,
Observable<? extends T>
an Observable competing to react first
o3
,
Observable<? extends T>
an Observable competing to react first
o4
)

Given four Observables, mirrors the one that first either emits an item or sends a termination notification.

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

Returns:

an Observable that emits the same sequence as whichever of the source Observables first emitted an item or sent a termination notification
amb
(Observable<? extends T>
an Observable competing to react first
o1
,
Observable<? extends T>
an Observable competing to react first
o2
,
Observable<? extends T>
an Observable competing to react first
o3
,
Observable<? extends T>
an Observable competing to react first
o4
,
Observable<? extends T>
an Observable competing to react first
o5
)

Given five Observables, mirrors the one that first either emits an item or sends a termination notification.

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

Returns:

an Observable that emits the same sequence as whichever of the source Observables first emitted an item or sent a termination notification
amb
(Observable<? extends T>
an Observable competing to react first
o1
,
Observable<? extends T>
an Observable competing to react first
o2
,
Observable<? extends T>
an Observable competing to react first
o3
,
Observable<? extends T>
an Observable competing to react first
o4
,
Observable<? extends T>
an Observable competing to react first
o5
,
Observable<? extends T>
an Observable competing to react first
o6
)

Given six Observables, mirrors the one that first either emits an item or sends a termination notification.

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

Returns:

an Observable that emits the same sequence as whichever of the source Observables first emitted an item or sent a termination notification
amb
(Observable<? extends T>
an Observable competing to react first
o1
,
Observable<? extends T>
an Observable competing to react first
o2
,
Observable<? extends T>
an Observable competing to react first
o3
,
Observable<? extends T>
an Observable competing to react first
o4
,
Observable<? extends T>
an Observable competing to react first
o5
,
Observable<? extends T>
an Observable competing to react first
o6
,
Observable<? extends T>
an Observable competing to react first
o7
)

Given seven Observables, mirrors the one that first either emits an item or sends a termination notification.

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

Returns:

an Observable that emits the same sequence as whichever of the source Observables first emitted an item or sent a termination notification
amb
(Observable<? extends T>
an Observable competing to react first
o1
,
Observable<? extends T>
an Observable competing to react first
o2
,
Observable<? extends T>
an Observable competing to react first
o3
,
Observable<? extends T>
an Observable competing to react first
o4
,
Observable<? extends T>
an Observable competing to react first
o5
,
Observable<? extends T>
an Observable competing to react first
o6
,
Observable<? extends T>
an Observable competing to react first
o7
,
Observable<? extends T>
an observable competing to react first
o8
)

Given eight Observables, mirrors the one that first either emits an item or sends a termination notification.

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

Returns:

an Observable that emits the same sequence as whichever of the source Observables first emitted an item or sent a termination notification
amb
(Observable<? extends T>
an Observable competing to react first
o1
,
Observable<? extends T>
an Observable competing to react first
o2
,
Observable<? extends T>
an Observable competing to react first
o3
,
Observable<? extends T>
an Observable competing to react first
o4
,
Observable<? extends T>
an Observable competing to react first
o5
,
Observable<? extends T>
an Observable competing to react first
o6
,
Observable<? extends T>
an Observable competing to react first
o7
,
Observable<? extends T>
an Observable competing to react first
o8
,
Observable<? extends T>
an Observable competing to react first
o9
)

Given nine Observables, mirrors the one 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 Observables first emitted an item or sent a termination notification
ambWith
(Observable<? extends T>
an Observable competing to react first
t1
)

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

public final Observable<T>

Returns:

an Observable that hides the identity of this Observable
asObservable
()

Portrays a object of an Observable subclass as a simple Observable object.

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

Returns:

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

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

public final Observable<List<T>>

Returns:

an Observable that emits connected, non-overlapping buffers, each containing at most count items from the source Observable
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 Observable.

public final Observable<List<T>>

Returns:

an Observable that emits buffers for every skip item from the source Observable 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 Observable 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 Observable.

public final Observable<List<T>>

Returns:

an Observable that emits new buffers of items emitted by the source Observable 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
timeshift
,
TimeUnit
the unit of time that applies to the timespan and timeshift arguments
unit
)

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

public final Observable<List<T>>

Returns:

an Observable that emits new buffers of items emitted by the source Observable 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
timeshift
,
TimeUnit
the unit of time that applies to the timespan and timeshift 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 Observable.

public final Observable<List<T>>

Returns:

an Observable that emits connected, non-overlapping buffers of items emitted by the source Observable 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 Observable.

public final Observable<List<T>>

Returns:

an Observable that emits connected, non-overlapping buffers of items emitted by the source Observable, after a fixed duration or when the buffer reaches maximum capacity (whichever occurs first)
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 Observable.

public final Observable<List<T>>

Returns:

an Observable that emits connected, non-overlapping buffers of items emitted by the source Observable after a fixed duration or when the buffer reaches maximum capacity (whichever occurs first)
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
,
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 Observable.

public final Observable<List<T>>

Returns:

an Observable that emits connected, non-overlapping buffers of items emitted by the source Observable 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 Observable.

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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 Observable 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:

the new Observable instance with the specific behavior.
cache
(int
the capacity to start with
initialCapacity
)

Deprecated Use cacheWithInitialCapacity(int) instead.
Caches and shares everything from this Observable and uses the initialCapacity to reduce the number of times the internal buffer needs resizing.
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 Observable 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
R
>
Observable<R>

Returns:

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

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

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

Returns:

an Observable that emits the result of collecting the values emitted by the source Observable into a single mutable data structure
collect
(Func0<R>
the mutable data structure that will collect the items
stateFactory
,
final Action2<R, ? super T>
a function that accepts the state and an emitted item, and modifies state accordingly
collector
)

Collects items emitted by the source Observable into a single mutable data structure and returns an Observable that emits this structure.

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 Observables by means of the given aggregation function
combineLatest
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
the second source Observable
o2
,
Func2<? super T1, ? super T2, ? extends R>
the aggregation function used to combine the items emitted by the source Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
the second source Observable
o2
,
Observable<? extends T3>
the third source Observable
o3
,
Func3<? super T1, ? super T2, ? super T3, ? extends R>
the aggregation function used to combine the items emitted by the source Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
the second source Observable
o2
,
Observable<? extends T3>
the third source Observable
o3
,
Observable<? extends T4>
the fourth source Observable
o4
,
Func4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R>
the aggregation function used to combine the items emitted by the source Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
the second source Observable
o2
,
Observable<? extends T3>
the third source Observable
o3
,
Observable<? extends T4>
the fourth source Observable
o4
,
Observable<? extends T5>
the fifth source Observable
o5
,
Func5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R>
the aggregation function used to combine the items emitted by the source Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
the second source Observable
o2
,
Observable<? extends T3>
the third source Observable
o3
,
Observable<? extends T4>
the fourth source Observable
o4
,
Observable<? extends T5>
the fifth source Observable
o5
,
Observable<? extends T6>
the sixth source Observable
o6
,
Func6<? 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 Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
the second source Observable
o2
,
Observable<? extends T3>
the third source Observable
o3
,
Observable<? extends T4>
the fourth source Observable
o4
,
Observable<? extends T5>
the fifth source Observable
o5
,
Observable<? extends T6>
the sixth source Observable
o6
,
Observable<? extends T7>
the seventh source Observable
o7
,
Func7<? 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 Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
the second source Observable
o2
,
Observable<? extends T3>
the third source Observable
o3
,
Observable<? extends T4>
the fourth source Observable
o4
,
Observable<? extends T5>
the fifth source Observable
o5
,
Observable<? extends T6>
the sixth source Observable
o6
,
Observable<? extends T7>
the seventh source Observable
o7
,
Observable<? extends T8>
the eighth source Observable
o8
,
Func8<? 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 Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
the second source Observable
o2
,
Observable<? extends T3>
the third source Observable
o3
,
Observable<? extends T4>
the fourth source Observable
o4
,
Observable<? extends T5>
the fifth source Observable
o5
,
Observable<? extends T6>
the sixth source Observable
o6
,
Observable<? extends T7>
the seventh source Observable
o7
,
Observable<? extends T8>
the eighth source Observable
o8
,
Observable<? extends T9>
the ninth source Observable
o9
,
Func9<? 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 Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(List<? extends Observable<? extends T>>
the list of source Observables
sources
,
FuncN<? extends R>
the aggregation function used to combine the items emitted by the source Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatest
(Iterable<? extends Observable<? extends T>>
the collection of source Observables
sources
,
FuncN<? extends R>
the aggregation function used to combine the items emitted by the source Observables
combineFunction
)

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

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 Observables by means of the given aggregation function
combineLatestDelayError
(Iterable<? extends Observable<? extends T>>
the collection of source Observables
sources
,
FuncN<? extends R>
the aggregation function used to combine the items emitted by the source Observables
combineFunction
)

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

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

Returns:

the source Observable, transformed by the transformer function
compose
(Observable.Transformer<? super T, ? extends R>
implements the function that transforms the source Observable
transformer
)

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

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 Observables in the Iterable, one after the other, without interleaving them
concat
(Iterable<? extends Observable<? extends T>>
the Iterable of Observables
sequences
)

Flattens an Iterable of Observables into one Observable, 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 Observables emitted by observables, one after the other, without interleaving them
concat
(Observable<? extends Observable<? extends T>>
an Observable that emits Observables
observables
)

Returns an Observable that emits the items emitted by each of the Observables emitted by the source Observable, 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 Observables, one after the other, without interleaving them
concat
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
)

Returns an Observable that emits the items emitted by two Observables, 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 Observables, one after the other, without interleaving them
concat
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
)

Returns an Observable that emits the items emitted by three Observables, 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 Observables, one after the other, without interleaving them
concat
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
)

Returns an Observable that emits the items emitted by four Observables, 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 five source Observables, one after the other, without interleaving them
concat
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
)

Returns an Observable that emits the items emitted by five Observables, 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 six source Observables, one after the other, without interleaving them
concat
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
,
Observable<? extends T>
an Observable to be concatenated
t6
)

Returns an Observable that emits the items emitted by six Observables, 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 seven source Observables, one after the other, without interleaving them
concat
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
,
Observable<? extends T>
an Observable to be concatenated
t6
,
Observable<? extends T>
an Observable to be concatenated
t7
)

Returns an Observable that emits the items emitted by seven Observables, 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 eight source Observables, one after the other, without interleaving them
concat
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
,
Observable<? extends T>
an Observable to be concatenated
t6
,
Observable<? extends T>
an Observable to be concatenated
t7
,
Observable<? extends T>
an Observable to be concatenated
t8
)

Returns an Observable that emits the items emitted by eight Observables, 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 nine source Observables, one after the other, without interleaving them
concat
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
,
Observable<? extends T>
an Observable to be concatenated
t6
,
Observable<? extends T>
an Observable to be concatenated
t7
,
Observable<? extends T>
an Observable to be concatenated
t8
,
Observable<? extends T>
an Observable to be concatenated
t9
)

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

an Observable with the concatenating behavior
concatDelayError
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
)

Returns an Observable that emits the items emitted by two Observables, one after the other, without interleaving them, and delays any errors till all Observables terminate.

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

Returns:

an Observable with the concatenating behavior
concatDelayError
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
)

Returns an Observable that emits the items emitted by three Observables, one after the other, without interleaving them, and delays any errors till all Observables terminate.

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

Returns:

an Observable with the concatenating behavior
concatDelayError
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
)

Returns an Observable that emits the items emitted by four Observables, one after the other, without interleaving them, and delays any errors till all Observables terminate.

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

Returns:

an Observable with the concatenating behavior
concatDelayError
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
)

Returns an Observable that emits the items emitted by five Observables, one after the other, without interleaving them, and delays any errors till all Observables terminate.

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

Returns:

an Observable with the concatenating behavior
concatDelayError
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
,
Observable<? extends T>
an Observable to be concatenated
t6
)

Returns an Observable that emits the items emitted by six Observables, one after the other, without interleaving them, and delays any errors till all Observables terminate.

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

Returns:

an Observable with the concatenating behavior
concatDelayError
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
,
Observable<? extends T>
an Observable to be concatenated
t6
,
Observable<? extends T>
an Observable to be concatenated
t7
)

Returns an Observable that emits the items emitted by seven Observables, one after the other, without interleaving them, and delays any errors till all Observables terminate.

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

Returns:

an Observable with the concatenating behavior
concatDelayError
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
,
Observable<? extends T>
an Observable to be concatenated
t6
,
Observable<? extends T>
an Observable to be concatenated
t7
,
Observable<? extends T>
an Observable to be concatenated
t8
)

Returns an Observable that emits the items emitted by eight Observables, one after the other, without interleaving them, and delays any errors till all Observables terminate.

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

Returns:

an Observable with the concatenating behavior
concatDelayError
(Observable<? extends T>
an Observable to be concatenated
t1
,
Observable<? extends T>
an Observable to be concatenated
t2
,
Observable<? extends T>
an Observable to be concatenated
t3
,
Observable<? extends T>
an Observable to be concatenated
t4
,
Observable<? extends T>
an Observable to be concatenated
t5
,
Observable<? extends T>
an Observable to be concatenated
t6
,
Observable<? extends T>
an Observable to be concatenated
t7
,
Observable<? extends T>
an Observable to be concatenated
t8
,
Observable<? extends T>
an Observable to be concatenated
t9
)

Returns an Observable that emits the items emitted by nine Observables, one after the other, without interleaving them, and delays any errors till all Observables terminate.

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

Returns:

the new Observable instance with the specified concatenation behavior
concatEager
(Observable<? extends T>
the first source
o1
,
Observable<? extends T>
the second source
o2
)

Concatenates two source Observables 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
concatEager
(Observable<? extends T>
the first source
o1
,
Observable<? extends T>
the second source
o2
,
Observable<? extends T>
the third source
o3
)

Concatenates three sources 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
concatEager
(Observable<? extends T>
the first source
o1
,
Observable<? extends T>
the second source
o2
,
Observable<? extends T>
the third source
o3
,
Observable<? extends T>
the fourth source
o4
)

Concatenates four sources 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
concatEager
(Observable<? extends T>
the first source
o1
,
Observable<? extends T>
the second source
o2
,
Observable<? extends T>
the third source
o3
,
Observable<? extends T>
the fourth source
o4
,
Observable<? extends T>
the fifth source
o5
)

Concatenates five sources 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
concatEager
(Observable<? extends T>
the first source
o1
,
Observable<? extends T>
the second source
o2
,
Observable<? extends T>
the third source
o3
,
Observable<? extends T>
the fourth source
o4
,
Observable<? extends T>
the fifth source
o5
,
Observable<? extends T>
the sixth source
o6
)

Concatenates six sources 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
concatEager
(Observable<? extends T>
the first source
o1
,
Observable<? extends T>
the second source
o2
,
Observable<? extends T>
the third source
o3
,
Observable<? extends T>
the fourth source
o4
,
Observable<? extends T>
the fifth source
o5
,
Observable<? extends T>
the sixth source
o6
,
Observable<? extends T>
the seventh source
o7
)

Concatenates seven sources 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
concatEager
(Observable<? extends T>
the first source
o1
,
Observable<? extends T>
the second source
o2
,
Observable<? extends T>
the third source
o3
,
Observable<? extends T>
the fourth source
o4
,
Observable<? extends T>
the fifth source
o5
,
Observable<? extends T>
the sixth source
o6
,
Observable<? extends T>
the seventh source
o7
,
Observable<? extends T>
the eighth source
o8
)

Concatenates eight sources 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
concatEager
(Observable<? extends T>
the first source
o1
,
Observable<? extends T>
the second source
o2
,
Observable<? extends T>
the third source
o3
,
Observable<? extends T>
the fourth source
o4
,
Observable<? extends T>
the fifth source
o5
,
Observable<? extends T>
the sixth source
o6
,
Observable<? extends T>
the seventh source
o7
,
Observable<? extends T>
the eighth source
o8
,
Observable<? extends T>
the ninth source
o9
)

Concatenates nine sources 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
concatEager
(Iterable<? extends Observable<? extends T>>
a sequence of Observables that need to be eagerly concatenated
sources
)

Concatenates a sequence of Observables 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
concatEager
(Iterable<? extends Observable<? extends T>>
a sequence of Observables that need to be eagerly concatenated
sources
,
int
hints about the number of expected source sequence values
capacityHint
)

Concatenates a sequence of Observables 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
concatEager
(Observable<? extends Observable<? extends T>>
a sequence of Observables that need to be eagerly concatenated
sources
)

Concatenates an Observable sequence of Observables 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
concatEager
(Observable<? extends Observable<? extends T>>
a sequence of Observables that need to be eagerly concatenated
sources
,
int
hints about the number of expected source sequence values
capacityHint
)

Concatenates an Observable sequence of Observables eagerly into a single stream of values.

public final <
the type of the inner Observable 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 Observable and concatenating the Observables obtained from this transformation
concatMap
(Func1<? super T, ? extends Observable<? extends R>>
a function that, when applied to an item emitted by the source Observable, returns an Observable
func
)

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

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

Returns:

the new Observable instance with the concatenation behavior
concatMapDelayError
(Func1<? super T, ? extends Observable<? extends R>>
the function that maps the items of this Observable into the inner Observables.
func
)

Maps each of the items into an Observable, 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 Observables till all of them terminate.

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

Returns:

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

Maps a sequence of values into Observables and concatenates these Observables eagerly into a single Observable.

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

Returns:

the new Observable instance with the specified concatenation behavior
concatMapEager
(Func1<? super T, ? extends Observable<? extends R>>
the function that maps a sequence of values into a sequence of Observables that will be eagerly concatenated
mapper
,
int
hints about the number of expected source sequence values
capacityHint
)

Maps a sequence of values into Observables and concatenates these Observables eagerly into a single Observable.

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

Returns:

the new Observable instance with the specified concatenation behavior
concatMapEager
(Func1<? super T, ? extends Observable<? extends R>>
the function that maps a sequence of values into a sequence of Observables that will be eagerly concatenated
mapper
,
int
hints about the number of expected source sequence values
capacityHint
,
int
the maximum number of concurrent subscribed observables
maxConcurrent
)

Maps a sequence of values into Observables and concatenates these Observables eagerly into a single Observable.

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

Returns:

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

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

public final Observable<T>

Returns:

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

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

public final Observable<Boolean>

Returns:

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

Returns an Observable that emits a Boolean that indicates whether the source Observable emitted a specified item.

public final Observable<Integer>

Returns:

an Observable that emits a single item: the number of elements emitted by the source Observable
count
()

Returns an Observable that emits the count of the total number of items emitted by the source Observable.

public final Observable<Long>

Returns:

an Observable that emits a single item: the number of items emitted by the source Observable as a 64-bit Long item
countLong
()

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

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

Returns:

the new Observable instance
create
(Observable.OnSubscribe<T>
the callback to execute for each individual Subscriber that subscribes to the returned Observable
f
)

Deprecated 1.2.7 - inherently unsafe, use the other create() methods for basic cases or see unsafeCreate(OnSubscribe) for advanced cases (such as custom operators)
Constructs an Observable in an unsafe manner, that is, unsubscription and backpressure handling is the responsibility of the OnSubscribe implementation.
public static <
the element type
T
>
Observable<T>

Returns:

the new Observable instance
create
(Action1<Emitter<T>>
the emitter that is called when a Subscriber subscribes to the returned Observable
emitter
,
Emitter.BackpressureMode
the backpressure mode to apply if the downstream Subscriber doesn't request (fast) enough
backpressure
)

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

public static <
the state type
S
,
the type of the items that this Observable emits
T
>
Observable<T>

Returns:

an Observable that, when a Subscriber subscribes to it, will execute the specified function
create
(SyncOnSubscribe<S, T>
an implementation of SyncOnSubscribe. There are many static creation methods on the class for convenience.
syncOnSubscribe
)

Returns an Observable that respects the back-pressure semantics.

public static <
the state type
S
,
the type of the items that this Observable emits
T
>
Observable<T>

Returns:

an Observable that, when a Subscriber subscribes to it, will execute the specified function
create
(AsyncOnSubscribe<S, T>
an implementation of AsyncOnSubscribe. There are many static creation methods on the class for convenience.
asyncOnSubscribe
)

Returns an Observable that respects the back-pressure semantics.

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

Returns:

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

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

public final Observable<T>

Returns:

an Observable that filters out items from the source Observable 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 Observable to ensure that it's not dropped
timeout
,
TimeUnit
the TimeUnit for the timeout
unit
)

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

public final Observable<T>

Returns:

an Observable that filters out items from the source Observable 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 Observable 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 Observable, except that it drops items emitted by the source Observable that are followed by newer items before a timeout value expires on a specified Scheduler.

public final Observable<T>

Returns:

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

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

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

Returns:

an Observable whose Observers' subscriptions trigger an invocation of the given Observable factory function
defer
(Func0<Observable<T>>
the Observable factory function to invoke for each Observer that subscribes to the resulting Observable
observableFactory
)

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

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

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

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

Returns:

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

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

public final Observable<T>

Returns:

the source Observable 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 Observable shifted forward in time by a specified delay.

public final Observable<T>

Returns:

the source Observable 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 Observable shifted forward in time by a specified delay.

public final Observable<T>

Returns:

an Observable that delays the subscription to the source Observable 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 Observable by a given amount of time.

public final Observable<T>

Returns:

an Observable that delays the subscription to the source Observable 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 Observable by a given amount of time, both waiting and subscribing on a given Scheduler.

public final <
the element type of the delaying Observable
U
>
Observable<T>

Returns:

an Observable that delays the subscription to the source Observable until the Observable returned by subscriptionDelay emits an item
delaySubscription
(Func0<? extends Observable<U>>
a function that returns an Observable that triggers the subscription to the source Observable once it emits any item
subscriptionDelay
)

Returns an Observable that delays the subscription to the source Observable until a second Observable emits an item.

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
(Observable<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 <
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 Observable
dematerialize
()

Returns an Observable that reverses the effect of materialize by transforming the Notification objects emitted by the source Observable into the items or notifications they represent.

public final Observable<T>

Returns:

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

Returns an Observable that emits all items emitted by the source Observable that are distinct.

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

Returns:

an Observable that emits those items emitted by the source Observable that have distinct keys
distinct
(Func1<? super T, ? extends U>
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 Observable that are distinct according to a key selector function.

public final Observable<T>

Returns:

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

Returns an Observable that emits all items emitted by the source Observable that are distinct from their immediate predecessors.

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

Returns:

an Observable that emits those items from the source Observable whose keys are distinct from those of their immediate predecessors
distinctUntilChanged
(Func1<? super T, ? extends U>
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 Observable that are distinct from their immediate predecessors, according to a key selector function.

public final Observable<T>

Returns:

an Observable that emits those items from the source Observable that are distinct from their immediate predecessors
distinctUntilChanged
(Func2<? super T, ? super T, Boolean>
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.
comparator
)

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

public final Observable<T>

Returns:

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

Registers an Action0 to be called when this Observable invokes either onCompleted or onError.

public final Observable<T>

Returns:

the source Observable with the side-effecting behavior applied
doOnCompleted
(final Action0
the action to invoke when the source Observable calls onCompleted
onCompleted
)

Modifies the source Observable so that it invokes an action when it calls onCompleted.

public final Observable<T>

Returns:

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

Modifies the source Observable so that it invokes an action for each item and terminal event it emits.

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

the source Observable modified so as to call this Action when appropriate
doOnRequest
(final Action1<? super Long>
the action that gets called when an observer requests items from this Observable
onRequest
)

Modifies the source Observable so that it invokes the given action when it receives a request for more items.

public final Observable<T>

Returns:

the source Observable modified so as to call this Action when appropriate
doOnSubscribe
(final Action0
the action that gets called when an observer subscribes to the source Observable
subscribe
)

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

public final Observable<T>

Returns:

the source Observable with the side-effecting behavior applied
doOnTerminate
(final Action0
the action to invoke when the source Observable calls onCompleted or onError
onTerminate
)

Modifies the source Observable so that it invokes an action when it calls onCompleted or onError.

public final Observable<T>

Returns:

the source Observable modified so as to call this Action when appropriate
doOnUnsubscribe
(final Action0
the action that gets called when the source Observable is unsubscribed
unsubscribe
)

Calls the unsubscribe Action0 if the downstream unsubscribes the sequence.

public final Observable<T>

Returns:

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

Returns an Observable that emits the single item at a specified index in a sequence of emissions from a source Observable.

public final Observable<T>

Returns:

an Observable that emits the item at the specified position in the sequence emitted by the source Observable, or the default item if that index is outside the bounds of the source sequence
elementAtOrDefault
(int
the zero-based index of the item to retrieve
index
,
T
the default item
defaultValue
)

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

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

Returns:

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

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

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

Returns:

an Observable that invokes the Observer's onError method when the Observer subscribes to it
error
(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<Boolean>

Returns:

an Observable that emits a Boolean that indicates whether any item emitted by the source Observable satisfies the predicate
exists
(Func1<? super T, Boolean>
the condition to test items emitted by the source Observable
predicate
)

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

Note

this always emits false if the source Observable is empty.

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

an Observable that emits the same items as the source Observable, then invokes the Action0
finallyDo
(Action0
an Action0 to be invoked when the source Observable finishes
action
)

Deprecated use doAfterTerminate(Action0) instead.
Registers an Action0 to be called when this Observable invokes either onCompleted or onError.
public final Observable<T>

Returns:

an Observable that emits only the very first item emitted by the source Observable, or raises an NoSuchElementException if the source Observable is empty
first
()

Returns an Observable that emits only the very first item emitted by the source Observable, or notifies of an NoSuchElementException if the source Observable is empty.

public final Observable<T>

Returns:

an Observable that emits only the very first item emitted by the source Observable that satisfies the predicate, or raises an NoSuchElementException if no such items are emitted
first
(Func1<? super T, Boolean>
the condition that an item emitted by the source Observable has to satisfy
predicate
)

Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition, or notifies of an NoSuchElementException if no such items are emitted.

public final Observable<T>

Returns:

an Observable that emits only the very first item from the source, or a default item if the source Observable completes without emitting any items
firstOrDefault
(T
the default item to emit if the source Observable doesn't emit anything
defaultValue
)

Returns an Observable that emits only the very first item emitted by the source Observable, or a default item if the source Observable completes without emitting anything.

public final Observable<T>

Returns:

an Observable that emits only the very first item emitted by the source Observable that satisfies the predicate, or a default item if the source Observable emits no such items
firstOrDefault
(T
the default item to emit if the source Observable doesn't emit anything that satisfies the predicate
defaultValue
,
Func1<? super T, Boolean>
the condition any item emitted by the source Observable has to satisfy
predicate
)

Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition, or a default item if the source Observable emits no such items.

public final <
the value type of the inner Observables 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 Observable and merging the results of the Observables obtained from this transformation
flatMap
(Func1<? super T, ? extends Observable<? extends R>>
a function that, when applied to an item emitted by the source Observable, returns an Observable
func
)

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

public final <
the value type of the inner Observables 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 Observable and merging the results of the Observables obtained from this transformation
flatMap
(Func1<? super T, ? extends Observable<? extends R>>
a function that, when applied to an item emitted by the source Observable, returns an Observable
func
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

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

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

Returns:

an Observable that emits the results of merging the Observables returned from applying the specified functions to the emissions and notifications of the source Observable
flatMap
(Func1<? super T, ? extends Observable<? extends R>>
a function that returns an Observable to merge for each item emitted by the source Observable
onNext
,
Func1<? super Throwable, ? extends Observable<? extends R>>
a function that returns an Observable to merge for an onError notification from the source Observable
onError
,
Func0<? extends Observable<? extends R>>
a function that returns an Observable to merge for an onCompleted notification from the source Observable
onCompleted
)

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

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

Returns:

an Observable that emits the results of merging the Observables returned from applying the specified functions to the emissions and notifications of the source Observable
flatMap
(Func1<? super T, ? extends Observable<? extends R>>
a function that returns an Observable to merge for each item emitted by the source Observable
onNext
,
Func1<? super Throwable, ? extends Observable<? extends R>>
a function that returns an Observable to merge for an onError notification from the source Observable
onError
,
Func0<? extends Observable<? extends R>>
a function that returns an Observable to merge for an onCompleted notification from the source Observable
onCompleted
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

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

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

Returns:

an Observable that emits the results of applying a function to a pair of values emitted by the source Observable and the collection Observable
flatMap
(final Func1<? super T, ? extends Observable<? extends U>>
a function that returns an Observable for each item emitted by the source Observable
collectionSelector
,
final Func2<? super T, ? super U, ? extends R>
a function that combines one item emitted by each of the source and collection Observables and returns an item to be emitted by the resulting Observable
resultSelector
)

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

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

Returns:

an Observable that emits the results of applying a function to a pair of values emitted by the source Observable and the collection Observable
flatMap
(final Func1<? super T, ? extends Observable<? extends U>>
a function that returns an Observable for each item emitted by the source Observable
collectionSelector
,
final Func2<? super T, ? super U, ? extends R>
a function that combines one item emitted by each of the source and collection Observables and returns an item to be emitted by the resulting Observable
resultSelector
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

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

public final Observable<T>

Returns:

the new Observable instance
flatMapCompletable
(Func1<? super T, ? extends Completable>
the function that receives an upstream value and turns it into a Completable to be merged.
mapper
)

Maps all upstream values to Completables and runs them together until the upstream and all inner Completables complete normally.

public final Observable<T>

Returns:

the new Observable instance
flatMapCompletable
(Func1<? super T, ? extends Completable>
the function that receives an upstream value and turns it into a Completable to be merged.
mapper
,
boolean
if true, errors from the upstream and from the inner Completables get delayed till the all of them terminate.
delayErrors
)

Maps all upstream values to Completables and runs them together, optionally delaying any errors, until the upstream and all inner Completables terminate.

public final Observable<T>

Returns:

the new Observable instance
flatMapCompletable
(Func1<? super T, ? extends Completable>
the function that receives an upstream value and turns it into a Completable to be merged.
mapper
,
boolean
if true, errors from the upstream and from the inner Completables get delayed till the all of them terminate.
delayErrors
,
int
the maximum number of inner Completables to run at a time
maxConcurrency
)

Maps upstream values to Completables and runs up to the given number of them together at a time, optionally delaying any errors, until the upstream and all inner Completables terminate.

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

Returns:

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

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

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

Returns:

an Observable that emits the results of merging the items emitted by the source Observable with the values in the Iterables corresponding to those items, as generated by collectionSelector
flatMapIterable
(Func1<? super T, ? extends Iterable<? extends R>>
a function that returns an Iterable sequence of values for when given an item emitted by the source Observable
collectionSelector
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

Returns an Observable that merges each item emitted by the source Observable with the values in an Iterable corresponding to that item that is generated by a selector, while limiting the number of concurrent subscriptions to these Observables.

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

Returns:

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

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

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

Returns:

an Observable that emits the items returned by resultSelector for each item in the source Observable
flatMapIterable
(Func1<? super T, ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for each item emitted by the source Observable
collectionSelector
,
Func2<? super T, ? super U, ? extends R>
a function that returns an item based on the item emitted by the source Observable and the Iterable returned for that item by the collectionSelector
resultSelector
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

Returns an Observable that emits the results of applying a function to the pair of values from the source Observable and an Iterable corresponding to that item that is generated by a selector, while limiting the number of concurrent subscriptions to these Observables.

public final <
the value type of the inner Singles and the resulting Observable
R
>
Observable<R>

Returns:

the new Observable instance
flatMapSingle
(Func1<? super T, ? extends Single<? extends R>>
the function that receives an upstream value and turns it into a Single to be merged.
mapper
)

Maps all upstream values to Singles and runs them together until the upstream and all inner Singles complete normally.

public final <
the value type of the inner Singles and the resulting Observable
R
>
Observable<R>

Returns:

the new Observable instance
flatMapSingle
(Func1<? super T, ? extends Single<? extends R>>
the function that receives an upstream value and turns it into a Single to be merged.
mapper
,
boolean
if true, errors from the upstream and from the inner Singles get delayed till the all of them terminate.
delayErrors
)

Maps all upstream values to Singles and runs them together, optionally delaying any errors, until the upstream and all inner Singles terminate.

public final <
the value type of the inner Singles and the resulting Observable
R
>
Observable<R>

Returns:

the new Observable instance
flatMapSingle
(Func1<? super T, ? extends Single<? extends R>>
the function that receives an upstream value and turns it into a Single to be merged.
mapper
,
boolean
if true, errors from the upstream and from the inner Singles get delayed till the all of them terminate.
delayErrors
,
int
the maximum number of inner Singles to run at a time
maxConcurrency
)

Maps upstream values to Singles and runs up to the given number of them together at a time, optionally delaying any errors, until the upstream and all inner Singles terminate.

public final void
forEach(final Action1<? super T>
Action1 to execute for each item.
onNext
)

Subscribes to the Observable and receives notifications for each element.

public final void
forEach(final Action1<? super T>
Action1 to execute for each item.
onNext
,
final Action1<Throwable>
Action1 to execute when an error is emitted.
onError
)

Subscribes to the Observable and receives notifications for each element and error events.

public final void
forEach(final Action1<? super T>
Action1 to execute for each item.
onNext
,
final Action1<Throwable>
Action1 to execute when an error is emitted.
onError
,
final Action0
Action0 to execute when completion is signalled.
onComplete
)

Subscribes to the Observable and receives notifications for each element and the terminal events.

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

Returns:

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

Converts a Future into an Observable.

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

Returns:

an Observable that emits the item from the source Future
from
(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 Observable, 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 Observable
T
>
Observable<T>

Returns:

an Observable that emits the item from the source Future
from
(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 Observable.

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

Returns:

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

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

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

Returns:

an Observable that emits each item in the source Array
from
(T[]
the source Array
array
)

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

public static <
the type of the item emitted by the Observable
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 Observable that fromCallable returns
func
)

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 final <
the key type
K
,
the element type
R
>
Observable<GroupedObservable<K, R>>

Returns:

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

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

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

Returns:

an Observable that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source Observable that share that key value
groupBy
(final Func1<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
final Func1<? super T, ? extends R>
a function that extracts the return element for each item
elementSelector
,
final Func1<Action1<K>, Map<K, Object>>
a function that given an eviction action returns a Map instance that will be used to assign items to the appropriate GroupedObservables. The Map instance must be thread-safe and any eviction must trigger a call to the supplied action (synchronously or asynchronously). This can be used to limit the size of the map by evicting keys by maximum size or access time for instance. Here's an example using Guava's CacheBuilder from v19.0:
           Func1<Action1<K>, Map<K, Object>> mapFactory
             = action -> CacheBuilder.newBuilder()
                 .maximumSize(1000)
                 .expireAfterAccess(12, TimeUnit.HOURS)
                 .removalListener(notification -> action.call(notification.getKey()))
                 .<K, Object> build().asMap();
           
           
evictingMapFactory
)

Deprecated since 1.3.7, use groupBy(Func1, Func1, int, boolean, Func1) instead which uses much less memory.
Groups the items emitted by an Observable according to a specified criterion, and emits these grouped items as GroupedObservables.
public final <
the key type
K
,
the element type
R
>
Observable<GroupedObservable<K, R>>

Returns:

an Observable that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source Observable that share that key value
groupBy
(final Func1<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
final Func1<? super T, ? extends R>
a function that extracts the return element for each item
elementSelector
,
int
the size of the buffer (RxRingBuffer.SIZE may be suitable).
bufferSize
,
boolean
if and only if false then onError emissions can shortcut onNext emissions (emissions may be buffered)
delayError
,
final Func1<Action1<Object>, Map<K, Object>>
a function that given an eviction action returns a Map instance that will be used to assign items to the appropriate GroupedObservables. The Map instance must be thread-safe and any eviction must trigger a call to the supplied action (synchronously or asynchronously). This can be used to limit the size of the map by evicting entries by map maximum size or access time for instance. Here's an example using Guava's CacheBuilder from v24.0:
           Func1<Action1<Object>, Map<K, Object>> mapFactory 
             = action -> CacheBuilder.newBuilder()
                 .maximumSize(1000)
                 .expireAfterAccess(12, TimeUnit.HOURS)
                 .removalListener(entry -> action.call(entry.getValue()))
                 .<K, Object> build().asMap();
           
           
evictingMapFactory
)

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

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

Returns:

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

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

public final <
the value type of the right Observable source
T2
,
the element type of the left duration Observables
D1
,
the element type of the right duration Observables
D2
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items based on combining those items emitted by the source Observables whose durations overlap
groupJoin
(Observable<T2>
the other Observable to correlate items from the source Observable with
right
,
Func1<? super T, ? extends Observable<D1>>
a function that returns an Observable whose emissions indicate the duration of the values of the source Observable
leftDuration
,
Func1<? super T2, ? extends Observable<D2>>
a function that returns an Observable whose emissions indicate the duration of the values of the right Observable
rightDuration
,
Func2<? super T, ? super Observable<T2>, ? extends R>
a function that takes an item emitted by each Observable and returns the value to be emitted by the resulting Observable
resultSelector
)

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

public final Observable<T>

Returns:

an empty Observable that only calls onCompleted or onError, based on which one is called by the source Observable
ignoreElements
()

Ignores all items emitted by the source Observable and only calls onCompleted or onError.

public static Observable<Long>

Returns:

an Observable that emits a sequential number each time interval
interval
(long
interval size in time units (see below)
interval
,
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
interval size in time units (see below)
interval
,
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:

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 final Observable<Boolean>

Returns:

an Observable that emits a Boolean
isEmpty
()

Returns an Observable that emits true if the source Observable is empty, otherwise false.

public final <
the value type of the right Observable source
TRight
,
the element type of the left duration Observables
TLeftDuration
,
the element type of the right duration Observables
TRightDuration
,
the result type
R
>
Observable<R>

Returns:

an Observable that emits items correlating to items emitted by the source Observables that have overlapping durations
join
(Observable<TRight>
the second Observable to join items from
right
,
Func1<T, Observable<TLeftDuration>>
a function to select a duration for each item emitted by the source Observable, used to determine overlap
leftDurationSelector
,
Func1<TRight, Observable<TRightDuration>>
a function to select a duration for each item emitted by the right Observable, used to determine overlap
rightDurationSelector
,
Func2<T, TRight, R>
a function that computes an item to be emitted by the resulting Observable for any two overlapping items emitted by the two Observables
resultSelector
)

Correlates the items emitted by two Observables 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
(final T
the item to emit
value
)

Returns an Observable that emits a single 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
t1
,
T
second item
t2
)

Converts two items into an Observable 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
t1
,
T
second item
t2
,
T
third item
t3
)

Converts three items into an Observable 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
t1
,
T
second item
t2
,
T
third item
t3
,
T
fourth item
t4
)

Converts four items into an Observable 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
t1
,
T
second item
t2
,
T
third item
t3
,
T
fourth item
t4
,
T
fifth item
t5
)

Converts five items into an Observable 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
t1
,
T
second item
t2
,
T
third item
t3
,
T
fourth item
t4
,
T
fifth item
t5
,
T
sixth item
t6
)

Converts six items into an Observable 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
t1
,
T
second item
t2
,
T
third item
t3
,
T
fourth item
t4
,
T
fifth item
t5
,
T
sixth item
t6
,
T
seventh item
t7
)

Converts seven items into an Observable 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
t1
,
T
second item
t2
,
T
third item
t3
,
T
fourth item
t4
,
T
fifth item
t5
,
T
sixth item
t6
,
T
seventh item
t7
,
T
eighth item
t8
)

Converts eight items into an Observable 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
t1
,
T
second item
t2
,
T
third item
t3
,
T
fourth item
t4
,
T
fifth item
t5
,
T
sixth item
t6
,
T
seventh item
t7
,
T
eighth item
t8
,
T
ninth item
t9
)

Converts nine items into an Observable 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
t1
,
T
second item
t2
,
T
third item
t3
,
T
fourth item
t4
,
T
fifth item
t5
,
T
sixth item
t6
,
T
seventh item
t7
,
T
eighth item
t8
,
T
ninth item
t9
,
T
tenth item
t10
)

Converts ten items into an Observable that emits those items.

public final Observable<T>

Returns:

an Observable that emits the last item from the source Observable or notifies observers of an error
last
()

Returns an Observable that emits the last item emitted by the source Observable or notifies observers of a NoSuchElementException if the source Observable is empty.

public final Observable<T>

Returns:

an Observable that emits only the last item satisfying the given condition from the source, or an NoSuchElementException if no such items are emitted
last
(Func1<? super T, Boolean>
the condition any source emitted item has to satisfy
predicate
)

Returns an Observable that emits only the last item emitted by the source Observable that satisfies a given condition, or notifies of a NoSuchElementException if no such items are emitted.

public final Observable<T>

Returns:

an Observable that emits only the last item emitted by the source Observable, or a default item if the source Observable is empty
lastOrDefault
(T
the default item to emit if the source Observable is empty
defaultValue
)

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

public final Observable<T>

Returns:

an Observable that emits only the last item emitted by the source Observable that satisfies the given condition, or a default item if no such item is emitted by the source Observable
lastOrDefault
(T
the default item to emit if the source Observable doesn't emit anything that satisfies the specified predicate
defaultValue
,
Func1<? super T, Boolean>
the condition any item emitted by the source Observable has to satisfy
predicate
)

Returns an Observable that emits only the last item emitted by the source Observable that satisfies a specified condition, or a default item if no such item is emitted by the source Observable.

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

Returns:

an Observable that is the result of applying the lifted Operator to the source Observable
lift
(final Observable.Operator<? extends R, ? super T>
the Operator that implements the Observable-operating function to be applied to the source Observable
operator
)

This method requires advanced knowledge about building operators; please consider other standard composition methods first; Lifts a function to the current Observable and returns a new Observable that when subscribed to will pass the values of the current Observable through the Operator function.

public final Observable<T>

Returns:

an Observable that emits only the first count items emitted by the source Observable, or all of the items from the source Observable if that Observable emits fewer than count items
limit
(int
the maximum number of items to emit
count
)

Returns an Observable that emits only the first count items emitted by the source Observable.

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

Returns:

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

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

private <R> Observable<R>
mapNotification(Func1<? super T, ? extends R> onNext, Func1<? super Throwable, ? extends R> onError, Func0<? extends R> onCompleted)

public final Observable<Notification<T>>

Returns:

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

Returns an Observable that represents all of the emissions and notifications from the source Observable 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 Observables in the Iterable
merge
(Iterable<? extends Observable<? extends T>>
the Iterable of Observables
sequences
)

Flattens an Iterable of Observables into one Observable, 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 Observables in the Iterable
merge
(Iterable<? extends Observable<? extends T>>
the Iterable of Observables
sequences
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

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

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

Returns:

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

Flattens an Observable that emits Observables into a single Observable that emits the items emitted by those Observables, 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 Observables emitted by the source Observable
merge
(Observable<? extends Observable<? extends T>>
an Observable that emits Observables
source
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

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

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

Returns:

an Observable that emits all of the items emitted by the source Observables
merge
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
)

Flattens two Observables into a single Observable, 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 Observables
merge
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
)

Flattens three Observables into a single Observable, 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 Observables
merge
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
)

Flattens four Observables into a single Observable, 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 Observables
merge
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
)

Flattens five Observables into a single Observable, 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 Observables
merge
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
,
Observable<? extends T>
an Observable to be merged
t6
)

Flattens six Observables into a single Observable, 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 Observables
merge
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
,
Observable<? extends T>
an Observable to be merged
t6
,
Observable<? extends T>
an Observable to be merged
t7
)

Flattens seven Observables into a single Observable, 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 Observables
merge
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
,
Observable<? extends T>
an Observable to be merged
t6
,
Observable<? extends T>
an Observable to be merged
t7
,
Observable<? extends T>
an Observable to be merged
t8
)

Flattens eight Observables into a single Observable, 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 Observables
merge
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
,
Observable<? extends T>
an Observable to be merged
t6
,
Observable<? extends T>
an Observable to be merged
t7
,
Observable<? extends T>
an Observable to be merged
t8
,
Observable<? extends T>
an Observable to be merged
t9
)

Flattens nine Observables into a single Observable, 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 Observables in the Array
merge
(Observable<? extends T>[]
the Array of Observables
sequences
)

Flattens an Array of Observables into one Observable, 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 Observables in the Array
merge
(Observable<? extends T>[]
the Array of Observables
sequences
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

Flattens an Array of Observables into one Observable, without any transformation, while limiting the number of concurrent subscriptions to these Observables.

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

Returns:

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

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

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

Returns:

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

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

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 Observables in the Iterable
mergeDelayError
(Iterable<? extends Observable<? extends T>>
the Iterable of Observables
sequences
)

Flattens an Iterable of Observables into one Observable, in a way that allows an Observer to receive all successfully emitted items from each of the source Observables 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 Observables in the Iterable
mergeDelayError
(Iterable<? extends Observable<? extends T>>
the Iterable of Observables
sequences
,
int
the maximum number of Observables that may be subscribed to concurrently
maxConcurrent
)

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

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 Observables
mergeDelayError
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
)

Flattens two Observables into one Observable, in a way that allows an Observer to receive all successfully emitted items from each of the source Observables 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 Observables
mergeDelayError
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
)

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

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 Observables
mergeDelayError
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
)

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

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 Observables
mergeDelayError
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
)

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

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 Observables
mergeDelayError
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
,
Observable<? extends T>
an Observable to be merged
t6
)

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

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 Observables
mergeDelayError
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
,
Observable<? extends T>
an Observable to be merged
t6
,
Observable<? extends T>
an Observable to be merged
t7
)

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

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 Observables
mergeDelayError
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
,
Observable<? extends T>
an Observable to be merged
t6
,
Observable<? extends T>
an Observable to be merged
t7
,
Observable<? extends T>
an Observable to be merged
t8
)

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

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 Observables
mergeDelayError
(Observable<? extends T>
an Observable to be merged
t1
,
Observable<? extends T>
an Observable to be merged
t2
,
Observable<? extends T>
an Observable to be merged
t3
,
Observable<? extends T>
an Observable to be merged
t4
,
Observable<? extends T>
an Observable to be merged
t5
,
Observable<? extends T>
an Observable to be merged
t6
,
Observable<? extends T>
an Observable to be merged
t7
,
Observable<? extends T>
an Observable to be merged
t8
,
Observable<? extends T>
an Observable to be merged
t9
)

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

public final Observable<T>

Returns:

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

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

public final Observable<Observable<T>>

Returns:

an Observable that emits a single item: the source Observable
nest
()

Converts the source Observable<T> into an Observable<Observable<T>> that emits the source Observable as its single emission.

public static <
the type of items (not) emitted by the Observable
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 Observable modified so that its Observers are notified on the specified Scheduler
observeOn
(Scheduler
the Scheduler to notify Observers on
scheduler
)

Modifies an Observable to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer of rx.internal.util.RxRingBuffer#SIZE slots.

public final Observable<T>

Returns:

the source Observable modified so that its Observers are notified on the specified Scheduler
observeOn
(Scheduler
the Scheduler to notify Observers on
scheduler
,
int
the size of the buffer.
bufferSize
)

Modifies an Observable to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer of configurable size.

public final Observable<T>

Returns:

the source Observable 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 Observable to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer and optionally delays onError notifications.

public final Observable<T>

Returns:

the source Observable 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 Observable to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer of configurable size and optionally delays onError notifications.

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

Returns:

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

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

public final Observable<T>

Returns:

the source Observable modified to buffer items to the extent system resources allow
onBackpressureBuffer
()

Instructs an Observable that is emitting items faster than its observer can consume them to buffer these items indefinitely until they can be emitted.

public final Observable<T>

Returns:

the source Observable modified to buffer items up to the given capacity.
onBackpressureBuffer
(long
number of slots available in the buffer.
capacity
)

Instructs an Observable that is emitting items faster than its observer can consume them to buffer up to a given amount of items until they can be emitted.

public final Observable<T>

Returns:

the source Observable modified to buffer items up to the given capacity
onBackpressureBuffer
(long
number of slots available in the buffer.
capacity
,
Action0
action to execute if an item needs to be buffered, but there are no available slots. Null is allowed.
onOverflow
)

Instructs an Observable that is emitting items faster than its observer can consume them to buffer up to a given amount of items until they can be emitted.

public final Observable<T>

Returns:

the source Observable modified to buffer items up to the given capacity
onBackpressureBuffer
(long
number of slots available in the buffer.
capacity
,
Action0
action to execute if an item needs to be buffered, but there are no available slots. Null is allowed.
onOverflow
,
BackpressureOverflow.Strategy
how should the Observable react to buffer overflows. Null is not allowed.
overflowStrategy
)

Instructs an Observable that is emitting items faster than its observer can consume them to buffer up to a given amount of items until they can be emitted.

public final Observable<T>

Returns:

the source Observable modified to drop onNext notifications on overflow
onBackpressureDrop
(Action1<? super T>
the action to invoke for each item dropped. onDrop action should be fast and should never block.
onDrop
)

Instructs an Observable that is emitting items faster than its observer can consume them to discard, rather than emit, those items that its observer is not prepared to observe.

public final Observable<T>

Returns:

the source Observable modified to drop onNext notifications on overflow
onBackpressureDrop
()

Instructs an Observable that is emitting items faster than its observer can consume them to discard, rather than emit, those items that its observer is not prepared to observe.

public final Observable<T>

Returns:

the source Observable modified so that it emits the most recently-received item upon request
onBackpressureLatest
()

Instructs an Observable that is emitting items faster than its observer can consume them to hold onto the latest value and emit that on request.

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

the original Observable, with appropriately modified behavior
onErrorResumeNext
(final Observable<? extends T>
a function that returns an Observable that will take over if the source Observable encounters an error
resumeSequence
)

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

public final Observable<T>

Returns:

the original Observable with appropriately modified behavior
onErrorReturn
(Func1<? super Throwable, ? extends T>
a function that returns an item that the new Observable will emit if the source Observable encounters an error
resumeFunction
)

Instructs an Observable 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 Observable, with appropriately modified behavior
onExceptionResumeNext
(final Observable<? extends T>
a function that returns an Observable that will take over if the source Observable encounters an exception
resumeSequence
)

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

public final Observable<T>

Returns:

an Observable which out references to the upstream producer and downstream Subscriber if the sequence is terminated or downstream unsubscribes
onTerminateDetach
()

Nulls out references to the upstream producer and downstream Subscriber if the sequence is terminated or downstream unsubscribes.

public final ConnectableObservable<T>

Returns:

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

Returns a ConnectableObservable, which is a variety of Observable 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 Observable
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
(Func1<? super Observable<T>, ? extends Observable<R>>
a function that can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription forward.
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
(int
the value of the first Integer in the sequence
start
,
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<Integer>

Returns:

an Observable that emits a range of sequential Integers
range
(int
the value of the first Integer in the sequence
start
,
int
the number of sequential Integers to generate
count
,
Scheduler
the Scheduler to run the generator loop on
scheduler
)

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

public final Observable<T>

Returns:

the Observable that rebatches request amounts from downstream
rebatchRequests
(int
the initial request amount, further request will happen after 75% of this value
n
)

Requests n initially from the upstream and then 75% of n subsequently after 75% of n values have been emitted to the downstream.

public final Observable<T>

Returns:

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

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

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

Returns:

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

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

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

an Observable that emits the items emitted by the source Observable repeatedly and in sequence
repeat
(Scheduler
the Scheduler to emit the items on
scheduler
)

Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely, on a particular Scheduler.

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

an Observable that repeats the sequence of items emitted by the source Observable at most count times on a particular Scheduler
repeat
(final long
the number of times the source Observable items are repeated, a count of 0 will yield an empty sequence
count
,
Scheduler
the Scheduler to emit the items on
scheduler
)

Returns an Observable that repeats the sequence of items emitted by the source Observable at most count times, on a particular Scheduler.

public final Observable<T>

Returns:

the source Observable modified with repeat logic
repeatWhen
(final Func1<? super Observable<? extends Void>, ? extends Observable<?>>
receives an Observable of notifications with which a user can complete or error, aborting the repeat.
notificationHandler
,
Scheduler
the Scheduler to emit the items on
scheduler
)

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

public final Observable<T>

Returns:

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

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

public final ConnectableObservable<T>

Returns:

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

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

public final <
the type of items emitted by the resulting Observable
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 Observable
replay
(Func1<? super Observable<T>, ? extends Observable<R>>
the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
selector
)

Returns an Observable that emits items that are the results of invoking a specified selector on the items emitted by a ConnectableObservable that shares a single subscription to the source Observable.

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

public final <
the type of items emitted by the resulting Observable
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 Observable, and replays no more than bufferSize items that were emitted within the window defined by time
replay
(Func1<? super Observable<T>, ? extends Observable<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
selector
,
int
the buffer size that limits the number of items the connectable observable 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 Observable, replaying no more than bufferSize items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting Observable
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 Observable, and replays no more than bufferSize items that were emitted within the window defined by time
replay
(Func1<? super Observable<T>, ? extends Observable<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
selector
,
final int
the buffer size that limits the number of items the connectable observable 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 Observable, replaying no more than bufferSize items that were emitted within a specified time window.

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

public final <
the type of items emitted by the resulting Observable
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 Observable, replaying all items that were emitted within the window defined by time
replay
(Func1<? super Observable<T>, ? extends Observable<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
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 Observable, replaying all items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting Observable
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 Observable, replaying all items that were emitted within the window defined by time
replay
(Func1<? super Observable<T>, ? extends Observable<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
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 Observable, replaying all items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting Observable
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 Observable, replaying all items
replay
(final Func1<? super Observable<T>, ? extends Observable<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Observable
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 Observable.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items emitted by that Observable
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 Observable that replays at most bufferSize items emitted by that Observable.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize items that were emitted during the window defined by time
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 Observable 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 Observable 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 Observable 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 Observable and replays at most bufferSize items that were emitted by the Observable
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 Observable and replays at most bufferSize items emitted by that Observable.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source Observable and replays the items that were emitted during the window defined by time
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 Observable and replays all items emitted by that Observable within a specified time window.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source Observable and replays the items that were emitted during the window defined by time
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 Observable and replays all items emitted by that Observable within a specified time window.

public final ConnectableObservable<T>

Returns:

a ConnectableObservable that shares a single subscription to the source Observable that will replay all of its items and notifications to any future Observer on the given Scheduler
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 Observable that will replay all of its items and notifications to any future Observer on the given Scheduler.

public final Observable<T>

Returns:

the source Observable modified with retry logic
retry
()

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

public final Observable<T>

Returns:

the source Observable modified with retry logic
retry
(final long
number of retry attempts before failing
count
)

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

public final Observable<T>

Returns:

the source Observable modified with retry logic
retry
(Func2<Integer, Throwable, Boolean>
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 Observable, 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 Observable modified with retry logic
retryWhen
(final Func1<? super Observable<? extends Throwable>, ? extends Observable<?>>
receives an Observable of notifications with which a user can complete or error, aborting the retry
notificationHandler
)

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

public final Observable<T>

Returns:

the source Observable modified with retry logic
retryWhen
(final Func1<? super Observable<? extends Throwable>, ? extends Observable<?>>
receives an Observable of notifications with which a user can complete or error, aborting the retry
notificationHandler
,
Scheduler
the Scheduler on which to subscribe to the source Observable
scheduler
)

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

public final Observable<T>

Returns:

an Observable that emits the results of sampling the items emitted by the source Observable 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 Observable within periodic time intervals.

public final Observable<T>

Returns:

an Observable that emits the results of sampling the items emitted by the source Observable 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 Observable within periodic time intervals, where the intervals are defined on a particular Scheduler.

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

Returns:

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

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

public final Observable<T>

Returns:

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

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

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
(R
the initial (seed) accumulator item
initialValue
,
Func2<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the source Observable, whose result will be emitted to Observers via onNext and used in the next accumulator call
accumulator
)

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

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

Returns:

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

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

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

Returns:

an Observable that emits a Boolean value that indicates whether the two Observable two sequences are the same according to the specified function
sequenceEqual
(Observable<? extends T>
the first Observable to compare
first
,
Observable<? extends T>
the second Observable to compare
second
,
Func2<? super T, ? super T, Boolean>
a function used to compare items emitted by each Observable
equality
)

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

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

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

Returns a new Observable that multicasts (shares) the original Observable.

public final Observable<T>

Returns:

an Observable that emits the single item emitted by the source Observable
single
()

Returns an Observable that emits the single item emitted by the source Observable, if that Observable emits only a single item.

public final Observable<T>

Returns:

an Observable that emits the single item emitted by the source Observable that matches the predicate
single
(Func1<? super T, Boolean>
a predicate function to evaluate items emitted by the source Observable
predicate
)

Returns an Observable that emits the single item emitted by the source Observable that matches a specified predicate, if that Observable emits one such item.

public final Observable<T>

Returns:

an Observable that emits the single item emitted by the source Observable, or a default item if the source Observable is empty
singleOrDefault
(T
a default value to emit if the source Observable emits no item
defaultValue
)

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

public final Observable<T>

Returns:

an Observable that emits the single item emitted by the source Observable that matches the predicate, or the default item if no emitted item matches the predicate
singleOrDefault
(T
a default item to emit if the source Observable emits no matching items
defaultValue
,
Func1<? super T, Boolean>
a predicate function to evaluate items emitted by the source Observable
predicate
)

Returns an Observable that emits the single item emitted by the source Observable that matches a predicate, if that Observable emits only one such item, or a default item if the source Observable emits no such items.

public final Observable<T>

Returns:

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

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

public final Observable<T>

Returns:

an Observable that skips values emitted by the source Observable 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 Observable before a specified time window elapses.

public final Observable<T>

Returns:

an Observable that skips values emitted by the source Observable before the time window defined by time and scheduler elapses, and then emits the remainder
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 Observable 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 Observable 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 Observable.

public final Observable<T>

Returns:

an Observable that drops those items emitted by the source Observable 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 Observable during a specified time window before the source completes.

public final Observable<T>

Returns:

an Observable that drops those items emitted by the source Observable in a time window before the source completes defined by time and scheduler
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 Observable during a specified time window (defined on a specified scheduler) before the source completes.

public final <
the element type of the other Observable
U
>
Observable<T>

Returns:

an Observable that skips items from the source Observable until the second Observable emits an item, then emits the remaining items
skipUntil
(Observable<U>
the second Observable that has to emit an item before the source Observable's elements begin to be mirrored by the resulting Observable
other
)

Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.

public final Observable<T>

Returns:

an Observable that begins emitting items emitted by the source Observable when the specified predicate becomes false
skipWhile
(Func1<? super T, Boolean>
a function to test each item emitted from the source Observable
predicate
)

Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.

public final Observable<T>

Returns:

an Observable that emits the items emitted by the source Observable in sorted order
sorted
()

Returns an Observable that emits the events emitted by source Observable, in a sorted order.

public final Observable<T>

Returns:

an Observable that emits the items emitted by the source Observable in sorted order
sorted
(Func2<? super T, ? super T, Integer>
a function that compares two items emitted by the source Observable and returns an Integer that indicates their sort order
sortFunction
)

Returns an Observable that emits the events emitted by source Observable, in a sorted order based on a specified comparison function.

public final Observable<T>

Returns:

an Observable that emits the items in the specified Observable and then emits the items emitted by the source Observable
startWith
(Observable<T>
an Observable that contains the items you want the modified Observable to emit first
values
)

Returns an Observable that emits the items in a specified Observable before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the items in the specified Iterable and then emits the items emitted by the source Observable
startWith
(Iterable<T>
an Iterable that contains the items you want the modified Observable to emit first
values
)

Returns an Observable that emits the items in a specified Iterable before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified item before it begins to emit items emitted by the source Observable
startWith
(T
the item to emit
t1
)

Returns an Observable that emits a specified item before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source Observable
startWith
(T
the first item to emit
t1
,
T
the second item to emit
t2
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source Observable
startWith
(T
the first item to emit
t1
,
T
the second item to emit
t2
,
T
the third item to emit
t3
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source Observable
startWith
(T
the first item to emit
t1
,
T
the second item to emit
t2
,
T
the third item to emit
t3
,
T
the fourth item to emit
t4
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source Observable
startWith
(T
the first item to emit
t1
,
T
the second item to emit
t2
,
T
the third item to emit
t3
,
T
the fourth item to emit
t4
,
T
the fifth item to emit
t5
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source Observable
startWith
(T
the first item to emit
t1
,
T
the second item to emit
t2
,
T
the third item to emit
t3
,
T
the fourth item to emit
t4
,
T
the fifth item to emit
t5
,
T
the sixth item to emit
t6
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source Observable
startWith
(T
the first item to emit
t1
,
T
the second item to emit
t2
,
T
the third item to emit
t3
,
T
the fourth item to emit
t4
,
T
the fifth item to emit
t5
,
T
the sixth item to emit
t6
,
T
the seventh item to emit
t7
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source Observable
startWith
(T
the first item to emit
t1
,
T
the second item to emit
t2
,
T
the third item to emit
t3
,
T
the fourth item to emit
t4
,
T
the fifth item to emit
t5
,
T
the sixth item to emit
t6
,
T
the seventh item to emit
t7
,
T
the eighth item to emit
t8
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits the specified items before it begins to emit items emitted by the source Observable
startWith
(T
the first item to emit
t1
,
T
the second item to emit
t2
,
T
the third item to emit
t3
,
T
the fourth item to emit
t4
,
T
the fifth item to emit
t5
,
T
the sixth item to emit
t6
,
T
the seventh item to emit
t7
,
T
the eighth item to emit
t8
,
T
the ninth item to emit
t9
)

Returns an Observable that emits the specified items before it begins to emit items emitted by the source Observable.

public final Subscription

Returns:

a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
subscribe
()

Subscribes to an Observable and ignores onNext and onCompleted emissions.

public final Subscription

Returns:

a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
subscribe
(final Action1<? super T>
the Action1<T> you have designed to accept emissions from the Observable
onNext
)

Subscribes to an Observable and provides a callback to handle the items it emits.

public final Subscription

Returns:

a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
subscribe
(final Action1<? super T>
the Action1<T> you have designed to accept emissions from the Observable
onNext
,
final Action1<Throwable>
the Action1<Throwable> you have designed to accept any error notification from the Observable
onError
)

Subscribes to an Observable and provides callbacks to handle the items it emits and any error notification it issues.

public final Subscription

Returns:

a Subscription reference with which the Observer can stop receiving items before the Observable has finished sending them
subscribe
(final Action1<? super T>
the Action1<T> you have designed to accept emissions from the Observable
onNext
,
final Action1<Throwable>
the Action1<Throwable> you have designed to accept any error notification from the Observable
onError
,
final Action0
the Action0 you have designed to accept a completion notification from the Observable
onCompleted
)

Subscribes to an Observable and provides callbacks to handle the items it emits and any error or completion notification it issues.

public final Subscription

Returns:

a Subscription reference with which the Observer can stop receiving items before the Observable has completed
subscribe
(final Observer<? super T>
the Observer that will handle emissions and notifications from the Observable
observer
)

Subscribes to an Observable and provides an Observer that implements functions to handle the items the Observable emits and any error or completion notification it issues.

public final Subscription

Returns:

a Subscription reference with which Subscribers that are Observers can unsubscribe from the Observable
subscribe
(Subscriber<? super T>
the Subscriber that will handle emissions and notifications from the Observable
subscriber
)

Subscribes to an Observable and provides a Subscriber that implements functions to handle the items the Observable emits and any error or completion notification it issues.

pack-priv static <T> Subscription
subscribe(Subscriber<? super T> subscriber, Observable<T> observable)

public final Observable<T>

Returns:

the source Observable 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 Observable on the specified Scheduler.

public final Observable<T>

Returns:

the source Observable modified so that its subscriptions happen on the specified Scheduler
subscribeOn
(Scheduler
the Scheduler to perform subscription actions on
scheduler
,
boolean
if true, requests are rerouted to the given Scheduler as well (strong pipelining) if false, requests coming from any thread are simply forwarded to the upstream on the same thread (weak pipelining)
requestOn
)

Asynchronously subscribes Observers to this Observable on the specified Scheduler and optionally reroutes requests from other threads to the same Scheduler thread.

public final Observable<T>

Returns:

an Observable that emits the items emitted by the source Observable or the items of an alternate Observable if the source Observable is empty.
switchIfEmpty
(Observable<? extends T>
the alternate Observable to subscribe to if the source does not emit any items
alternate
)

Returns an Observable that emits the items emitted by the source Observable or the items of an alternate Observable if the source Observable is empty.

public final <
the element type of the inner Observables and the output
R
>
Observable<R>

Returns:

an Observable that emits the items emitted by the Observable returned from applying func to the most recently emitted item emitted by the source Observable
switchMap
(Func1<? super T, ? extends Observable<? extends R>>
a function that, when applied to an item emitted by the source Observable, returns an Observable
func
)

Returns a new Observable by applying a function that you supply to each item emitted by the source Observable that returns an Observable, and then emitting the items emitted by the most recently emitted of these Observables.

public final <
the element type of the inner Observables and the output
R
>
Observable<R>

Returns:

an Observable that emits the items emitted by the Observable returned from applying func to the most recently emitted item emitted by the source Observable
switchMapDelayError
(Func1<? super T, ? extends Observable<? extends R>>
a function that, when applied to an item emitted by the source Observable, returns an Observable
func
)

Returns a new Observable by applying a function that you supply to each item emitted by the source Observable that returns an Observable, and then emitting the items emitted by the most recently emitted of these Observables and delays any error until all Observables terminate.

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

Returns:

an Observable that emits the items emitted by the Observable most recently emitted by the source Observable
switchOnNext
(Observable<? extends Observable<? extends T>>
the source Observable that emits Observables
sequenceOfSequences
)

Converts an Observable that emits Observables into an Observable that emits the items emitted by the most recently emitted of those Observables.

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

Returns:

an Observable that emits the items emitted by the Observable most recently emitted by the source Observable
switchOnNextDelayError
(Observable<? extends Observable<? extends T>>
the source Observable that emits Observables
sequenceOfSequences
)

Converts an Observable that emits Observables into an Observable that emits the items emitted by the most recently emitted of those Observables and delays any exception until all Observables terminate.

public final Observable<T>

Returns:

an Observable that emits only the first count items emitted by the source Observable, or all of the items from the source Observable if that Observable emits fewer than count items
take
(final int
the maximum number of items to emit
count
)

Returns an Observable that emits only the first count items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits those items emitted by the source Observable 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 Observable before a specified time runs out.

public final Observable<T>

Returns:

an Observable that emits those items emitted by the source Observable 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 Observable before a specified time (on a specified Scheduler) runs out.

public final Observable<T>

Returns:

an Observable that emits only the very first item emitted by the source Observable that satisfies the given condition, or that completes without emitting anything if the source Observable completes without emitting a single condition-satisfying item
takeFirst
(Func1<? super T, Boolean>
the condition any item emitted by the source Observable has to satisfy
predicate
)

Returns an Observable that emits only the very first item emitted by the source Observable that satisfies a specified condition.

public final Observable<T>

Returns:

an Observable that emits at most the last count items emitted by the source Observable
takeLast
(final int
the maximum number of items to emit from the end of the sequence of items emitted by the source Observable
count
)

Returns an Observable that emits at most the last count items emitted by the source Observable.

public final Observable<T>

Returns:

an Observable that emits at most count items from the source Observable that were emitted in a specified window of time before the Observable completed
takeLast
(int
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 Observable that were emitted in a specified window of time before the Observable completed.

public final Observable<T>

Returns:

an Observable that emits at most count items from the source Observable that were emitted in a specified window of time before the Observable completed, where the timing information is provided by the given scheduler
takeLast
(int
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 Observable that were emitted in a specified window of time before the Observable 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 Observable that were emitted in the window of time before the Observable 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 Observable that were emitted in a specified window of time before the Observable completed.

public final Observable<T>

Returns:

an Observable that emits the items from the source Observable that were emitted in the window of time before the Observable completed specified by time, where the timing information is provided by scheduler
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 Observable that were emitted in a specified window of time before the Observable completed, where the timing information is provided by a specified Scheduler.

public final Observable<List<T>>

Returns:

an Observable that emits a single list containing at most the last count elements emitted by the source Observable
takeLastBuffer
(int
the maximum number of items to emit in the list
count
)

Returns an Observable that emits a single List containing at most the last count elements emitted by the source Observable.

public final Observable<List<T>>

Returns:

an Observable that emits a single List containing at most count items emitted by the source Observable during the time window defined by time before the source Observable completed
takeLastBuffer
(int
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 a single List containing at most count items from the source Observable that were emitted during a specified window of time before the source Observable completed.

public final Observable<List<T>>

Returns:

an Observable that emits a single List containing at most count items emitted by the source Observable during the time window defined by time before the source Observable completed
takeLastBuffer
(int
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 a single List containing at most count items from the source Observable that were emitted during a specified window of time (on a specified Scheduler) before the source Observable completed.

public final Observable<List<T>>

Returns:

an Observable that emits a single List containing the items emitted by the source Observable during the time window defined by time before the source Observable completed
takeLastBuffer
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
)

Returns an Observable that emits a single List containing those items from the source Observable that were emitted during a specified window of time before the source Observable completed.

public final Observable<List<T>>

Returns:

an Observable that emits a single List containing the items emitted by the source Observable during the time window defined by time before the source Observable completed, where the timing information is provided by scheduler
takeLastBuffer
(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 a single List containing those items from the source Observable that were emitted during a specified window of time before the source Observable completed, where the timing information is provided by the given Scheduler.

public final <
the type of items emitted by other
E
>
Observable<T>

Returns:

an Observable that emits the items emitted by the source Observable until such time as other emits its first item
takeUntil
(Observable<? extends E>
the Observable 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 Observable 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
(final Func1<? super T, Boolean>
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 Observable so long as each item satisfies the condition defined by predicate, then completes
takeWhile
(final Func1<? super T, Boolean>
a function that evaluates an item emitted by the source Observable and returns a Boolean
predicate
)

Returns an Observable that emits items emitted by the source Observable so long as each item satisfied a specified condition, and then completes as soon as this condition is not satisfied.

public final AssertableSubscriber<T>

Returns:

the new AssertableSubscriber instance
test
()

Creates a AssertableSubscriber that requests Long.MAX_VALUE and subscribes it to this Observable.

public final AssertableSubscriber<T>

Returns:

the new AssertableSubscriber instance
test
(long
the amount to request from upstream upfront, non-negative (not verified)
initialRequestAmount
)

Creates an AssertableSubscriber with the initial request amount and 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 Observable 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 Observable 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 Observable 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 Observable 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 Observable 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 Observable during sequential time windows of a specified duration, where the duration is governed by a specified Scheduler.

public final Observable<T>

Returns:

an Observable that filters out items 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 Observable in which that Observable emits no items in order for the item to be emitted by the resulting Observable
timeout
,
TimeUnit
the TimeUnit of timeout
unit
)

Returns an Observable that only emits those items emitted by the source Observable that are not followed by another emitted item within a specified time window.

public final Observable<T>

Returns:

an Observable that filters out items 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 Observable in which that Observable emits no items in order for the item to be emitted by the resulting Observable
timeout
,
TimeUnit
the TimeUnit of timeout
unit
,
Scheduler
the Scheduler to use internally to manage the timers that handle the timeout for each item
scheduler
)

Returns an Observable that only emits those items emitted by the source Observable that are not followed by another emitted item within a specified time window, where the time window is governed by a specified Scheduler.

public final Observable<TimeInterval<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 Observable.

public final Observable<TimeInterval<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 Observable, where this interval is computed 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 Observable, but notifies observers of a TimeoutException if either the first item or any subsequent item doesn't arrive within the time windows specified by the timeout selectors
timeout
(Func0<? extends Observable<U>>
a function that returns an Observable that determines the timeout window for the first source item
firstTimeoutSelector
,
Func1<? super T, ? extends Observable<V>>
a function that returns an Observable for each item emitted by the source Observable and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
timeoutSelector
)

Returns an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if either the first item emitted by the source Observable or any subsequent item doesn't arrive within time windows defined by other Observables.

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 Observable, but switches to the other Observable if either the first item emitted by the source Observable or any subsequent item doesn't arrive within time windows defined by the timeout selectors
timeout
(Func0<? extends Observable<U>>
a function that returns an Observable which determines the timeout window for the first source item
firstTimeoutSelector
,
Func1<? super T, ? extends Observable<V>>
a function that returns an Observable for each item emitted by the source Observable and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
timeoutSelector
,
Observable<? extends T>
the fallback Observable to switch to if the source Observable times out
other
)

Returns an Observable that mirrors the source Observable, but switches to a fallback Observable if either the first item emitted by the source Observable or any subsequent item doesn't arrive within time windows defined by other Observables.

public final <
the timeout value type (ignored)
V
>
Observable<T>

Returns:

an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if an item emitted by the source Observable takes longer to arrive than the time window defined by the selector for the previously emitted item
timeout
(Func1<? super T, ? extends Observable<V>>
a function that returns an observable for each item emitted by the source Observable and that determines the timeout window for the subsequent item
timeoutSelector
)

Returns an Observable that mirrors the source Observable, but notifies observers of a TimeoutException if an item emitted by the source Observable doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by an Observable that is a function of the previous item.

public final <
the timeout value type (ignored)
V
>
Observable<T>

Returns:

an Observable that mirrors the source Observable, but switches to mirroring a fallback Observable if an item emitted by the source Observable takes longer to arrive than the time window defined by the selector for the previously emitted item
timeout
(Func1<? super T, ? extends Observable<V>>
a function that returns an Observable, for each item emitted by the source Observable, that determines the timeout window for the subsequent item
timeoutSelector
,
Observable<? extends T>
the fallback Observable to switch to if the source Observable times out
other
)

Returns an Observable that mirrors the source Observable, but that switches to a fallback Observable if an item emitted by the source Observable doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by an Observable that is a function of the previous item.

public final Observable<T>

Returns:

the source Observable 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 Observable but applies a timeout policy for each emitted item.

public final Observable<T>

Returns:

the source Observable modified to switch to the fallback Observable 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
,
Observable<? extends T>
the fallback Observable to use in case of a timeout
other
)

Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item.

public final Observable<T>

Returns:

the source Observable modified so that it will switch to the fallback Observable 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
,
Observable<? extends T>
the Observable to use as the fallback in case of a timeout
other
,
Scheduler
the Scheduler to run the timeout timers on
scheduler
)

Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted item using a specified Scheduler.

public final Observable<T>

Returns:

the source Observable 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 Observable but applies a timeout policy for each emitted item, where this policy is governed on a specified Scheduler.

public static Observable<Long>

Returns:

an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter
timer
(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
)

Deprecated use interval(long, long, TimeUnit) instead
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
timer
(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 one item 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 one item 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<Timestamped<T>>

Returns:

an Observable that emits timestamped items from the source Observable
timestamp
()

Returns an Observable that emits each item emitted by the source Observable, wrapped in a Timestamped object.

public final Observable<Timestamped<T>>

Returns:

an Observable that emits timestamped items from the source Observable 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 Observable, wrapped in a Timestamped 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
(Func1<? 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 BlockingObservable<T>

Returns:

a BlockingObservable version of this Observable
toBlocking
()

Converts an Observable into a BlockingObservable (an Observable with blocking operators).

public Completable

Returns:

a Completable that calls onCompleted on it's subscriber when the source Observable calls onCompleted
toCompletable
()

Returns a Completable that discards all onNext emissions (similar to ignoreAllElements()) and calls onCompleted when this source observable calls onCompleted.

public final Observable<List<T>>

Returns:

an Observable that emits a single item: a List containing all of the items emitted by the source Observable
toList
()

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

public final <
the key type of the Map
K
>
Observable<Map<K, T>>

Returns:

an Observable that emits a single item: a HashMap containing the mapped items from the source Observable
toMap
(Func1<? super T, ? extends K>
the function that extracts the key from a source item to be used in the HashMap
keySelector
)

Returns an Observable that emits a single HashMap containing all items emitted by the source Observable, mapped by the keys returned by a specified keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Observable<Map<K, V>>

Returns:

an Observable that emits a single item: a HashMap containing the mapped items from the source Observable
toMap
(Func1<? super T, ? extends K>
the function that extracts the key from a source item to be used in the HashMap
keySelector
,
Func1<? super T, ? extends V>
the function that extracts the value from a source item to be used in the HashMap
valueSelector
)

Returns an Observable that emits a single HashMap containing values corresponding to items emitted by the source Observable, mapped by the keys returned by a specified keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Observable<Map<K, V>>

Returns:

an Observable that emits a single item: a Map that contains the mapped items emitted by the source Observable
toMap
(Func1<? super T, ? extends K>
the function that extracts the key from a source item to be used in the Map
keySelector
,
Func1<? super T, ? extends V>
the function that extracts the value from the source items to be used as value in the Map
valueSelector
,
Func0<? extends Map<K, V>>
the function that returns a Map instance to be used
mapFactory
)

Returns an Observable that emits a single Map, returned by a specified mapFactory function, that contains keys and values extracted from the items emitted by the source Observable.

public final <
the key type of the Map
K
>
Observable<Map<K, Collection<T>>>

Returns:

an Observable that emits a single item: a HashMap that contains an ArrayList of items mapped from the source Observable
toMultimap
(Func1<? super T, ? extends K>
the function that extracts the key from the source items to be used as key in the HashMap
keySelector
)

Returns an Observable that emits a single HashMap that contains an ArrayList of items emitted by the source Observable keyed by a specified keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Observable<Map<K, Collection<V>>>

Returns:

an Observable that emits a single item: a HashMap that contains an ArrayList of items mapped from the source Observable
toMultimap
(Func1<? super T, ? extends K>
the function that extracts a key from the source items to be used as key in the HashMap
keySelector
,
Func1<? super T, ? extends V>
the function that extracts a value from the source items to be used as value in the HashMap
valueSelector
)

Returns an Observable that emits a single HashMap that contains an ArrayList of values extracted by a specified valueSelector function from items emitted by the source Observable, keyed by a specified keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Observable<Map<K, Collection<V>>>

Returns:

an Observable that emits a single item: a Map that contains a list items mapped from the source Observable
toMultimap
(Func1<? super T, ? extends K>
the function that extracts a key from the source items to be used as the key in the Map
keySelector
,
Func1<? super T, ? extends V>
the function that extracts a value from the source items to be used as the value in the Map
valueSelector
,
Func0<? extends Map<K, Collection<V>>>
the function that returns a Map instance to be used
mapFactory
)

Returns an Observable that emits a single Map, returned by a specified mapFactory function, that contains an ArrayList of values, extracted by a specified valueSelector function from items emitted by the source Observable and keyed by the keySelector function.

public final <
the key type of the Map
K
,
the value type of the Map
V
>
Observable<Map<K, Collection<V>>>

Returns:

an Observable that emits a single item: a Map that contains the collection of mapped items from the source Observable
toMultimap
(Func1<? super T, ? extends K>
the function that extracts a key from the source items to be used as the key in the Map
keySelector
,
Func1<? super T, ? extends V>
the function that extracts a value from the source items to be used as the value in the Map
valueSelector
,
Func0<? extends Map<K, Collection<V>>>
the function that returns a Map instance to be used
mapFactory
,
Func1<? super K, ? extends Collection<V>>
the function that returns a Collection instance for a particular key to be used in the Map
collectionFactory
)

Returns an Observable that emits a single Map, returned by a specified mapFactory function, that contains a custom collection of values, extracted by a specified valueSelector function from items emitted by the source Observable, and keyed by the keySelector function.

public Single<T>

Returns:

a Single that emits the single item emitted by the source Observable
toSingle
()

Returns a Single that emits the single item emitted by the source Observable, if that Observable emits only a single item.

public final Observable<List<T>>

Returns:

an Observable that emits a list that contains the items emitted by the source Observable in sorted order
toSortedList
()

Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order.

public final Observable<List<T>>

Returns:

an Observable that emits a list that contains the items emitted by the source Observable in sorted order
toSortedList
(Func2<? super T, ? super T, Integer>
a function that compares two items emitted by the source Observable and returns an Integer that indicates their sort order
sortFunction
)

Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order based on a specified comparison function.

public final Observable<List<T>>

Returns:

an Observable that emits a list that contains the items emitted by the source Observable in sorted order
toSortedList
(int
the initial capacity of the ArrayList used to accumulate items before sorting
initialCapacity
)

Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order.

public final Observable<List<T>>

Returns:

an Observable that emits a list that contains the items emitted by the source Observable in sorted order
toSortedList
(Func2<? super T, ? super T, Integer>
a function that compares two items emitted by the source Observable and returns an Integer that indicates their sort order
sortFunction
,
int
the initial capacity of the ArrayList used to accumulate items before sorting
initialCapacity
)

Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order based on a specified comparison function.

public static <
the type of the items that this Observable emits
T
>
Observable<T>

Returns:

an Observable that, when a Subscriber subscribes to it, will execute the specified function
unsafeCreate
(Observable.OnSubscribe<T>
a function that accepts an Subscriber<T>, and invokes its onNext, onError, and onCompleted methods as appropriate
f
)

Returns an Observable that executes the given OnSubscribe action for each individual Subscriber that subscribes; unsubscription and backpressure must be implemented manually.

public final Subscription

Returns:

a Subscription reference with which the Subscriber can stop receiving items before the Observable has completed
unsafeSubscribe
(Subscriber<? super T>
the Subscriber that will handle emissions and notifications from the Observable
subscriber
)

Subscribes to an Observable and invokes OnSubscribe function without any contract protection, error handling, unsubscribe, or execution hooks.

public final Observable<T>

Returns:

the source Observable modified so that its unsubscriptions happen on the specified Scheduler
unsubscribeOn
(Scheduler
the Scheduler to perform unsubscription actions on
scheduler
)

Modifies the source Observable so that subscribers will unsubscribe from it on a specified Scheduler.

public static <
the element type of the generated Observable
T
,
the type of the resource associated with the output sequence
Resource
>
Observable<T>

Returns:

the Observable whose lifetime controls the lifetime of the dependent resource object
using
(final Func0<Resource>
the factory function to create a resource object that depends on the Observable
resourceFactory
,
final Func1<? super Resource, ? extends Observable<? extends T>>
the factory function to create an Observable
observableFactory
,
final Action1<? super Resource>
the function that will dispose of the resource
disposeAction
)

Constructs an Observable that creates a dependent resource object which is disposed of on unsubscription.

public static <
the element type of the generated Observable
T
,
the type of the resource associated with the output sequence
Resource
>
Observable<T>

Returns:

the Observable whose lifetime controls the lifetime of the dependent resource object
using
(final Func0<Resource>
the factory function to create a resource object that depends on the Observable
resourceFactory
,
final Func1<? super Resource, ? extends Observable<? extends T>>
the factory function to create an Observable
observableFactory
,
final Action1<? super Resource>
the function that will dispose of the resource
disposeAction
,
boolean
if true then disposal will happen either on unsubscription or just before emission of a terminal event (onComplete or onError).
disposeEagerly
)

Constructs an Observable that creates a dependent resource object which is disposed of just before termination if you have set disposeEagerly to true and unsubscription does not occur before termination.

public final <
the element type of the boundary Observable
TClosing
>
Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source Observable whenever closingSelector emits an item
window
(Func0<? extends Observable<? extends TClosing>>
a Func0 that returns an Observable that governs the boundary between windows. When the source Observable emits an item, window emits the current window and begins a new one.
closingSelector
)

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

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows, each containing at most count items from the source Observable
window
(int
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 Observable.

public final Observable<Observable<T>>

Returns:

an Observable that emits windows every skip items containing at most count items from the source Observable
window
(int
the maximum size of each window before it should be emitted
count
,
int
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(int).
skip
)

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

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
timeshift
,
TimeUnit
the unit of time that applies to the timespan and timeshift arguments
unit
)

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

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
timeshift
,
TimeUnit
the unit of time that applies to the timespan and timeshift 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 Observable.

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
timeshift
,
TimeUnit
the unit of time that applies to the timespan and timeshift arguments
unit
,
int
the maximum size of each window before it should be emitted
count
,
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 Observable.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows representing items emitted by the source Observable 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 Observable.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source Observable that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
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
,
int
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 Observable.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows of items from the source Observable that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
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
,
int
the maximum size of each window before it should be emitted
count
,
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 Observable.

public final Observable<Observable<T>>

Returns:

an Observable that emits connected, non-overlapping windows containing items emitted by the source Observable 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 Observable.

public final <
the element type of the window-opening Observable
TOpening
,
the element type of the window-closing Observables
TClosing
>
Observable<Observable<T>>

Returns:

an Observable that emits windows of items emitted by the source Observable that are governed by the specified window-governing Observables
window
(Observable<? extends TOpening>
an Observable that, when it emits an item, causes another window to be created
windowOpenings
,
Func1<? super TOpening, ? extends Observable<? extends TClosing>>
a Func1 that produces an Observable for every window created. When this Observable emits an item, the associated window is closed and emitted
closingSelector
)

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

public final <
the window element type (ignored)
U
>
Observable<Observable<T>>

Returns:

an Observable that emits non-overlapping windows of items it collects from the source Observable where the boundary of each window is determined by the items emitted from the boundary Observable
window
(Observable<U>
an Observable whose emitted items close and open windows
boundary
)

Returns an Observable that emits non-overlapping windows of items it collects from the source Observable where the boundary of each window is determined by the items emitted from a specified boundary-governing Observable.

public final <
the element type of the other Observable
U
,
the result type of the combination
R
>
Observable<R>

Returns:

an Observable that merges the specified Observable into this Observable by using the resultSelector function only when the source Observable sequence (this instance) emits an item
withLatestFrom
(Observable<? extends U>
the other Observable
other
,
Func2<? super T, ? super U, ? extends R>
the function to call when this Observable emits an item and the other Observable has already emitted an item, to generate the item to be emitted by the resulting Observable
resultSelector
)

Merges the specified Observable into this Observable sequence by using the resultSelector function only when the source Observable (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 Observable instance
withLatestFrom
(Observable<T1>
the first other Observable
o1
,
Observable<T2>
the second other Observable
o2
,
Func3<? super T, ? super T1, ? super T2, R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables 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 Observable instance
withLatestFrom
(Observable<T1>
the first other Observable
o1
,
Observable<T2>
the second other Observable
o2
,
Observable<T3>
the third other Observable
o3
,
Func4<? super T, ? super T1, ? super T2, ? super T3, R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables 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 Observable instance
withLatestFrom
(Observable<T1>
the first other Observable
o1
,
Observable<T2>
the second other Observable
o2
,
Observable<T3>
the third other Observable
o3
,
Observable<T4>
the fourth other Observable
o4
,
Func5<? super T, ? super T1, ? super T2, ? super T3, ? super T4, R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables 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 fifth other source's value type
T5
,
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
withLatestFrom
(Observable<T1>
the first other Observable
o1
,
Observable<T2>
the second other Observable
o2
,
Observable<T3>
the third other Observable
o3
,
Observable<T4>
the fourth other Observable
o4
,
Observable<T5>
the fifth other Observable
o5
,
Func6<? super T, ? super T1, ? super T2, ? super T3, ? super T4, ? super T5, R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables 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 fifth other source's value type
T5
,
the sixth other source's value type
T6
,
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
withLatestFrom
(Observable<T1>
the first other Observable
o1
,
Observable<T2>
the second other Observable
o2
,
Observable<T3>
the third other Observable
o3
,
Observable<T4>
the fourth other Observable
o4
,
Observable<T5>
the fifth other Observable
o5
,
Observable<T6>
the sixth other Observable
o6
,
Func7<? super T, ? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables 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 fifth other source's value type
T5
,
the sixth other source's value type
T6
,
the seventh other source's value type
T7
,
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
withLatestFrom
(Observable<T1>
the first other Observable
o1
,
Observable<T2>
the second other Observable
o2
,
Observable<T3>
the third other Observable
o3
,
Observable<T4>
the fourth other Observable
o4
,
Observable<T5>
the fifth other Observable
o5
,
Observable<T6>
the sixth other Observable
o6
,
Observable<T7>
the seventh other Observable
o7
,
Func8<? super T, ? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables 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 fifth other source's value type
T5
,
the sixth other source's value type
T6
,
the seventh other source's value type
T7
,
the eighth other source's value type
T8
,
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
withLatestFrom
(Observable<T1>
the first other Observable
o1
,
Observable<T2>
the second other Observable
o2
,
Observable<T3>
the third other Observable
o3
,
Observable<T4>
the fourth other Observable
o4
,
Observable<T5>
the fifth other Observable
o5
,
Observable<T6>
the sixth other Observable
o6
,
Observable<T7>
the seventh other Observable
o7
,
Observable<T8>
the eighth other Observable
o8
,
Func9<? super T, ? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables via a function to produce the output item.

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

Returns:

the new Observable instance
withLatestFrom
(Observable<?>[]
the array of other sources
others
,
FuncN<R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables via a function to produce the output item.

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

Returns:

the new Observable instance
withLatestFrom
(Iterable<Observable<?>>
the iterable of other sources
others
,
FuncN<R>
the function called with an array of values from each participating observable
combiner
)

Combines the value emission from this Observable with the latest emissions from the other Observables via a function to produce the output item.

public static <
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(Iterable<? extends Observable<?>>
an Iterable of source Observables
ws
,
FuncN<? extends R>
a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

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 Observables.

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

Returns:

an Observable that emits the zipped results
zip
(Observable<?>[]
an array of source Observables
ws
,
FuncN<? extends R>
a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

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 Observables.

public static <
the zipped result type
R
>
Observable<R>

Returns:

an Observable that emits the zipped results
zip
(Observable<? extends Observable<?>>
an Observable of source Observables
ws
,
final FuncN<? extends R>
a function that, when applied to an item emitted by each of the Observables emitted by ws, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of n items emitted, in sequence, by the n Observables emitted by a specified Observable.

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
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
a second source Observable
o2
,
final Func2<? super T1, ? super T2, ? extends R>
a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two other Observables.

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
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
a second source Observable
o2
,
Observable<? extends T3>
a third source Observable
o3
,
Func3<? super T1, ? super T2, ? super T3, ? extends R>
a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of three items emitted, in sequence, by three other Observables.

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
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
a second source Observable
o2
,
Observable<? extends T3>
a third source Observable
o3
,
Observable<? extends T4>
a fourth source Observable
o4
,
Func4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R>
a function that, when applied to an item emitted by each of the source Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of four items emitted, in sequence, by four other Observables.

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
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
a second source Observable
o2
,
Observable<? extends T3>
a third source Observable
o3
,
Observable<? extends T4>
a fourth source Observable
o4
,
Observable<? extends T5>
a fifth source Observable
o5
,
Func5<? 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 Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of five items emitted, in sequence, by five other Observables.

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
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
a second source Observable
o2
,
Observable<? extends T3>
a third source Observable
o3
,
Observable<? extends T4>
a fourth source Observable
o4
,
Observable<? extends T5>
a fifth source Observable
o5
,
Observable<? extends T6>
a sixth source Observable
o6
,
Func6<? 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 Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of six items emitted, in sequence, by six other Observables.

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
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
a second source Observable
o2
,
Observable<? extends T3>
a third source Observable
o3
,
Observable<? extends T4>
a fourth source Observable
o4
,
Observable<? extends T5>
a fifth source Observable
o5
,
Observable<? extends T6>
a sixth source Observable
o6
,
Observable<? extends T7>
a seventh source Observable
o7
,
Func7<? 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 Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of seven items emitted, in sequence, by seven other Observables.

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
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
a second source Observable
o2
,
Observable<? extends T3>
a third source Observable
o3
,
Observable<? extends T4>
a fourth source Observable
o4
,
Observable<? extends T5>
a fifth source Observable
o5
,
Observable<? extends T6>
a sixth source Observable
o6
,
Observable<? extends T7>
a seventh source Observable
o7
,
Observable<? extends T8>
an eighth source Observable
o8
,
Func8<? 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 Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of eight items emitted, in sequence, by eight other Observables.

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
(Observable<? extends T1>
the first source Observable
o1
,
Observable<? extends T2>
a second source Observable
o2
,
Observable<? extends T3>
a third source Observable
o3
,
Observable<? extends T4>
a fourth source Observable
o4
,
Observable<? extends T5>
a fifth source Observable
o5
,
Observable<? extends T6>
a sixth source Observable
o6
,
Observable<? extends T7>
a seventh source Observable
o7
,
Observable<? extends T8>
an eighth source Observable
o8
,
Observable<? extends T9>
a ninth source Observable
o9
,
Func9<? 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 Observables, results in an item that will be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits the results of a specified combiner function applied to combinations of nine items emitted, in sequence, by nine other Observables.

public final <
the type of items in the other Iterable
T2
,
the type of items emitted by the resulting Observable
R
>
Observable<R>

Returns:

an Observable that pairs up values from the source Observable and the other Iterable sequence and emits the results of zipFunction applied to these pairs
zipWith
(Iterable<? extends T2>
the Iterable sequence
other
,
Func2<? super T, ? super T2, ? extends R>
a function that combines the pairs of items from the Observable and the Iterable to generate the items to be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source Observable and a specified Iterable sequence.

public final <
the type of items emitted by the other Observable
T2
,
the type of items emitted by the resulting Observable
R
>
Observable<R>

Returns:

an Observable that pairs up values from the source Observable and the other Observable and emits the results of zipFunction applied to these pairs
zipWith
(Observable<? extends T2>
the other Observable
other
,
Func2<? super T, ? super T2, ? extends R>
a function that combines the pairs of items from the two Observables to generate the items to be emitted by the resulting Observable
zipFunction
)

Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source Observable and another specified Observable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait