Top Description Fields Constructors Methods
io.reactivex

public abstract Class Flowable<T>

extends Object
implements Publisher<T>
Class Inheritance
All Implemented Interfaces
org.reactivestreams.Publisher
Known Direct Subclasses
io.reactivex.flowables.ConnectableFlowable, io.reactivex.flowables.GroupedFlowable, io.reactivex.internal.operators.completable.CompletableToFlowable, io.reactivex.internal.operators.flowable.AbstractFlowableWithUpstream, io.reactivex.internal.operators.flowable.FlowableAmb, io.reactivex.internal.operators.flowable.FlowableAutoConnect, io.reactivex.internal.operators.flowable.FlowableCombineLatest, io.reactivex.internal.operators.flowable.FlowableConcatArray, io.reactivex.internal.operators.flowable.FlowableConcatMapEagerPublisher, io.reactivex.internal.operators.flowable.FlowableConcatMapPublisher, io.reactivex.internal.operators.flowable.FlowableFromArray, io.reactivex.internal.operators.flowable.FlowableFromCallable, io.reactivex.internal.operators.flowable.FlowableFromFuture, io.reactivex.internal.operators.flowable.FlowableFromIterable, io.reactivex.internal.operators.flowable.FlowableFromObservable, io.reactivex.internal.operators.flowable.FlowableFromPublisher, io.reactivex.internal.operators.flowable.FlowableGenerate, io.reactivex.internal.operators.flowable.FlowableInterval, io.reactivex.internal.operators.flowable.FlowableIntervalRange, io.reactivex.internal.operators.flowable.FlowableJust, io.reactivex.internal.operators.flowable.FlowableReplay.MulticastFlowable, io.reactivex.internal.operators.flowable.FlowableSamplePublisher, io.reactivex.internal.operators.flowable.FlowableScalarXMap.ScalarXMapFlowable, io.reactivex.internal.operators.flowable.FlowableSequenceEqual, io.reactivex.internal.operators.flowable.FlowableCreate, io.reactivex.internal.operators.flowable.FlowableDefer, io.reactivex.internal.operators.flowable.FlowableDelaySubscriptionOther, io.reactivex.internal.operators.flowable.FlowableEmpty, io.reactivex.internal.operators.flowable.FlowableError, io.reactivex.internal.operators.flowable.FlowableFlatMapPublisher, io.reactivex.internal.operators.flowable.FlowableTakePublisher, io.reactivex.internal.operators.flowable.FlowableTimer, io.reactivex.internal.operators.flowable.FlowableUsing, io.reactivex.internal.operators.flowable.FlowableZip, io.reactivex.internal.operators.flowable.FlowableMapPublisher, io.reactivex.internal.operators.flowable.FlowableNever, io.reactivex.internal.operators.flowable.FlowablePublishMulticast.MulticastProcessor, io.reactivex.internal.operators.flowable.FlowableRange, io.reactivex.internal.operators.flowable.FlowableRangeLong, io.reactivex.internal.operators.flowable.FlowableRefCount, io.reactivex.internal.operators.maybe.MaybeConcatArray, io.reactivex.internal.operators.maybe.MaybeConcatArrayDelayError, io.reactivex.internal.operators.maybe.MaybeConcatIterable, io.reactivex.internal.operators.maybe.MaybeMergeArray, io.reactivex.internal.operators.maybe.MaybeFlatMapIterableFlowable, io.reactivex.internal.operators.maybe.MaybeToFlowable, io.reactivex.internal.operators.mixed.CompletableAndThenPublisher, io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe, io.reactivex.internal.operators.mixed.FlowableConcatMapSingle, io.reactivex.internal.operators.mixed.FlowableSwitchMapMaybe, io.reactivex.internal.operators.mixed.FlowableSwitchMapSingle, io.reactivex.internal.operators.mixed.MaybeFlatMapPublisher, io.reactivex.internal.operators.parallel.ParallelJoin, io.reactivex.internal.operators.parallel.ParallelReduceFull, io.reactivex.internal.operators.parallel.ParallelSortedJoin, io.reactivex.internal.operators.single.SingleFlatMapIterableFlowable, io.reactivex.internal.operators.single.SingleFlatMapPublisher, io.reactivex.internal.operators.single.SingleToFlowable, io.reactivex.processors.FlowableProcessor
Type Parameters
<T>
the type of the items emitted by the Flowable
Imports
java.util.*, java.util.concurrent.*, org.reactivestreams.*, io.reactivex.annotations.*, io.reactivex.disposables.Disposable, io.reactivex.exceptions.Exceptions, io.reactivex.flowables.*, io.reactivex.functions.*, io.reactivex.internal.functions.*, io.reactivex.internal.fuseable.*, io.reactivex.internal.operators.flowable.*, io.reactivex.internal.operators.mixed.*, io.reactivex.internal.operators.observable.*, io.reactivex.internal.schedulers.ImmediateThinScheduler, io.reactivex.internal.subscribers.*, io.reactivex.internal.util.*, io.reactivex.parallel.ParallelFlowable, io.reactivex.plugins.RxJavaPlugins, io.reactivex.schedulers.*, io.reactivex.subscribers.*

The Flowable class that implements the Reactive Streams Pattern and offers factory methods, intermediate operators and the ability to consume reactive dataflows.

Reactive Streams operates with Publishers which Flowable extends. Many operators therefore accept general Publishers directly and allow direct interoperation with other Reactive Streams implementations.

The Flowable hosts the default buffer size of 128 elements for operators, accessible via bufferSize(), that can be overridden globally via the system parameter rx2.buffer-size. Most operators, however, have overloads that allow setting their internal buffer size explicitly.

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

The Flowable follows the protocol


     onSubscribe onNext* (onError | onComplete)?
where the stream can be disposed through the Subscription instance provided to consumers through Subscriber#onSubscribe(Subscription). Unlike the Observable.subscribe() of version 1.x, subscribe(Subscriber) does not allow external cancellation of a subscription and the Subscriber instance is expected to expose such capability if needed.

Flowables support backpressure and require Subscribers to signal demand via Subscription#request(long).

Example:


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

Thread.sleep(500);
// the sequence can now be cancelled via dispose()
d.dispose();

The Reactive Streams specification is relatively strict when defining interactions between Publishers and Subscribers, so much so that there is a significant performance penalty due certain timing requirements and the need to prepare for invalid request amounts via Subscription#request(long). Therefore, RxJava has introduced the FlowableSubscriber interface that indicates the consumer can be driven with relaxed rules. All RxJava operators are implemented with these relaxed rules in mind. If the subscribing Subscriber does not implement this interface, for example, due to it being from another Reactive Streams compliant library, the Flowable will automatically apply a compliance wrapper around it.

Flowable is an abstract class, but it is not advised to implement sources and custom operators by extending the class directly due to the large amounts of Reactive Streams rules to be followed to the letter. See the wiki for some guidance if such custom implementations are necessary.

The recommended way of creating custom Flowables is by using the create(FlowableOnSubscribe, BackpressureStrategy) factory method:


Flowable<String> source = Flowable.create(new FlowableOnSubscribe<String>() {
    @Override
    public void subscribe(FlowableEmitter<String> emitter) throws Exception {

        // signal an item
        emitter.onNext("Hello");

        // could be some blocking operation
        Thread.sleep(1000);

        // the consumer might have cancelled the flow
        if (emitter.isCancelled() {
            return;
        }

        emitter.onNext("World");

        Thread.sleep(1000);

        // the end-of-sequence has to be signaled, otherwise the
        // consumers may never finish
        emitter.onComplete();
    }
}, BackpressureStrategy.BUFFER);

System.out.println("Subscribe!");

source.subscribe(System.out::println);

System.out.println("Done!");

RxJava reactive sources, such as Flowable, are generally synchronous and sequential in nature. In the ReactiveX design, the location (thread) where operators run is orthogonal to when the operators can work with data. This means that asynchrony and parallelism has to be explicitly expressed via operators such as subscribeOn(Scheduler), observeOn(Scheduler) and parallel(). In general, operators featuring a Scheduler parameter are introducing this type of asynchrony into the flow.

For more information see the ReactiveX documentation.

See Also
Observable, ParallelFlowable, io.reactivex.subscribers.DisposableSubscriber

Field Summary

Modifier and TypeField and Description
pack-priv static final int
BUFFER_SIZE

The default buffer size.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final Single<Boolean>

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Single<Boolean>

Returns:

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

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

Note

this always emits false if the source Publisher is empty.

public final <
the resulting object type
R
>
R

Returns:

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

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

public final T

Returns:

the first item emitted by this Flowable
blockingFirst
()

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

public final T

Returns:

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

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

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

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

public final Iterable<T>

Returns:

an Iterable version of this Flowable
blockingIterable
()

Converts this Flowable into an Iterable.

public final Iterable<T>

Returns:

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

Converts this Flowable into an Iterable.

public final T

Returns:

the last item emitted by this Flowable
blockingLast
()

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

public final T

Returns:

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

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

public final Iterable<T>

Returns:

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

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

public final Iterable<T>

Returns:

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

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

public final Iterable<T>

Returns:

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

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

public final T

Returns:

the single item emitted by this Flowable
blockingSingle
()

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

public final T

Returns:

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

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

public final void
blockingSubscribe()

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

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

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

public final void
blockingSubscribe(Consumer<? super T>
the callback action for each source value
onNext
,
int
the size of the buffer
bufferSize
)

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

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

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

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

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

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

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

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

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

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

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

public final Flowable<List<T>>

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

public final Flowable<List<T>>

Returns:

a Flowable that emits buffers for every skip item from the source Publisher 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 Publisher 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 a Flowable that emits buffers of items it collects from the source Publisher.

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

Returns:

a Flowable that emits buffers for every skip item from the source Publisher 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 Publisher should be skipped before starting a new buffer. Note that when skip and count are equal, this is the same operation as buffer(int).
skip
,
Callable<U>
a factory function that returns an instance of the collection subclass to be used and returned as the buffer
bufferSupplier
)

Returns a Flowable that emits buffers of items it collects from the source Publisher.

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

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

public final Flowable<List<T>>

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

public final Flowable<List<T>>

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

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

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

public final Flowable<List<T>>

Returns:

a Flowable that emits connected, non-overlapping buffers of items emitted by the source Publisher 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 a Flowable that emits buffers of items it collects from the source Publisher.

public final Flowable<List<T>>

Returns:

a Flowable that emits connected, non-overlapping buffers of items emitted by the source Publisher, 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 a Flowable that emits buffers of items it collects from the source Publisher.

public final Flowable<List<T>>

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

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

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

public final Flowable<List<T>>

Returns:

a Flowable that emits connected, non-overlapping buffers of items emitted by the source Publisher 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 a Flowable that emits buffers of items it collects from the source Publisher.

public final <
the element type of the buffer-opening Publisher
TOpening
,
the element type of the individual buffer-closing Publishers
TClosing
>
Flowable<List<T>>

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

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

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

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

Returns:

a Flowable that emits buffered items from the source Publisher when the boundary Publisher emits an item
buffer
(Publisher<B>
the boundary Publisher
boundaryIndicator
)

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

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

Returns:

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

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

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

Returns:

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

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

public final <
the value type of the boundary-providing Publisher
B
>
Flowable<List<T>>

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

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

Returns:

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

Returns a Flowable that emits buffers of items it collects from the source Publisher.

public static int

Returns:

the default internal buffer size.
bufferSize
()

Returns the default internal buffer size used by most async operators.

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable 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 a Flowable that subscribes to this Publisher lazily, caches all of its events and replays them, in the same order as received, to all the downstream subscribers.

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

Returns:

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

Returns a Flowable that emits the items emitted by the source Publisher, converted to the specified type.

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

Combines two source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from either of the source Publishers, 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
>
Flowable<R>

Returns:

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

Combines three source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, 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
>
Flowable<R>

Returns:

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

Combines four source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, 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
>
Flowable<R>

Returns:

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

Combines five source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, 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
>
Flowable<R>

Returns:

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

Combines six source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, 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
>
Flowable<R>

Returns:

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

Combines seven source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, 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
>
Flowable<R>

Returns:

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

Combines eight source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, 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
>
Flowable<R>

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

public final <
the value type of the output Publisher
R
>
Flowable<R>

Returns:

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

Transform a Publisher by applying a particular Transformer function to it.

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

Returns:

the new Flowable instance
concat
(Iterable<? extends Publisher<? extends T>>
the Iterable sequence of Publishers
sources
)

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

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

Returns:

a Flowable that emits items all of the items emitted by the Publishers emitted by Publishers, one after the other, without interleaving them
concat
(Publisher<? extends Publisher<? extends T>>
a Publisher that emits Publishers
sources
)

Returns a Flowable that emits the items emitted by each of the Publishers emitted by the source Publisher, one after the other, without interleaving them.

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

Returns:

a Flowable that emits items all of the items emitted by the Publishers emitted by Publishers, one after the other, without interleaving them
concat
(Publisher<? extends Publisher<? extends T>>
a Publisher that emits Publishers
sources
,
int
the number of Publishers to prefetch from the sources sequence.
prefetch
)

Returns a Flowable that emits the items emitted by each of the Publishers emitted by the source Publisher, one after the other, without interleaving them.

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

Returns:

a Flowable that emits items emitted by the two source Publishers, one after the other, without interleaving them
concat
(Publisher<? extends T>
a Publisher to be concatenated
source1
,
Publisher<? extends T>
a Publisher to be concatenated
source2
)

Returns a Flowable that emits the items emitted by two Publishers, one after the other, without interleaving them.

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

Returns:

a Flowable that emits items emitted by the three source Publishers, one after the other, without interleaving them
concat
(Publisher<? extends T>
a Publisher to be concatenated
source1
,
Publisher<? extends T>
a Publisher to be concatenated
source2
,
Publisher<? extends T>
a Publisher to be concatenated
source3
)

Returns a Flowable that emits the items emitted by three Publishers, one after the other, without interleaving them.

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

Returns:

a Flowable that emits items emitted by the four source Publishers, one after the other, without interleaving them
concat
(Publisher<? extends T>
a Publisher to be concatenated
source1
,
Publisher<? extends T>
a Publisher to be concatenated
source2
,
Publisher<? extends T>
a Publisher to be concatenated
source3
,
Publisher<? extends T>
a Publisher to be concatenated
source4
)

Returns a Flowable that emits the items emitted by four Publishers, one after the other, without interleaving them.

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

Returns:

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

Concatenates a variable number of Publisher sources.

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

Returns:

the new Flowable instance
concatArrayDelayError
(Publisher<? extends T>...
the array of sources
sources
)

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

Concatenates a Publisher sequence of Publishers eagerly into a single stream of values.

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

Returns:

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

Concatenates a Publisher sequence of Publishers eagerly into a single stream of values.

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

Returns:

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

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

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

Returns:

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

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

public final <
the type of the inner Publisher sources and thus the output type
R
>
Flowable<R>

Returns:

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

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

public final <
the type of the inner Publisher sources and thus the output type
R
>
Flowable<R>

Returns:

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

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

public final Completable

Returns:

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

Maps the upstream items into CompletableSources and subscribes to them one after the other completes.

public final Completable

Returns:

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

Maps the upstream items into CompletableSources and subscribes to them one after the other completes.

public final Completable

Returns:

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

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

public final Completable

Returns:

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

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

public final Completable

Returns:

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

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

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

Returns:

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

Maps each of the items into a Publisher, 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 Publishers till all of them terminate.

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

Returns:

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

Maps each of the items into a Publisher, 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 Publishers till all of them terminate.

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

Returns:

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

Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single Publisher.

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

Returns:

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

Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single Publisher.

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

Returns:

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

Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single Publisher.

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

Returns:

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

Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single Publisher.

public final <
the type of item emitted by the resulting Publisher
U
>
Flowable<U>

Returns:

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

Returns a Flowable that concatenate each item emitted by the source Publisher 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 Publisher
U
>
Flowable<U>

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable that emits items emitted by the two source Publishers, one after the other, without interleaving them
concatWith
(Publisher<? extends T>
a Publisher to be concatenated after the current
other
)

Returns a Flowable that emits the items emitted from the current Publisher, then the next, one after the other, without interleaving them.

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Single<Boolean>

Returns:

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

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

public final Single<Long>

Returns:

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

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

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

Returns:

the new Flowable instance
create
(FlowableOnSubscribe<T>
the emitter that is called when a Subscriber subscribes to the returned Flowable
source
,
BackpressureStrategy
the backpressure mode to apply if the downstream Subscriber doesn't request (fast) enough
mode
)

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

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

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

public final Flowable<T>

Returns:

a Flowable that emits either the specified default item if the source Publisher emits no items, or the items emitted by the source Publisher
defaultIfEmpty
(T
the item to emit if the source Publisher emits no items
defaultItem
)

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

public static <
the type of the items emitted by the Publisher
T
>
Flowable<T>

Returns:

a Flowable whose Subscribers' subscriptions trigger an invocation of the given Publisher factory function
defer
(Callable<? extends Publisher<? extends T>>
the Publisher factory function to invoke for each Subscriber that subscribes to the resulting Publisher
supplier
)

Returns a Flowable that calls a Publisher factory to create a Publisher for each new Subscriber that subscribes.

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

Returns:

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

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

public final Flowable<T>

Returns:

the source Publisher 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 a Flowable that emits the items emitted by the source Publisher shifted forward in time by a specified delay.

public final Flowable<T>

Returns:

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

Returns a Flowable that emits the items emitted by the source Publisher shifted forward in time by a specified delay.

public final Flowable<T>

Returns:

the source Publisher 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 a Flowable that emits the items emitted by the source Publisher shifted forward in time by a specified delay.

public final Flowable<T>

Returns:

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

Returns a Flowable that emits the items emitted by the source Publisher shifted forward in time by a specified delay.

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

Returns:

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

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

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

Returns:

a Flowable that delays the subscription to this Publisher until the other Publisher emits an element or completes normally.
delaySubscription
(Publisher<U>
the other Publisher that should trigger the subscription to this Publisher.
subscriptionIndicator
)

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

public final Flowable<T>

Returns:

a Flowable that delays the subscription to the source Publisher by the given amount
delaySubscription
(long
the time to delay the subscription
delay
,
TimeUnit
the time unit of delay
unit
)

Returns a Flowable that delays the subscription to the source Publisher by a given amount of time.

public final Flowable<T>

Returns:

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

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

Returns:

a Flowable that emits the items and notifications embedded in the Notification objects emitted by the source Publisher
dematerialize
()

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

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable that emits only those items emitted by the source Publisher that are distinct from each other
distinct
()

Returns a Flowable that emits all items emitted by the source Publisher that are distinct based on Object#equals(Object) comparison.

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

Returns:

a Flowable that emits those items emitted by the source Publisher that have distinct keys
distinct
(Function<? super T, K>
a function that projects an emitted item to a key value that is used to decide whether an item is distinct from another one or not
keySelector
)

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

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

Returns:

a Flowable that emits those items emitted by the source Publisher that have distinct keys
distinct
(Function<? super T, K>
a function that projects an emitted item to a key value that is used to decide whether an item is distinct from another one or not
keySelector
,
Callable<? extends Collection<? super K>>
function called for each individual Subscriber to return a Collection subtype for holding the extracted keys and whose add() method's return indicates uniqueness.
collectionSupplier
)

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

public final Flowable<T>

Returns:

a Flowable that emits those items from the source Publisher that are distinct from their immediate predecessors
distinctUntilChanged
()

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

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

Returns:

a Flowable that emits those items from the source Publisher whose keys are distinct from those of their immediate predecessors
distinctUntilChanged
(Function<? super T, K>
a function that projects an emitted item to a key value that is used to decide whether an item is distinct from another one or not
keySelector
)

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable that emits the same items as the source Publisher, then invokes the Action
doAfterTerminate
(Action
an Action to be invoked when the source Publisher finishes
onAfterTerminate
)

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

public final Flowable<T>

Returns:

the new Flowable instance
doFinally
(Action
the action called when this Flowable terminates or gets canceled
onFinally
)

Calls the specified action after this Flowable signals onError or onCompleted or gets canceled by the downstream.

public final Flowable<T>

Returns:

the source Publisher modified so as to call this Action when appropriate
doOnCancel
(Action
the action that gets called when the source Publisher's Subscription is canceled
onCancel
)

Calls the cancel Action if the downstream cancels the sequence.

public final Flowable<T>

Returns:

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

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

private Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

Modifies the source Publisher so that it notifies a Subscriber for each item and terminal event it emits.

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

the source Publisher with the side-effecting behavior applied
doOnLifecycle
(final Consumer<? super Subscription>
a Consumer called with the Subscription sent via Subscriber.onSubscribe()
onSubscribe
,
final LongConsumer
a LongConsumer called with the request amount sent via Subscription.request()
onRequest
,
final Action
called when the downstream cancels the Subscription via cancel()
onCancel
)

Calls the appropriate onXXX method (shared between all Subscribers) for the lifecycle events of the sequence (subscription, cancellation, requesting).

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

the source Publisher modified so as to call this Action when appropriate
doOnRequest
(LongConsumer
the action that gets called when a Subscriber requests items from this Publisher
onRequest
)

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

public final Flowable<T>

Returns:

the source Publisher modified so as to call this Consumer when appropriate
doOnSubscribe
(Consumer<? super Subscription>
the Consumer that gets called when a Subscriber subscribes to the current Flowable
onSubscribe
)

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

public final Flowable<T>

Returns:

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

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

public final Maybe<T>

Returns:

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

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

public final Single<T>

Returns:

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

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

public final Single<T>

Returns:

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

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

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

Returns:

a Flowable that emits no items to the Subscriber but immediately invokes the Subscriber's onComplete method
empty
()

Returns a Flowable that emits no items to the Subscriber and immediately invokes its onComplete method.

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

Returns:

a Flowable that invokes the Subscriber's onError method when the Subscriber subscribes to it
error
(Callable<? extends Throwable>
a Callable factory to return a Throwable for each individual Subscriber
supplier
)

Returns a Flowable that invokes a Subscriber's onError method when the Subscriber subscribes to it.

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

Returns:

a Flowable that invokes the Subscriber's onError method when the Subscriber subscribes to it
error
(final Throwable
the particular Throwable to pass to onError
throwable
)

Returns a Flowable that invokes a Subscriber's onError method when the Subscriber subscribes to it.

public final Flowable<T>

Returns:

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

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

public final Single<T>

Returns:

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

Returns a Single that emits only the very first item emitted by this Flowable, or a default item if this Flowable completes without emitting anything.

public final Maybe<T>

Returns:

the new Maybe instance
firstElement
()

Returns a Maybe that emits only the very first item emitted by this Flowable or completes if this Flowable is empty.

public final Single<T>

Returns:

the new Single instance
firstOrError
()

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

public final <
the value type of the inner Publishers and the output type
R
>
Flowable<R>

Returns:

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

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

public final <
the value type of the inner Publishers and the output type
R
>
Flowable<R>

Returns:

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

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

public final <
the value type of the inner Publishers and the output type
R
>
Flowable<R>

Returns:

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

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

public final <
the value type of the inner Publishers and the output type
R
>
Flowable<R>

Returns:

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

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

public final <
the value type of the inner Publishers and the output type
R
>
Flowable<R>

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

public final <
the type of items emitted by the inner Publishers
U
,
the type of items emitted by the combiner function
R
>
Flowable<R>

Returns:

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

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

public final <
the type of items emitted by the inner Publishers
U
,
the type of items emitted by the combiner functions
R
>
Flowable<R>

Returns:

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

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

public final <
the type of items emitted by the inner Publishers
U
,
the type of items emitted by the combiner function
R
>
Flowable<R>

Returns:

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

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

public final <
the type of items emitted by the inner Publishers
U
,
the type of items emitted by the combiner function
R
>
Flowable<R>

Returns:

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

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

public final <
the type of items emitted by the inner Publishers
U
,
the type of items emitted by the combiner function
R
>
Flowable<R>

Returns:

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

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

public final Completable

Returns:

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

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

public final Completable

Returns:

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

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

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

Returns:

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

Returns a Flowable that merges each item emitted by the source Publisher 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 Iterable
U
>
Flowable<U>

Returns:

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

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

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

Returns:

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

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

public final <
the element type of the inner Iterable sequences
U
,
the type of item emitted by the resulting Publisher
V
>
Flowable<V>

Returns:

a Flowable that emits the results of merging the items emitted by the source Publisher with the values in the Iterables corresponding to those items, as generated by collectionSelector
flatMapIterable
(final Function<? super T, ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the source Publisher
mapper
,
final BiFunction<? super T, ? super U, ? extends V>
a function that returns an item based on the item emitted by the source Publisher and the Iterable returned for that item by the collectionSelector
resultSelector
,
int
the number of elements to prefetch from the current Flowable
prefetch
)

Returns a Flowable that merges each item emitted by the source Publisher 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 Publishers.

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

public final Disposable

Returns:

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

Subscribes to the Publisher and receives notifications for each element.

public final Disposable

Returns:

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

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

public final Disposable

Returns:

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

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

public final Disposable

Returns:

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

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

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

Returns:

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

Converts an Array into a Publisher that emits the items in the Array.

public static <
the type of the item emitted by the Publisher
T
>
Flowable<T>

Returns:

a Flowable whose Subscribers' 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 a Subscriber subscribes to the Publisher that fromCallable returns
supplier
)

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

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

Returns:

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

Converts a Future into a Publisher.

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

Returns:

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

Converts a Future into a Publisher, 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 Publisher
T
>
Flowable<T>

Returns:

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

Converts a Future into a Publisher, 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 Publisher
T
>
Flowable<T>

Returns:

a Flowable that emits the item from the source Future
fromFuture
(Future<? extends T>
the source Future
future
,
Scheduler
the Scheduler to wait for the Future on. Use a Scheduler such as Schedulers#io() that can block and wait on the Future
scheduler
)

Converts a Future, operating on a specified Scheduler, into a Publisher.

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

Returns:

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

Converts an Iterable sequence into a Publisher that emits the items in the sequence.

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

Returns:

the new Flowable instance
fromPublisher
(final Publisher<? extends T>
the Publisher to convert
source
)

Converts an arbitrary Reactive Streams Publisher into a Flowable if not already a Flowable.

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

Returns:

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

Returns a cold, synchronous, stateless and backpressure-aware generator of values.

public static <
the generated value type
T
,
the type of the per-Subscriber state
S
>
Flowable<T>

Returns:

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

Returns a cold, synchronous, stateful and backpressure-aware generator of values.

public static <
the generated value type
T
,
the type of the per-Subscriber state
S
>
Flowable<T>

Returns:

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

Returns a cold, synchronous, stateful and backpressure-aware generator of values.

public static <
the generated value type
T
,
the type of the per-Subscriber state
S
>
Flowable<T>

Returns:

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

Returns a cold, synchronous, stateful and backpressure-aware generator of values.

public static <
the generated value type
T
,
the type of the per-Subscriber state
S
>
Flowable<T>

Returns:

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

Returns a cold, synchronous, stateful and backpressure-aware generator of values.

public final <
the key type
K
>
Flowable<GroupedFlowable<K, T>>

Returns:

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

Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items as GroupedFlowables.

public final <
the key type
K
>
Flowable<GroupedFlowable<K, T>>

Returns:

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

Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items as GroupedFlowables.

public final <
the key type
K
,
the element type
V
>
Flowable<GroupedFlowable<K, V>>

Returns:

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

Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items as GroupedFlowables.

public final <
the key type
K
,
the element type
V
>
Flowable<GroupedFlowable<K, V>>

Returns:

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

Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items as GroupedFlowables.

public final <
the key type
K
,
the element type
V
>
Flowable<GroupedFlowable<K, V>>

Returns:

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

Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items as GroupedFlowables.

public final <
the key type
K
,
the element type
V
>
Flowable<GroupedFlowable<K, V>>

Returns:

a Publisher that emits GroupedFlowables, each of which corresponds to a unique key value and each of which emits those items from the source Publisher that share that key value
groupBy
(Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
Function<? super T, ? extends V>
a function that extracts the return element for each item
valueSelector
,
boolean
if true, the exception from the current Flowable is delayed in each group until that specific group emitted the normal values; if false, the exception bypasses values in the groups and is reported immediately.
delayError
,
int
the hint for how many GroupedFlowables and element in each GroupedFlowable should be buffered
bufferSize
,
Function<? super Consumer<Object>, ? extends Map<K, Object>>
The factory used to create a map that will be used by the implementation to hold the GroupedFlowables. The evicting map created by this factory must notify the provided Consumer<Object> with the entry value (not the key!) when an entry in this map has been evicted. The next source emission will bring about the completion of the evicted GroupedFlowables. See example above.
evictingMapFactory
)

Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items as GroupedFlowables.

public final <
the value type of the right Publisher source
TRight
,
the element type of the left duration Publishers
TLeftEnd
,
the element type of the right duration Publishers
TRightEnd
,
the result type
R
>
Flowable<R>

Returns:

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

Returns a Flowable that correlates two Publishers when they overlap in time and groups the results.

public final Flowable<T>

Returns:

the new Flowable instance
hide
()

Hides the identity of this Flowable and its Subscription.

public final Completable

Returns:

a Completable that only calls onComplete or onError, based on which one is called by the source Publisher
ignoreElements
()

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

public static Flowable<Long>

Returns:

a Flowable 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 a Flowable that emits a 0L after the initialDelay and ever-increasing numbers after each period of time thereafter.

public static Flowable<Long>

Returns:

a Flowable 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 a Flowable that emits a 0L after the initialDelay and ever-increasing numbers after each period of time thereafter, on a specified Scheduler.

public static Flowable<Long>

Returns:

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

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

public static Flowable<Long>

Returns:

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

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

public static Flowable<Long>

Returns:

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

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

public static Flowable<Long>

Returns:

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

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

public final Single<Boolean>

Returns:

a Flowable that emits a Boolean
isEmpty
()

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

public final <
the value type of the right Publisher source
TRight
,
the element type of the left duration Publishers
TLeftEnd
,
the element type of the right duration Publishers
TRightEnd
,
the result type
R
>
Flowable<R>

Returns:

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

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

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

Returns:

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

Returns a Flowable that signals the given (constant reference) item and then completes.

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

Returns:

a Flowable that emits each item
just
(T
first item
item1
,
T
second item
item2
)

Converts two items into a Publisher that emits those items.

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

Returns:

a Flowable that emits each item
just
(T
first item
item1
,
T
second item
item2
,
T
third item
item3
)

Converts three items into a Publisher that emits those items.

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

Returns:

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

Converts four items into a Publisher that emits those items.

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

Returns:

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

Converts five items into a Publisher that emits those items.

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

Returns:

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

Converts six items into a Publisher that emits those items.

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

Returns:

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

Converts seven items into a Publisher that emits those items.

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

Returns:

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

Converts eight items into a Publisher that emits those items.

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

Returns:

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

Converts nine items into a Publisher that emits those items.

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

Returns:

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

Converts ten items into a Publisher that emits those items.

public final Single<T>

Returns:

the new Single instance
last
(T
the default item to emit if the source Publisher is empty
defaultItem
)

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

public final Maybe<T>

Returns:

a new Maybe instance
lastElement
()

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

public final Single<T>

Returns:

the new Single instance
lastOrError
()

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

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

Returns:

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

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

public final Flowable<T>

Returns:

the new Flowable instance
limit
(long
the maximum number of items and the total request amount, non-negative. Zero will immediately cancel the upstream on subscription and complete the downstream.
count
)

Limits both the number of upstream items (after which the sequence completes) and the total downstream request amount requested from the upstream to possibly prevent the creation of excess items by the upstream.

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

Returns:

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

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

public final Flowable<Notification<T>>

Returns:

a Flowable that emits items that are the result of materializing the items and notifications of the source Publisher
materialize
()

Returns a Flowable that represents all of the emissions and notifications from the source Publisher into emissions marked with their original types within Notification objects.

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

Returns:

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

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

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

Returns:

a Flowable that emits items that are the result of flattening the items emitted by the Publishers in the Iterable
merge
(Iterable<? extends Publisher<? extends T>>
the Iterable of Publishers
sources
)

Flattens an Iterable of Publishers into one Publisher, without any transformation.

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

Returns:

a Flowable that emits items that are the result of flattening the items emitted by the Publishers in the Iterable
merge
(Iterable<? extends Publisher<? extends T>>
the Iterable of Publishers
sources
,
int
the maximum number of Publishers that may be subscribed to concurrently
maxConcurrency
)

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

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

Returns:

a Flowable that emits items that are the result of flattening the Publishers emitted by the source Publisher
merge
(Publisher<? extends Publisher<? extends T>>
a Publisher that emits Publishers
sources
)

Flattens a Publisher that emits Publishers into a single Publisher that emits the items emitted by those Publishers, without any transformation.

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

Returns:

a Flowable that emits items that are the result of flattening the Publishers emitted by the source Publisher
merge
(Publisher<? extends Publisher<? extends T>>
a Publisher that emits Publishers
sources
,
int
the maximum number of Publishers that may be subscribed to concurrently
maxConcurrency
)

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

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

Returns:

a Flowable that emits all of the items emitted by the source Publishers
merge
(Publisher<? extends T>
a Publisher to be merged
source1
,
Publisher<? extends T>
a Publisher to be merged
source2
)

Flattens two Publishers into a single Publisher, without any transformation.

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

Returns:

a Flowable that emits all of the items emitted by the source Publishers
merge
(Publisher<? extends T>
a Publisher to be merged
source1
,
Publisher<? extends T>
a Publisher to be merged
source2
,
Publisher<? extends T>
a Publisher to be merged
source3
)

Flattens three Publishers into a single Publisher, without any transformation.

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

Returns:

a Flowable that emits all of the items emitted by the source Publishers
merge
(Publisher<? extends T>
a Publisher to be merged
source1
,
Publisher<? extends T>
a Publisher to be merged
source2
,
Publisher<? extends T>
a Publisher to be merged
source3
,
Publisher<? extends T>
a Publisher to be merged
source4
)

Flattens four Publishers into a single Publisher, without any transformation.

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

Returns:

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

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

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

Returns:

a Flowable that emits all of the items emitted by the Publishers in the Array
mergeArray
(Publisher<? extends T>...
the array of Publishers
sources
)

Flattens an Array of Publishers into one Publisher, without any transformation.

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

Returns:

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

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

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

Returns:

a Flowable that emits items that are the result of flattening the items emitted by the Publishers in the Iterable
mergeArrayDelayError
(Publisher<? extends T>...
the Iterable of Publishers
sources
)

Flattens an array of Publishers into one Flowable, in a way that allows a Subscriber to receive all successfully emitted items from each of the source Publishers without being interrupted by an error notification from one of them.

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

Returns:

a Flowable that emits items that are the result of flattening the items emitted by the Publishers in the Iterable
mergeDelayError
(Iterable<? extends Publisher<? extends T>>
the Iterable of Publishers
sources
)

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

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

Returns:

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

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

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

Returns:

a Flowable that emits items that are the result of flattening the items emitted by the Publishers in the Iterable
mergeDelayError
(Iterable<? extends Publisher<? extends T>>
the Iterable of Publishers
sources
,
int
the maximum number of Publishers that may be subscribed to concurrently
maxConcurrency
)

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

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

Returns:

a Flowable that emits all of the items emitted by the Publishers emitted by the source Publisher
mergeDelayError
(Publisher<? extends Publisher<? extends T>>
a Publisher that emits Publishers
sources
)

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

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

Returns:

a Flowable that emits all of the items emitted by the Publishers emitted by the source Publisher
mergeDelayError
(Publisher<? extends Publisher<? extends T>>
a Publisher that emits Publishers
sources
,
int
the maximum number of Publishers that may be subscribed to concurrently
maxConcurrency
)

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

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

Returns:

a Flowable that emits all of the items that are emitted by the two source Publishers
mergeDelayError
(Publisher<? extends T>
a Publisher to be merged
source1
,
Publisher<? extends T>
a Publisher to be merged
source2
)

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

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

Returns:

a Flowable that emits all of the items that are emitted by the source Publishers
mergeDelayError
(Publisher<? extends T>
a Publisher to be merged
source1
,
Publisher<? extends T>
a Publisher to be merged
source2
,
Publisher<? extends T>
a Publisher to be merged
source3
)

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

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

Returns:

a Flowable that emits all of the items that are emitted by the source Publishers
mergeDelayError
(Publisher<? extends T>
a Publisher to be merged
source1
,
Publisher<? extends T>
a Publisher to be merged
source2
,
Publisher<? extends T>
a Publisher to be merged
source3
,
Publisher<? extends T>
a Publisher to be merged
source4
)

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

public final Flowable<T>

Returns:

a Flowable that emits all of the items emitted by the source Publishers
mergeWith
(Publisher<? extends T>
a Publisher to be merged
other
)

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public static <
the type of items (not) emitted by the Publisher
T
>
Flowable<T>

Returns:

a Flowable that never emits any items or sends any notifications to a Subscriber
never
()

Returns a Flowable that never sends any items or notifications to a Subscriber.

public final Flowable<T>

Returns:

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

Modifies a Publisher to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer of bufferSize() slots.

public final Flowable<T>

Returns:

the source Publisher modified so that its Subscribers are notified on the specified Scheduler
observeOn
(Scheduler
the Scheduler to notify Subscribers 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 a Publisher to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer and optionally delays onError notifications.

public final Flowable<T>

Returns:

the source Publisher modified so that its Subscribers are notified on the specified Scheduler
observeOn
(Scheduler
the Scheduler to notify Subscribers 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 a Publisher 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
U
>
Flowable<U>

Returns:

a Flowable that emits items from the source Publisher of type clazz
ofType
(final Class<U>
the class type to filter the items emitted by the source Publisher
clazz
)

Filters the items emitted by a Publisher, only emitting those of the specified type.

public final Flowable<T>

Returns:

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

Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer these items indefinitely until they can be emitted.

public final Flowable<T>

Returns:

the source Publisher modified to buffer items to the extent system resources allow
onBackpressureBuffer
(boolean
if true, an exception from the current Flowable is delayed until all buffered elements have been consumed by the downstream; if false, an exception is immediately signaled to the downstream, skipping any buffered element
delayError
)

Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer these items indefinitely until they can be emitted.

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

the source Publisher modified to buffer items up to the given capacity.
onBackpressureBuffer
(int
number of slots available in the buffer.
capacity
,
boolean
if true, an exception from the current Flowable is delayed until all buffered elements have been consumed by the downstream; if false, an exception is immediately signaled to the downstream, skipping any buffered element
delayError
)

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

public final Flowable<T>

Returns:

the source Publisher modified to buffer items up to the given capacity.
onBackpressureBuffer
(int
number of slots available in the buffer.
capacity
,
boolean
if true, an exception from the current Flowable is delayed until all buffered elements have been consumed by the downstream; if false, an exception is immediately signaled to the downstream, skipping any buffered element
delayError
,
boolean
if true, the capacity value is interpreted as the internal "island" size of the unbounded buffer
unbounded
)

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

public final Flowable<T>

Returns:

the source Publisher modified to buffer items up to the given capacity
onBackpressureBuffer
(int
number of slots available in the buffer.
capacity
,
boolean
if true, an exception from the current Flowable is delayed until all buffered elements have been consumed by the downstream; if false, an exception is immediately signaled to the downstream, skipping any buffered element
delayError
,
boolean
if true, the capacity value is interpreted as the internal "island" size of the unbounded buffer
unbounded
,
Action
action to execute if an item needs to be buffered, but there are no available slots. Null is allowed.
onOverflow
)

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

Instructs a Publisher that is emitting items faster than its Subscriber can consume them to discard, rather than emit, those items that its Subscriber is not prepared to observe.

public final Flowable<T>

Returns:

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

Instructs a Publisher that is emitting items faster than its Subscriber can consume them to discard, rather than emit, those items that its Subscriber is not prepared to observe.

public final Flowable<T>

Returns:

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

Instructs a Publisher that is emitting items faster than its Subscriber can consume them to hold onto the latest value and emit that on request.

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable which nulls out references to the upstream producer and downstream Subscriber if the sequence is terminated or downstream cancels
onTerminateDetach
()

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

public final ParallelFlowable<T>

Returns:

the new ParallelFlowable instance
parallel
()

Parallelizes the flow by creating multiple 'rails' (equal to the number of CPUs) and dispatches the upstream items to them in a round-robin fashion.

public final ParallelFlowable<T>

Returns:

the new ParallelFlowable instance
parallel
(int
the number of 'rails' to use
parallelism
)

Parallelizes the flow by creating the specified number of 'rails' and dispatches the upstream items to them in a round-robin fashion.

public final ParallelFlowable<T>

Returns:

the new ParallelFlowable instance
parallel
(int
the number of 'rails' to use
parallelism
,
int
the number of items each 'rail' should prefetch
prefetch
)

Parallelizes the flow by creating the specified number of 'rails' and dispatches the upstream items to them in a round-robin fashion and uses the defined per-'rail' prefetch amount.

public final ConnectableFlowable<T>

Returns:

a ConnectableFlowable that upon connection causes the source Publisher to emit items to its Subscribers
publish
()

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

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits the results of invoking the selector on the items emitted by a ConnectableFlowable that shares a single subscription to the underlying sequence
publish
(Function<? super Flowable<T>, ? extends Publisher<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 a Flowable that emits the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the underlying sequence.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits the results of invoking the selector on the items emitted by a ConnectableFlowable that shares a single subscription to the underlying sequence
publish
(Function<? super Flowable<T>, ? extends Publisher<? extends 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
,
int
the number of elements to prefetch from the current Flowable
prefetch
)

Returns a Flowable that emits the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the underlying sequence.

public final ConnectableFlowable<T>

Returns:

a ConnectableFlowable that upon connection causes the source Publisher to emit items to its Subscribers
publish
(int
the number of elements to prefetch from the current Flowable
bufferSize
)

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

public static Flowable<Integer>

Returns:

a Flowable 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 a Flowable that emits a sequence of Integers within a specified range.

public static Flowable<Long>

Returns:

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

Returns a Flowable that emits a sequence of Longs within a specified range.

public final Flowable<T>

Returns:

the Publisher 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 Maybe<T>

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable that emits the items emitted by the source Publisher repeatedly and in sequence
repeat
()

Returns a Flowable that repeats the sequence of items emitted by the source Publisher indefinitely.

public final Flowable<T>

Returns:

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

Returns a Flowable that repeats the sequence of items emitted by the source Publisher at most count times.

public final Flowable<T>

Returns:

the new Flowable instance
repeatUntil
(BooleanSupplier
a boolean supplier that is called when the current Flowable completes and unless it returns false, the current Flowable is resubscribed
stop
)

Returns a Flowable that repeats the sequence of items emitted by the source Publisher until the provided stop function returns true.

public final Flowable<T>

Returns:

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

Returns a Flowable that emits the same values as the source Publisher with the exception of an onComplete.

public final ConnectableFlowable<T>

Returns:

a ConnectableFlowable that upon connection causes the source Publisher to emit its items to its Subscribers
replay
()

Returns a ConnectableFlowable that shares a single subscription to the underlying Publisher that will replay all of its items and notifications to any future Subscriber.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits items that are the results of invoking the selector on a ConnectableFlowable that shares a single subscription to the source Publisher
replay
(Function<? super Flowable<T>, ? extends Publisher<R>>
the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisher
selector
)

Returns a Flowable that emits items that are the results of invoking a specified selector on the items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits items that are the results of invoking the selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher replaying no more than bufferSize items
replay
(Function<? super Flowable<T>, ? extends Publisher<R>>
the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisher
selector
,
final int
the buffer size that limits the number of items the connectable Publisher can replay
bufferSize
)

Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying bufferSize notifications.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits items that are the results of invoking the selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, and replays no more than bufferSize items that were emitted within the window defined by time
replay
(Function<? super Flowable<T>, ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisher
selector
,
int
the buffer size that limits the number of items the connectable Publisher 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 a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying no more than bufferSize items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits items that are the results of invoking the selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, and replays no more than bufferSize items that were emitted within the window defined by time
replay
(Function<? super Flowable<T>, ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisher
selector
,
final int
the buffer size that limits the number of items the connectable Publisher 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 a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying no more than bufferSize items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits items that are the results of invoking the selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying no more than bufferSize notifications
replay
(final Function<? super Flowable<T>, ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisher
selector
,
final int
the buffer size that limits the number of items the connectable Publisher can replay
bufferSize
,
final Scheduler
the Scheduler on which the replay is observed
scheduler
)

Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying a maximum of bufferSize items.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits items that are the results of invoking the selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within the window defined by time
replay
(Function<? super Flowable<T>, ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisher
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 a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits items that are the results of invoking the selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within the window defined by time
replay
(Function<? super Flowable<T>, ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisher
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 a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within a specified time window.

public final <
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that emits items that are the results of invoking the selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items
replay
(final Function<? super Flowable<T>, ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisher
selector
,
final Scheduler
the Scheduler where the replay is observed
scheduler
)

Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher.

public final ConnectableFlowable<T>

Returns:

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

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

public final ConnectableFlowable<T>

Returns:

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

public final ConnectableFlowable<T>

Returns:

a ConnectableFlowable that shares a single subscription to the source Publisher 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 ConnectableFlowable that shares a single subscription to the source Publisher and that replays a maximum of bufferSize items that are emitted within a specified time window.

public final ConnectableFlowable<T>

Returns:

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

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

public final ConnectableFlowable<T>

Returns:

a ConnectableFlowable that shares a single subscription to the source Publisher 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 ConnectableFlowable that shares a single subscription to the source Publisher and replays all items emitted by that Publisher within a specified time window.

public final ConnectableFlowable<T>

Returns:

a ConnectableFlowable that shares a single subscription to the source Publisher 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 ConnectableFlowable that shares a single subscription to the source Publisher and replays all items emitted by that Publisher within a specified time window.

public final ConnectableFlowable<T>

Returns:

a ConnectableFlowable that shares a single subscription to the source Publisher that will replay all of its items and notifications to any future Subscriber on the given Scheduler
replay
(final Scheduler
the Scheduler on which the Subscribers will observe the emitted items
scheduler
)

Returns a ConnectableFlowable that shares a single subscription to the source Publisher that will replay all of its items and notifications to any future Subscriber on the given Scheduler.

public final Flowable<T>

Returns:

the source Publisher modified with retry logic
retry
()

Returns a Flowable that mirrors the source Publisher, resubscribing to it if it calls onError (infinite retry count).

public final Flowable<T>

Returns:

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

Returns a Flowable that mirrors the source Publisher, resubscribing to it if it calls onError and the predicate returns true for that specific exception and retry count.

public final Flowable<T>

Returns:

the source Publisher modified with retry logic
retry
(long
the number of times to resubscribe if the current Flowable fails
count
)

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

Retries the current Flowable if the predicate returns true.

public final Flowable<T>

Returns:

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

Retries until the given stop function returns true.

public final Flowable<T>

Returns:

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

Returns a Flowable that emits the same values as the source Publisher with the exception of an onError.

public final void
safeSubscribe(Subscriber<? super T>
the incoming Subscriber instance
s
)

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

public final Flowable<T>

Returns:

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

Returns a Flowable that emits the most recently emitted item (if any) emitted by the source Publisher within periodic time intervals.

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable that emits the results of sampling the items emitted by the source Publisher 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 a Flowable that emits the most recently emitted item (if any) emitted by the source Publisher within periodic time intervals, where the intervals are defined on a particular Scheduler.

public final Flowable<T>

Returns:

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

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

public final <
the element type of the sampler Publisher
U
>
Flowable<T>

Returns:

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

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

public final <
the element type of the sampler Publisher
U
>
Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

public final Flowable<T>

Returns:

a Publisher that is guaranteed to be well-behaved and to make only serialized calls to its Subscribers
serialize
()

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

public final Flowable<T>

Returns:

a Publisher that upon connection causes the source Publisher to emit items to its Subscribers
share
()

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

public final Single<T>

Returns:

a Single that emits the single item emitted by the source Publisher, or a default item if the source Publisher is empty
single
(T
a default value to emit if the source Publisher emits no item
defaultItem
)

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

public final Maybe<T>

Returns:

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

Returns a Maybe that completes if this Flowable is empty, signals one item if this Flowable signals exactly one item or signals an IllegalArgumentException if this Flowable signals more than one item.

public final Single<T>

Returns:

the new Single instance
singleOrError
()

Returns a Single that emits the single item emitted by this Flowable, if this Flowable emits only a single item, otherwise if this Flowable completes without emitting any items a NoSuchElementException will be signaled and if this Flowable emits more than one item, an IllegalArgumentException will be signaled.

public final Flowable<T>

Returns:

a Flowable that is identical to the source Publisher except that it does not emit the first count items that the source Publisher emits
skip
(long
the number of items to skip
count
)

Returns a Flowable that skips the first count items emitted by the source Publisher and emits the remainder.

public final Flowable<T>

Returns:

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

public final Flowable<T>

Returns:

a Flowable that skips values emitted by the source Publisher 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 a Flowable that skips values emitted by the source Publisher before a specified time window on a specified Scheduler elapses.

public final Flowable<T>

Returns:

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

Returns a Flowable that drops a specified number of items from the end of the sequence emitted by the source Publisher.

public final Flowable<T>

Returns:

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

public final Flowable<T>

Returns:

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

Returns a Flowable that drops items emitted by the source Publisher during a specified time window before the source completes.

public final Flowable<T>

Returns:

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

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

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

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

public final <
the element type of the other Publisher
U
>
Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable that begins emitting items emitted by the source Publisher when the specified predicate becomes false
skipWhile
(Predicate<? super T>
a function to test each item emitted from the source Publisher
predicate
)

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

public final Flowable<T>

Returns:

a Flowable that emits the items emitted by the source Publisher in sorted order
sorted
()

Returns a Flowable that emits the events emitted by source Publisher, in a sorted order.

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

a Flowable that emits the items in the specified Iterable and then emits the items emitted by the source Publisher
startWith
(Iterable<? extends T>
an Iterable that contains the items you want the modified Publisher to emit first
items
)

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

public final Flowable<T>

Returns:

a Flowable that emits the items in the specified Publisher and then emits the items emitted by the source Publisher
startWith
(Publisher<? extends T>
a Publisher that contains the items you want the modified Publisher to emit first
other
)

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

public final Flowable<T>

Returns:

a Flowable that emits the specified item before it begins to emit items emitted by the source Publisher
startWith
(T
the item to emit first
value
)

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

public final Flowable<T>

Returns:

a Flowable that emits the specified items before it begins to emit items emitted by the source Publisher
startWithArray
(T...
the array of values to emit first
items
)

Returns a Flowable that emits the specified items before it begins to emit items emitted by the source Publisher.

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the Publisher has finished sending them
subscribe
()

Subscribes to a Publisher and ignores onNext and onComplete emissions.

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the Publisher has finished sending them
subscribe
(Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the Publisher
onNext
)

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

public final Disposable

Returns:

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

Subscribes to a Publisher and provides callbacks to handle the items it emits and any error notification it issues.

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the Publisher has finished sending them
subscribe
(Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the Publisher
onNext
,
Consumer<? super Throwable>
the Consumer<Throwable> you have designed to accept any error notification from the Publisher
onError
,
Action
the Action you have designed to accept a completion notification from the Publisher
onComplete
)

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

public final Disposable

Returns:

a Disposable reference with which the caller can stop receiving items before the Publisher has finished sending them
subscribe
(Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the Publisher
onNext
,
Consumer<? super Throwable>
the Consumer<Throwable> you have designed to accept any error notification from the Publisher
onError
,
Action
the Action you have designed to accept a completion notification from the Publisher
onComplete
,
Consumer<? super Subscription>
the Consumer that receives the upstream's Subscription
onSubscribe
)

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

public final void
subscribe(Subscriber<? super T>
the Subscriber that will consume signals from this Publisher
s
)

Implements org.reactivestreams.Publisher.subscribe.

Request Publisher to start streaming data.
public final void
subscribe(FlowableSubscriber<? super T>
the FlowableSubscriber that will consume signals from this Flowable
s
)

Establish a connection between this Flowable and the given FlowableSubscriber and start streaming events based on the demand of the FlowableSubscriber.

protected abstract void
subscribeActual(Subscriber<? super T>
the incoming Subscriber, never null
s
)

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers.

public final Flowable<T>

Returns:

the source Publisher modified so that its subscriptions happen on the specified Scheduler
subscribeOn
(Scheduler
the Scheduler to perform subscription actions on
scheduler
)

Asynchronously subscribes Subscribers to this Publisher on the specified Scheduler.

public final Flowable<T>

Returns:

the source Publisher 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 Subscribers to this Publisher on the specified Scheduler optionally reroutes requests from other threads to the same Scheduler thread.

public final <
the type of the Subscriber to use and return
E extends Subscriber<? super T>
>
E

Returns:

the input subscriber
subscribeWith
(E
the Subscriber (subclass) to use and return, not null
subscriber
)

Subscribes a given Subscriber (subclass) to this Flowable and returns the given Subscriber as is.

public final Flowable<T>

Returns:

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

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

public final <
the element type of the inner Publishers and the output
R
>
Flowable<R>

Returns:

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

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

public final <
the element type of the inner Publishers and the output
R
>
Flowable<R>

Returns:

a Flowable that emits the items emitted by the Publisher returned from applying func to the most recently emitted item emitted by the source Publisher
switchMap
(Function<? super T, ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the source Publisher, returns a Publisher
mapper
,
int
the number of elements to prefetch from the current active inner Publisher
bufferSize
)

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

pack-priv <R> Flowable<R>
switchMap0(Function<? super T, ? extends Publisher<? extends R>> mapper, int bufferSize, boolean delayError)

public final Completable

Returns:

the new Completable instance
switchMapCompletable
(Function<? super T, ? extends CompletableSource>
the function called with each upstream item and should return a CompletableSource to be subscribed to and awaited for (non blockingly) for its terminal event
mapper
)

Maps the upstream values into CompletableSources, subscribes to the newer one while disposing the subscription to the previous CompletableSource, thus keeping at most one active CompletableSource running.

public final Completable

Returns:

the new Completable instance
switchMapCompletableDelayError
(Function<? super T, ? extends CompletableSource>
the function called with each upstream item and should return a CompletableSource to be subscribed to and awaited for (non blockingly) for its terminal event
mapper
)

Maps the upstream values into CompletableSources, subscribes to the newer one while disposing the subscription to the previous CompletableSource, thus keeping at most one active CompletableSource running and delaying any main or inner errors until all of them terminate.

public final <
the element type of the inner Publishers and the output
R
>
Flowable<R>

Returns:

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

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

public final <
the element type of the inner Publishers and the output
R
>
Flowable<R>

Returns:

a Flowable that emits the items emitted by the Publisher returned from applying func to the most recently emitted item emitted by the source Publisher
switchMapDelayError
(Function<? super T, ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the source Publisher, returns a Publisher
mapper
,
int
the number of elements to prefetch from the current active inner Publisher
bufferSize
)

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

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

Returns:

the new Flowable instance
switchMapMaybe
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the current upstream event and should return a MaybeSource to replace the current active inner source and get subscribed to.
mapper
)

Maps the upstream items into MaybeSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one if available while failing immediately if this Flowable or any of the active inner MaybeSources fail.

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

Returns:

the new Flowable instance
switchMapMaybeDelayError
(Function<? super T, ? extends MaybeSource<? extends R>>
the function called with the current upstream event and should return a MaybeSource to replace the current active inner source and get subscribed to.
mapper
)

Maps the upstream items into MaybeSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one if available, delaying errors from this Flowable or the inner MaybeSources until all terminate.

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

Returns:

the new Flowable instance
switchMapSingle
(Function<? super T, ? extends SingleSource<? extends R>>
the function called with the current upstream event and should return a SingleSource to replace the current active inner source and get subscribed to.
mapper
)

Maps the upstream items into SingleSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one while failing immediately if this Flowable or any of the active inner SingleSources fail.

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

Returns:

the new Flowable instance
switchMapSingleDelayError
(Function<? super T, ? extends SingleSource<? extends R>>
the function called with the current upstream event and should return a SingleSource to replace the current active inner source and get subscribed to.
mapper
)

Maps the upstream items into SingleSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one, delaying errors from this Flowable or the inner SingleSources until all terminate.

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

Returns:

a Flowable that emits the items emitted by the Publisher most recently emitted by the source Publisher
switchOnNext
(Publisher<? extends Publisher<? extends T>>
the source Publisher that emits Publishers
sources
,
int
the number of items to prefetch from the inner Publishers
bufferSize
)

Converts a Publisher that emits Publishers into a Publisher that emits the items emitted by the most recently emitted of those Publishers.

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

Returns:

a Flowable that emits the items emitted by the Publisher most recently emitted by the source Publisher
switchOnNext
(Publisher<? extends Publisher<? extends T>>
the source Publisher that emits Publishers
sources
)

Converts a Publisher that emits Publishers into a Publisher that emits the items emitted by the most recently emitted of those Publishers.

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

Returns:

a Flowable that emits the items emitted by the Publisher most recently emitted by the source Publisher
switchOnNextDelayError
(Publisher<? extends Publisher<? extends T>>
the source Publisher that emits Publishers
sources
)

Converts a Publisher that emits Publishers into a Publisher that emits the items emitted by the most recently emitted of those Publishers and delays any exception until all Publishers terminate.

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

Returns:

a Flowable that emits the items emitted by the Publisher most recently emitted by the source Publisher
switchOnNextDelayError
(Publisher<? extends Publisher<? extends T>>
the source Publisher that emits Publishers
sources
,
int
the number of items to prefetch from the inner Publishers
prefetch
)

Converts a Publisher that emits Publishers into a Publisher that emits the items emitted by the most recently emitted of those Publishers and delays any exception until all Publishers terminate.

public final Flowable<T>

Returns:

a Flowable that emits only the first count items emitted by the source Publisher, or all of the items from the source Publisher if that Publisher emits fewer than count items
take
(long
the maximum number of items to emit
count
)

Returns a Flowable that emits only the first count items emitted by the source Publisher.

public final Flowable<T>

Returns:

a Flowable that emits those items emitted by the source Publisher before the time runs out
take
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
)

Returns a Flowable that emits those items emitted by source Publisher before a specified time runs out.

public final Flowable<T>

Returns:

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

public final Flowable<T>

Returns:

a Flowable that emits at most the last count items emitted by the source Publisher
takeLast
(int
the maximum number of items to emit from the end of the sequence of items emitted by the source Publisher
count
)

Returns a Flowable that emits at most the last count items emitted by the source Publisher.

public final Flowable<T>

Returns:

a Flowable that emits at most count items from the source Publisher that were emitted in a specified window of time before the Publisher completed
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
)

Returns a Flowable that emits at most a specified number of items from the source Publisher that were emitted in a specified window of time before the Publisher completed.

public final Flowable<T>

Returns:

a Flowable that emits at most count items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by the given scheduler
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the observed items
scheduler
)

Returns a Flowable that emits at most a specified number of items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a given Scheduler.

public final Flowable<T>

Returns:

a Flowable that emits at most count items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by the given scheduler
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the observed items
scheduler
,
boolean
if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements dropped
delayError
,
int
the hint about how many elements to expect to be last
bufferSize
)

Returns a Flowable that emits at most a specified number of items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a given Scheduler.

public final Flowable<T>

Returns:

a Flowable that emits the items from the source Publisher that were emitted in the window of time before the Publisher completed specified by time
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
)

Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed.

public final Flowable<T>

Returns:

a Flowable that emits the items from the source Publisher that were emitted in the window of time before the Publisher completed specified by time
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
boolean
if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements dropped
delayError
)

Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed.

public final Flowable<T>

Returns:

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

public final Flowable<T>

Returns:

a Flowable that emits the items from the source Publisher that were emitted in the window of time before the Publisher completed specified by time, where the timing information is provided by scheduler
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the Observed items
scheduler
,
boolean
if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements dropped
delayError
)

Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a specified Scheduler.

public final Flowable<T>

Returns:

a Flowable that emits the items from the source Publisher that were emitted in the window of time before the Publisher completed specified by time, where the timing information is provided by scheduler
takeLast
(long
the length of the time window
time
,
TimeUnit
the time unit of time
unit
,
Scheduler
the Scheduler that provides the timestamps for the Observed items
scheduler
,
boolean
if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements dropped
delayError
,
int
the hint about how many elements to expect to be last
bufferSize
)

Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a specified Scheduler.

public final Flowable<T>

Returns:

a Flowable that first emits items emitted by the source Publisher, checks the specified condition after each item, and then completes when the condition is satisfied.
takeUntil
(Predicate<? super T>
a function that evaluates an item emitted by the source Publisher and returns a Boolean
stopPredicate
)

Returns a Flowable that emits items emitted by the source Publisher, checks the specified predicate for each item, and then completes when the condition is satisfied.

public final <
the type of items emitted by other
U
>
Flowable<T>

Returns:

a Flowable that emits the items emitted by the source Publisher until such time as other emits its first item
takeUntil
(Publisher<U>
the Publisher whose first emitted item will cause takeUntil to stop emitting items from the source Publisher
other
)

Returns a Flowable that emits the items emitted by the source Publisher until a second Publisher emits an item.

public final Flowable<T>

Returns:

a Flowable that emits the items from the source Publisher so long as each item satisfies the condition defined by predicate, then completes
takeWhile
(Predicate<? super T>
a function that evaluates an item emitted by the source Publisher and returns a Boolean
predicate
)

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

public final TestSubscriber<T>

Returns:

the new TestSubscriber instance
test
()

Creates a TestSubscriber that requests Long.MAX_VALUE and subscribes it to this Flowable.

public final TestSubscriber<T>

Returns:

the new TestSubscriber instance
test
(long
the initial request amount, positive
initialRequest
)

Creates a TestSubscriber with the given initial request amount and subscribes it to this Flowable.

public final TestSubscriber<T>

Returns:

the new TestSubscriber instance
test
(long
the initial request amount, positive
initialRequest
,
boolean
should the TestSubscriber be canceled before the subscription?
cancel
)

Creates a TestSubscriber with the given initial request amount, optionally cancels it before the subscription and subscribes it to this Flowable.

public final Flowable<T>

Returns:

a Flowable 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 a Flowable that emits only the first item emitted by the source Publisher during sequential time windows of a specified duration.

public final Flowable<T>

Returns:

a Flowable 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 a Flowable that emits only the first item emitted by the source Publisher during sequential time windows of a specified duration, where the windows are managed by a specified Scheduler.

public final Flowable<T>

Returns:

a Flowable that performs the throttle operation
throttleLast
(long
duration of windows within which the last item emitted by the source Publisher will be emitted
intervalDuration
,
TimeUnit
the unit of time of intervalDuration
unit
)

Returns a Flowable that emits only the last item emitted by the source Publisher during sequential time windows of a specified duration.

public final Flowable<T>

Returns:

a Flowable that performs the throttle operation
throttleLast
(long
duration of windows within which the last item emitted by the source Publisher 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 a Flowable that emits only the last item emitted by the source Publisher during sequential time windows of a specified duration, where the duration is governed by a specified Scheduler.

public final Flowable<T>

Returns:

the new Flowable instance
throttleLatest
(long
the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream again
timeout
,
TimeUnit
the time unit
unit
)

Throttles items from the upstream Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.

public final Flowable<T>

Returns:

the new Flowable instance
throttleLatest
(long
the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream again
timeout
,
TimeUnit
the time unit
unit
,
boolean
If true, the very last item from the upstream will be emitted immediately when the upstream completes, regardless if there is a timeout window active or not. If false, the very last upstream item is ignored and the flow terminates.
emitLast
)

Throttles items from the upstream Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.

public final Flowable<T>

Returns:

the new Flowable instance
throttleLatest
(long
the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream again
timeout
,
TimeUnit
the time unit
unit
,
Scheduler
the Scheduler where the timed wait and latest item emission will be performed
scheduler
)

Throttles items from the upstream Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.

public final Flowable<T>

Returns:

the new Flowable instance
throttleLatest
(long
the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream again
timeout
,
TimeUnit
the time unit
unit
,
Scheduler
the Scheduler where the timed wait and latest item emission will be performed
scheduler
,
boolean
If true, the very last item from the upstream will be emitted immediately when the upstream completes, regardless if there is a timeout window active or not. If false, the very last upstream item is ignored and the flow terminates.
emitLast
)

Throttles items from the upstream Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.

public final Flowable<T>

Returns:

a Flowable that filters out items from the source Publisher 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 Publisher in which that Publisher emits no items in order for the item to be emitted by the resulting Publisher
timeout
,
TimeUnit
the unit of time for the specified timeout
unit
)

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

public final Flowable<T>

Returns:

a Flowable that filters out items from the source Publisher 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 Publisher in which that Publisher emits no items in order for the item to be emitted by the resulting Publisher
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 a Flowable that mirrors the source Publisher, except that it drops items emitted by the source Publisher that are followed by newer items before a timeout value expires on a specified Scheduler.

public final Flowable<Timed<T>>

Returns:

a Flowable that emits time interval information items
timeInterval
()

Returns a Flowable that emits records of the time interval between consecutive items emitted by the source Publisher.

public final Flowable<Timed<T>>

Returns:

a Flowable that emits time interval information items
timeInterval
(Scheduler
the Scheduler used to compute time intervals
scheduler
)

Returns a Flowable that emits records of the time interval between consecutive items emitted by the source Publisher, where this interval is computed on a specified Scheduler.

public final Flowable<Timed<T>>

Returns:

a Flowable that emits time interval information items
timeInterval
(TimeUnit
the time unit for the current time
unit
)

Returns a Flowable that emits records of the time interval between consecutive items emitted by the source Publisher.

public final Flowable<Timed<T>>

Returns:

a Flowable that emits time interval information items
timeInterval
(TimeUnit
the time unit for the current time
unit
,
Scheduler
the Scheduler used to compute time intervals
scheduler
)

Returns a Flowable that emits records of the time interval between consecutive items emitted by the source Publisher, where this interval is computed on a specified Scheduler.

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

Returns:

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

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

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

Returns:

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

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

public final Flowable<T>

Returns:

the source Publisher modified to notify Subscribers 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 a Flowable that mirrors the source Publisher but applies a timeout policy for each emitted item.

public final Flowable<T>

Returns:

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

Returns a Flowable that mirrors the source Publisher but applies a timeout policy for each emitted item.

public final Flowable<T>

Returns:

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

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

public final Flowable<T>

Returns:

the source Publisher modified to notify Subscribers 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 a Flowable that mirrors the source Publisher but applies a timeout policy for each emitted item, where this policy is governed by a specified Scheduler.

public final <
the first timeout value type (ignored)
U
,
the subsequent timeout value type (ignored)
V
>
Flowable<T>

Returns:

a Flowable that mirrors the source Publisher, but notifies Subscribers 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
(Publisher<U>
a function that returns a Publisher that determines the timeout window for the first source item
firstTimeoutIndicator
,
Function<? super T, ? extends Publisher<V>>
a function that returns a Publisher for each item emitted by the source Publisher and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
itemTimeoutIndicator
)

Returns a Flowable that mirrors the source Publisher, but notifies Subscribers of a TimeoutException if either the first item emitted by the source Publisher or any subsequent item doesn't arrive within time windows defined by other Publishers.

public final <
the first timeout value type (ignored)
U
,
the subsequent timeout value type (ignored)
V
>
Flowable<T>

Returns:

a Flowable that mirrors the source Publisher, but switches to the other Publisher if either the first item emitted by the source Publisher or any subsequent item doesn't arrive within time windows defined by the timeout selectors
timeout
(Publisher<U>
a function that returns a Publisher which determines the timeout window for the first source item
firstTimeoutIndicator
,
Function<? super T, ? extends Publisher<V>>
a function that returns a Publisher for each item emitted by the source Publisher and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
itemTimeoutIndicator
,
Publisher<? extends T>
the fallback Publisher to switch to if the source Publisher times out
other
)

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

private Flowable<T>
timeout0(long timeout, TimeUnit timeUnit, Publisher<? extends T> other, Scheduler scheduler)

private <U, V> Flowable<T>
timeout0(Publisher<U> firstTimeoutIndicator, Function<? super T, ? extends Publisher<V>> itemTimeoutIndicator, Publisher<? extends T> other)

public static Flowable<Long>

Returns:

a Flowable that emits 0L after a specified delay, and then completes
timer
(long
the initial delay before emitting a single 0L
delay
,
TimeUnit
time units to use for delay
unit
)

Returns a Flowable that emits 0L after a specified delay, and then completes.

public static Flowable<Long>

Returns:

a Flowable that emits 0L after a specified delay, on a specified Scheduler, and then completes
timer
(long
the initial delay before emitting a single 0L
delay
,
TimeUnit
time units to use for delay
unit
,
Scheduler
the Scheduler to use for scheduling the item
scheduler
)

Returns a Flowable that emits 0L after a specified delay, on a specified Scheduler, and then completes.

public final Flowable<Timed<T>>

Returns:

a Flowable that emits timestamped items from the source Publisher
timestamp
()

Returns a Flowable that emits each item emitted by the source Publisher, wrapped in a Timed object.

public final Flowable<Timed<T>>

Returns:

a Flowable that emits timestamped items from the source Publisher with timestamps provided by the scheduler
timestamp
(Scheduler
the Scheduler to use as a time source
scheduler
)

Returns a Flowable that emits each item emitted by the source Publisher, wrapped in a Timed object whose timestamps are provided by a specified Scheduler.

public final Flowable<Timed<T>>

Returns:

a Flowable that emits timestamped items from the source Publisher
timestamp
(TimeUnit
the time unit for the current time
unit
)

Returns a Flowable that emits each item emitted by the source Publisher, wrapped in a Timed object.

public final Flowable<Timed<T>>

Returns:

a Flowable that emits timestamped items from the source Publisher with timestamps provided by the scheduler
timestamp
(final TimeUnit
the time unit for the current time
unit
,
final Scheduler
the Scheduler to use as a time source
scheduler
)

Returns a Flowable that emits each item emitted by the source Publisher, wrapped in a Timed object whose timestamps are provided by a specified Scheduler.

public final <
the resulting object type
R
>
R

Returns:

the value returned by the function
to
(Function<? super Flowable<T>, R>
the function that receives the current Flowable instance and returns a value
converter
)

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

public final Future<T>

Returns:

a Future that expects a single item to be emitted by this Flowable
toFuture
()

Returns a Future representing the only value emitted by this Flowable.

public final Single<List<T>>

Returns:

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

Returns a Single that emits a single item, a list composed of all the items emitted by the finite upstream source Publisher.

public final Single<List<T>>

Returns:

a Flowable that emits a single item: a List containing all of the items emitted by the source Publisher
toList
(final int
the number of elements expected from the current Flowable
capacityHint
)

Returns a Single that emits a single item, a list composed of all the items emitted by the finite source Publisher.

public final <
the subclass of a collection of Ts
U extends Collection<? super T>
>
Single<U>

Returns:

a Single that emits a single item: a List containing all of the items emitted by the source Publisher
toList
(Callable<U>
the Callable returning the collection (for each individual Subscriber) to be filled in
collectionSupplier
)

Returns a Single that emits a single item, a list composed of all the items emitted by the finite source Publisher.

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

a Flowable that emits a single item: a Map that contains the mapped items emitted by the source Publisher
toMap
(final Function<? super T, ? extends K>
the function that extracts the key from a source item to be used in the Map
keySelector
,
final Function<? super T, ? extends V>
the function that extracts the value from the source items to be used as value in the Map
valueSelector
,
final Callable<? extends Map<K, V>>
the function that returns a Map instance to be used
mapSupplier
)

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

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

Returns:

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

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

public final Observable<T>

Returns:

the new Observable instance
toObservable
()

Converts the current Flowable into a non-backpressured Observable.

public final Single<List<T>>

Returns:

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

Returns a Single that emits a list that contains the items emitted by the finite source Publisher, in a sorted order.

public final Single<List<T>>

Returns:

a Single that emits a list that contains the items emitted by the source Publisher in sorted order
toSortedList
(final Comparator<? super T>
a function that compares two items emitted by the source Publisher and returns an Integer that indicates their sort order
comparator
)

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

public final Single<List<T>>

Returns:

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

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

public final Single<List<T>>

Returns:

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

Returns a Flowable that emits a list that contains the items emitted by the finite source Publisher, in a sorted order.

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

Returns:

the new Flowable instance
unsafeCreate
(Publisher<T>
the Publisher instance to wrap
onSubscribe
)

Create a Flowable by wrapping a Publisher which has to be implemented according to the Reactive Streams specification by handling backpressure and cancellation correctly; no safeguards are provided by the Flowable itself.

public final Flowable<T>

Returns:

the source Publisher modified so that its cancellations happen on the specified Scheduler
unsubscribeOn
(Scheduler
the Scheduler to perform cancellation actions on
scheduler
)

Modifies the source Publisher so that subscribers will cancel it on a specified Scheduler.

public static <
the element type of the generated Publisher
T
,
the type of the resource associated with the output sequence
D
>
Flowable<T>

Returns:

the Publisher whose lifetime controls the lifetime of the dependent resource object
using
(Callable<? extends D>
the factory function to create a resource object that depends on the Publisher
resourceSupplier
,
Function<? super D, ? extends Publisher<? extends T>>
the factory function to create a Publisher
sourceSupplier
,
Consumer<? super D>
the function that will dispose of the resource
resourceDisposer
)

Constructs a Publisher that creates a dependent resource object which is disposed of on cancellation.

public static <
the element type of the generated Publisher
T
,
the type of the resource associated with the output sequence
D
>
Flowable<T>

Returns:

the Publisher whose lifetime controls the lifetime of the dependent resource object
using
(Callable<? extends D>
the factory function to create a resource object that depends on the Publisher
resourceSupplier
,
Function<? super D, ? extends Publisher<? extends T>>
the factory function to create a Publisher
sourceSupplier
,
Consumer<? super D>
the function that will dispose of the resource
resourceDisposer
,
boolean
if true then disposal will happen either on cancellation or just before emission of a terminal event (onComplete or onError).
eager
)

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

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows, each containing at most count items from the source Publisher
window
(long
the maximum size of each window before it should be emitted
count
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits windows every skip items containing at most count items from the source Publisher
window
(long
the maximum size of each window before it should be emitted
count
,
long
how many items need to be skipped before starting a new window. Note that if skip and count are equal this is the same operation as window(long).
skip
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits windows every skip items containing at most count items from the source Publisher
window
(long
the maximum size of each window before it should be emitted
count
,
long
how many items need to be skipped before starting a new window. Note that if skip and count are equal this is the same operation as window(long).
skip
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits new windows periodically as a fixed timespan elapses
window
(long
the period of time each window collects items before it should be emitted
timespan
,
long
the period of time after which a new window will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits new windows periodically as a fixed timespan elapses
window
(long
the period of time each window collects items before it should be emitted
timespan
,
long
the period of time after which a new window will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits new windows periodically as a fixed timespan elapses
window
(long
the period of time each window collects items before it should be emitted
timespan
,
long
the period of time after which a new window will be created
timeskip
,
TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows representing items emitted by the source Publisher 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 a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows of items from the source Publisher that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time that applies to the timespan argument
unit
,
long
the maximum size of each window before it should be emitted
count
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows of items from the source Publisher that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time that applies to the timespan argument
unit
,
long
the maximum size of each window before it should be emitted
count
,
boolean
if true, when a window reaches the capacity limit, the timer is restarted as well
restart
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows containing items emitted by the source Publisher 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 a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows of items from the source Publisher that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time which applies to the timespan argument
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
,
long
the maximum size of each window before it should be emitted
count
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows of items from the source Publisher that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time which applies to the timespan argument
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
,
long
the maximum size of each window before it should be emitted
count
,
boolean
if true, when a window reaches the capacity limit, the timer is restarted as well
restart
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows of items from the source Publisher that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first)
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
TimeUnit
the unit of time which applies to the timespan argument
unit
,
Scheduler
the Scheduler to use when determining the end and start of a window
scheduler
,
long
the maximum size of each window before it should be emitted
count
,
boolean
if true, when a window reaches the capacity limit, the timer is restarted as well
restart
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final <
the window element type (ignored)
B
>
Flowable<Flowable<T>>

Returns:

a Flowable that emits non-overlapping windows of items it collects from the source Publisher where the boundary of each window is determined by the items emitted from the boundary Publisher
window
(Publisher<B>
a Publisher whose emitted items close and open windows
boundaryIndicator
)

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

public final <
the window element type (ignored)
B
>
Flowable<Flowable<T>>

Returns:

a Flowable that emits non-overlapping windows of items it collects from the source Publisher where the boundary of each window is determined by the items emitted from the boundary Publisher
window
(Publisher<B>
a Publisher whose emitted items close and open windows
boundaryIndicator
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

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

public final <
the element type of the window-opening Publisher
U
,
the element type of the window-closing Publishers
V
>
Flowable<Flowable<T>>

Returns:

a Flowable that emits windows of items emitted by the source Publisher that are governed by the specified window-governing Publishers
window
(Publisher<U>
a Publisher that, when it emits an item, causes another window to be created
openingIndicator
,
Function<? super U, ? extends Publisher<V>>
a Function that produces a Publisher for every window created. When this Publisher emits an item, the associated window is closed and emitted
closingIndicator
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final <
the element type of the window-opening Publisher
U
,
the element type of the window-closing Publishers
V
>
Flowable<Flowable<T>>

Returns:

a Flowable that emits windows of items emitted by the source Publisher that are governed by the specified window-governing Publishers
window
(Publisher<U>
a Publisher that, when it emits an item, causes another window to be created
openingIndicator
,
Function<? super U, ? extends Publisher<V>>
a Function that produces a Publisher for every window created. When this Publisher emits an item, the associated window is closed and emitted
closingIndicator
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final <
the element type of the boundary Publisher
B
>
Flowable<Flowable<T>>

Returns:

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

Returns a Flowable that emits windows of items it collects from the source Publisher.

public final <
the element type of the boundary Publisher
B
>
Flowable<Flowable<T>>

Returns:

a Flowable that emits connected, non-overlapping windows of items from the source Publisher whenever closingSelector emits an item
window
(Callable<? extends Publisher<B>>
a Callable that returns a Publisher that governs the boundary between windows. When the source Publisher emits an item, window emits the current window and begins a new one.
boundaryIndicatorSupplier
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

Returns a Flowable that emits windows of items it collects from the source Publisher.

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

Returns:

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

Merges the specified Publisher into this Publisher sequence by using the resultSelector function only when the source Publisher (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
>
Flowable<R>

Returns:

the new Publisher instance
withLatestFrom
(Publisher<T1>
the first other Publisher
source1
,
Publisher<T2>
the second other Publisher
source2
,
Function3<? super T, ? super T1, ? super T2, R>
the function called with an array of values from each participating Publisher
combiner
)

Combines the value emission from this Publisher with the latest emissions from the other Publishers 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
>
Flowable<R>

Returns:

the new Publisher instance
withLatestFrom
(Publisher<T1>
the first other Publisher
source1
,
Publisher<T2>
the second other Publisher
source2
,
Publisher<T3>
the third other Publisher
source3
,
Function4<? super T, ? super T1, ? super T2, ? super T3, R>
the function called with an array of values from each participating Publisher
combiner
)

Combines the value emission from this Publisher with the latest emissions from the other Publishers 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
>
Flowable<R>

Returns:

the new Publisher instance
withLatestFrom
(Publisher<T1>
the first other Publisher
source1
,
Publisher<T2>
the second other Publisher
source2
,
Publisher<T3>
the third other Publisher
source3
,
Publisher<T4>
the fourth other Publisher
source4
,
Function5<? super T, ? super T1, ? super T2, ? super T3, ? super T4, R>
the function called with an array of values from each participating Publisher
combiner
)

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

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

Returns:

the new Publisher instance
withLatestFrom
(Publisher<?>[]
the array of other sources
others
,
Function<? super Object[], R>
the function called with an array of values from each participating Publisher
combiner
)

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

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

Returns:

the new Publisher instance
withLatestFrom
(Iterable<? extends Publisher<?>>
the iterable of other sources
others
,
Function<? super Object[], R>
the function called with an array of values from each participating Publisher
combiner
)

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

public static <
the common value type
T
,
the zipped result type
R
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Iterable<? extends Publisher<? extends T>>
an Iterable of source Publishers
sources
,
Function<? super Object[], ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

Returns a Flowable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an Iterable of other Publishers.

public static <
the value type of the inner Publishers
T
,
the zipped result type
R
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends Publisher<? extends T>>
a Publisher of source Publishers
sources
,
final Function<? super Object[], ? extends R>
a function that, when applied to an item emitted by each of the Publishers emitted by ws, results in an item that will be emitted by the resulting Publisher
zipper
)

Returns a Flowable that emits the results of a specified combiner function applied to combinations of n items emitted, in sequence, by the n Publishers emitted by a specified Publisher.

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the zipped result type
R
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
BiFunction<? super T1, ? super T2, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

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

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the zipped result type
R
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
BiFunction<? super T1, ? super T2, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
,
boolean
delay errors from any of the source Publishers till the other terminates
delayError
)

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

public static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the zipped result type
R
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
BiFunction<? super T1, ? super T2, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
,
boolean
delay errors from any of the source Publishers till the other terminates
delayError
,
int
the number of elements to prefetch from each source Publisher
bufferSize
)

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

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
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
Publisher<? extends T3>
a third source Publisher
source3
,
Function3<? super T1, ? super T2, ? super T3, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

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

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
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
Publisher<? extends T3>
a third source Publisher
source3
,
Publisher<? extends T4>
a fourth source Publisher
source4
,
Function4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

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

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
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
Publisher<? extends T3>
a third source Publisher
source3
,
Publisher<? extends T4>
a fourth source Publisher
source4
,
Publisher<? extends T5>
a fifth source Publisher
source5
,
Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

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

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
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
Publisher<? extends T3>
a third source Publisher
source3
,
Publisher<? extends T4>
a fourth source Publisher
source4
,
Publisher<? extends T5>
a fifth source Publisher
source5
,
Publisher<? extends T6>
a sixth source Publisher
source6
,
Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

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

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
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
Publisher<? extends T3>
a third source Publisher
source3
,
Publisher<? extends T4>
a fourth source Publisher
source4
,
Publisher<? extends T5>
a fifth source Publisher
source5
,
Publisher<? extends T6>
a sixth source Publisher
source6
,
Publisher<? extends T7>
a seventh source Publisher
source7
,
Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

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

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
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
Publisher<? extends T3>
a third source Publisher
source3
,
Publisher<? extends T4>
a fourth source Publisher
source4
,
Publisher<? extends T5>
a fifth source Publisher
source5
,
Publisher<? extends T6>
a sixth source Publisher
source6
,
Publisher<? extends T7>
a seventh source Publisher
source7
,
Publisher<? extends T8>
an eighth source Publisher
source8
,
Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

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

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
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zip
(Publisher<? extends T1>
the first source Publisher
source1
,
Publisher<? extends T2>
a second source Publisher
source2
,
Publisher<? extends T3>
a third source Publisher
source3
,
Publisher<? extends T4>
a fourth source Publisher
source4
,
Publisher<? extends T5>
a fifth source Publisher
source5
,
Publisher<? extends T6>
a sixth source Publisher
source6
,
Publisher<? extends T7>
a seventh source Publisher
source7
,
Publisher<? extends T8>
an eighth source Publisher
source8
,
Publisher<? extends T9>
a ninth source Publisher
source9
,
Function9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
)

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

public static <
the common element type
T
,
the result type
R
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zipArray
(Function<? super Object[], ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
,
boolean
delay errors signaled by any of the source Publisher until all Publishers terminate
delayError
,
int
the number of elements to prefetch from each source Publisher
bufferSize
,
Publisher<? extends T>...
an array of source Publishers
sources
)

Returns a Flowable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an array of other Publishers.

public static <
the common source value type
T
,
the zipped result type
R
>
Flowable<R>

Returns:

a Flowable that emits the zipped results
zipIterable
(Iterable<? extends Publisher<? extends T>>
an Iterable of source Publishers
sources
,
Function<? super Object[], ? extends R>
a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher
zipper
,
boolean
delay errors signaled by any of the source Publisher until all Publishers terminate
delayError
,
int
the number of elements to prefetch from each source Publisher
bufferSize
)

Returns a Flowable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an Iterable of other Publishers.

public final <
the type of items in the other Iterable
U
,
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

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

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

public final <
the type of items emitted by the other Publisher
U
,
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that pairs up values from the source Publisher and the other Publisher and emits the results of zipFunction applied to these pairs
zipWith
(Publisher<? extends U>
the other Publisher
other
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines the pairs of items from the two Publishers to generate the items to be emitted by the resulting Publisher
zipper
)

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

public final <
the type of items emitted by the other Publisher
U
,
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that pairs up values from the source Publisher and the other Publisher and emits the results of zipFunction applied to these pairs
zipWith
(Publisher<? extends U>
the other Publisher
other
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines the pairs of items from the two Publishers to generate the items to be emitted by the resulting Publisher
zipper
,
boolean
if true, errors from the current Flowable or the other Publisher is delayed until both terminate
delayError
)

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

public final <
the type of items emitted by the other Publisher
U
,
the type of items emitted by the resulting Publisher
R
>
Flowable<R>

Returns:

a Flowable that pairs up values from the source Publisher and the other Publisher and emits the results of zipFunction applied to these pairs
zipWith
(Publisher<? extends U>
the other Publisher
other
,
BiFunction<? super T, ? super U, ? extends R>
a function that combines the pairs of items from the two Publishers to generate the items to be emitted by the resulting Publisher
zipper
,
boolean
if true, errors from the current Flowable or the other Publisher is delayed until both terminate
delayError
,
int
the capacity hint for the buffer in the inner windows
bufferSize
)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait