Top Description Fields Constructors Methods
io.reactivex.rxjava3.core

public abstract Class Flowable<T>

extends Object
implements Publisher<T>
Class Inheritance
All Implemented Interfaces
org.reactivestreams.Publisher
Known Direct Subclasses
io.reactivex.rxjava3.flowables.ConnectableFlowable, io.reactivex.rxjava3.flowables.GroupedFlowable, io.reactivex.rxjava3.internal.jdk8.FlowableCollectWithCollector, io.reactivex.rxjava3.internal.jdk8.FlowableFlatMapStream, io.reactivex.rxjava3.internal.jdk8.FlowableFromCompletionStage, io.reactivex.rxjava3.internal.jdk8.FlowableFromStream, io.reactivex.rxjava3.internal.jdk8.FlowableMapOptional, io.reactivex.rxjava3.internal.jdk8.MaybeFlattenStreamAsFlowable, io.reactivex.rxjava3.internal.jdk8.ParallelCollector, io.reactivex.rxjava3.internal.jdk8.SingleFlattenStreamAsFlowable, io.reactivex.rxjava3.internal.operators.completable.CompletableToFlowable, io.reactivex.rxjava3.internal.operators.flowable.AbstractFlowableWithUpstream, io.reactivex.rxjava3.internal.operators.flowable.FlowableAmb, io.reactivex.rxjava3.internal.operators.flowable.FlowableAutoConnect, io.reactivex.rxjava3.internal.operators.flowable.FlowableJust, io.reactivex.rxjava3.internal.operators.flowable.FlowableMapPublisher, io.reactivex.rxjava3.internal.operators.flowable.FlowableNever, io.reactivex.rxjava3.internal.operators.flowable.FlowableSamplePublisher, io.reactivex.rxjava3.internal.operators.flowable.FlowableScalarXMap.ScalarXMapFlowable, io.reactivex.rxjava3.internal.operators.flowable.FlowableSequenceEqual, io.reactivex.rxjava3.internal.operators.flowable.FlowableDefer, io.reactivex.rxjava3.internal.operators.flowable.FlowableDelaySubscriptionOther, io.reactivex.rxjava3.internal.operators.flowable.FlowableEmpty, io.reactivex.rxjava3.internal.operators.flowable.FlowableError, io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMapMaybePublisher, io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMapSinglePublisher, io.reactivex.rxjava3.internal.operators.flowable.FlowableIntervalRange, io.reactivex.rxjava3.internal.operators.flowable.FlowableTakePublisher, io.reactivex.rxjava3.internal.operators.flowable.FlowableTimer, io.reactivex.rxjava3.internal.operators.flowable.FlowableUsing, io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowBoundarySelector.WindowBoundaryMainSubscriber.WindowEndSubscriberIntercept, io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowSubscribeIntercept, io.reactivex.rxjava3.internal.operators.flowable.FlowableZip, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromAction, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromArray, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromCallable, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromCompletable, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromFuture, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromObservable, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromPublisher, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromRunnable, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromSupplier, io.reactivex.rxjava3.internal.operators.flowable.FlowableGenerate, io.reactivex.rxjava3.internal.operators.flowable.FlowableInterval, io.reactivex.rxjava3.internal.operators.flowable.FlowablePublishMulticast.MulticastProcessor, io.reactivex.rxjava3.internal.operators.flowable.FlowableRange, io.reactivex.rxjava3.internal.operators.flowable.FlowableRangeLong, io.reactivex.rxjava3.internal.operators.flowable.FlowableRefCount, io.reactivex.rxjava3.internal.operators.flowable.FlowableReplay.MulticastFlowable, io.reactivex.rxjava3.internal.operators.flowable.FlowableCombineLatest, io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatArray, io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMapEagerPublisher, io.reactivex.rxjava3.internal.operators.flowable.FlowableCreate, io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray, io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArrayDelayError, io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatIterable, io.reactivex.rxjava3.internal.operators.maybe.MaybeMergeArray, io.reactivex.rxjava3.internal.operators.maybe.MaybeFlatMapIterableFlowable, io.reactivex.rxjava3.internal.operators.maybe.MaybeToFlowable, io.reactivex.rxjava3.internal.operators.mixed.CompletableAndThenPublisher, io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapMaybe, io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapMaybePublisher, io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapSingle, io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapSinglePublisher, io.reactivex.rxjava3.internal.operators.mixed.FlowableSwitchMapMaybe, io.reactivex.rxjava3.internal.operators.mixed.FlowableSwitchMapMaybePublisher, io.reactivex.rxjava3.internal.operators.mixed.FlowableSwitchMapSingle, io.reactivex.rxjava3.internal.operators.mixed.FlowableSwitchMapSinglePublisher, io.reactivex.rxjava3.internal.operators.mixed.MaybeFlatMapPublisher, io.reactivex.rxjava3.internal.operators.parallel.ParallelJoin, io.reactivex.rxjava3.internal.operators.parallel.ParallelReduceFull, io.reactivex.rxjava3.internal.operators.parallel.ParallelSortedJoin, io.reactivex.rxjava3.internal.operators.single.SingleFlatMapIterableFlowable, io.reactivex.rxjava3.internal.operators.single.SingleFlatMapPublisher, io.reactivex.rxjava3.internal.operators.single.SingleToFlowable, io.reactivex.rxjava3.processors.FlowableProcessor
Type Parameters
<T>
the type of the items emitted by the Flowable
Imports
java.util.*, java.util.concurrent.*, java.util.stream.*, org.reactivestreams.*, io.reactivex.rxjava3.annotations.*, io.reactivex.rxjava3.disposables.*, io.reactivex.rxjava3.exceptions.*, io.reactivex.rxjava3.flowables.*, io.reactivex.rxjava3.functions.*, io.reactivex.rxjava3.internal.functions.*, io.reactivex.rxjava3.internal.jdk8.*, io.reactivex.rxjava3.internal.operators.flowable.*, io.reactivex.rxjava3.internal.operators.maybe.MaybeToFlowable, io.reactivex.rxjava3.internal.operators.mixed.*, io.reactivex.rxjava3.internal.operators.observable.ObservableFromPublisher, io.reactivex.rxjava3.internal.operators.single.SingleToFlowable, io.reactivex.rxjava3.internal.schedulers.ImmediateThinScheduler, io.reactivex.rxjava3.internal.subscribers.*, io.reactivex.rxjava3.internal.util.*, io.reactivex.rxjava3.operators.ScalarSupplier, io.reactivex.rxjava3.parallel.ParallelFlowable, io.reactivex.rxjava3.plugins.RxJavaPlugins, io.reactivex.rxjava3.schedulers.*, io.reactivex.rxjava3.subscribers.*

The Flowable class that implements the Reactive Streams Publisher 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 rx3.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.rxjava3.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 @NonNull Single<Boolean>

Returns:

the new Single instance
all
(@NonNull 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 current Flowable satisfy a condition.

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

Returns:

the new Flowable instance
amb
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
ambArray
(@NonNull 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 array.
sources
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
ambWith
(@NonNull Publisher<? extends T>
a Publisher competing to react first. A subscription to this provided Publisher will occur after subscribing to the current Flowable.
other
)

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

public final @NonNull Single<Boolean>

Returns:

the new Single instance
any
(@NonNull Predicate<? super T>
the condition to test items emitted by the current Flowable
predicate
)

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

Note

this always emits false if the current Flowable is empty.

public final T

Returns:

the new Flowable instance
blockingFirst
()

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

public final T

Returns:

the new Flowable instance
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(@NonNull Consumer<? super T>
the Consumer to invoke for each item emitted by the Flowable
onNext
)

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

public final void
blockingForEach(@NonNull Consumer<? super T>
the Consumer to invoke for each item emitted by the Flowable
onNext
,
int
the number of items to prefetch upfront, then 75% of it after 75% received
bufferSize
)

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

public final @NonNull Iterable<T>

Returns:

the new Iterable instance
blockingIterable
()

Converts this Flowable into an Iterable.

public final @NonNull Iterable<T>

Returns:

the new Iterable instance
blockingIterable
(int
the number of items to prefetch from the current Flowable
bufferSize
)

Converts this Flowable into an Iterable.

public final T

Returns:

the new Flowable instance
blockingLast
()

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

public final T

Returns:

the new Flowable instance
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 @NonNull Iterable<T>

Returns:

the new Iterable instance
blockingLatest
()

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

public final @NonNull Iterable<T>

Returns:

the new Iterable instance
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 @NonNull Iterable<T>

Returns:

the new Iterable instance
blockingNext
()

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

public final T

Returns:

the new Flowable instance
blockingSingle
()

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

public final T

Returns:

the new Flowable instance
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 @NonNull Stream<T>

Returns:

the new Stream instance
blockingStream
()

Creates a sequential Stream to consume or process this Flowable in a blocking manner via the Java Stream API.

public final @NonNull Stream<T>

Returns:

the new Stream instance
blockingStream
(int
the number of items to request from the upstream to limit the number of in-flight items and item generation.
prefetch
)

Creates a sequential Stream to consume or process this Flowable in a blocking manner via the Java Stream API.

public final void
blockingSubscribe()

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

public final void
blockingSubscribe(@NonNull 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(@NonNull 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(@NonNull Consumer<? super T>
the callback action for each source value
onNext
,
@NonNull 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(@NonNull Consumer<? super T>
the callback action for each source value
onNext
,
@NonNull 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(@NonNull Consumer<? super T>
the callback action for each source value
onNext
,
@NonNull Consumer<? super Throwable>
the callback action for an error event
onError
,
@NonNull 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(@NonNull Consumer<? super T>
the callback action for each source value
onNext
,
@NonNull Consumer<? super Throwable>
the callback action for an error event
onError
,
@NonNull 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(@NonNull 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 @NonNull Flowable<List<T>>

Returns:

the new Flowable instance
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 current Flowable.

public final @NonNull Flowable<List<T>>

Returns:

the new Flowable instance
buffer
(int
the maximum size of each buffer before it should be emitted
count
,
int
how many items emitted by the current Flowable 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 current Flowable.

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

Returns:

the new Flowable instance
buffer
(int
the maximum size of each buffer before it should be emitted
count
,
int
how many items emitted by the current Flowable 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
,
@NonNull Supplier<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 current Flowable.

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

Returns:

the new Flowable instance
buffer
(int
the maximum number of items in each buffer before it should be emitted
count
,
@NonNull Supplier<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 current Flowable.

public final @NonNull Flowable<List<T>>

Returns:

the new Flowable instance
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
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<List<T>>

Returns:

the new Flowable instance
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
,
@NonNull TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
@NonNull 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 current Flowable.

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

Returns:

the new Flowable instance
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
,
@NonNull TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
@NonNull Scheduler
the Scheduler to use when determining the end and start of a buffer
scheduler
,
@NonNull Supplier<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 current Flowable.

public final @NonNull Flowable<List<T>>

Returns:

the new Flowable instance
buffer
(long
the period of time each buffer collects items before it is emitted and replaced with a new buffer
timespan
,
@NonNull TimeUnit
the unit of time that applies to the timespan argument
unit
)

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

public final @NonNull Flowable<List<T>>

Returns:

the new Flowable instance
buffer
(long
the period of time each buffer collects items before it is emitted and replaced with a new buffer
timespan
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<List<T>>

Returns:

the new Flowable instance
buffer
(long
the period of time each buffer collects items before it is emitted and replaced with a new buffer
timespan
,
@NonNull TimeUnit
the unit of time which applies to the timespan argument
unit
,
@NonNull 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 current Flowable.

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

Returns:

the new Flowable instance
buffer
(long
the period of time each buffer collects items before it is emitted and replaced with a new buffer
timespan
,
@NonNull TimeUnit
the unit of time which applies to the timespan argument
unit
,
@NonNull 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
,
@NonNull Supplier<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 current Flowable.

public final @NonNull Flowable<List<T>>

Returns:

the new Flowable instance
buffer
(long
the period of time each buffer collects items before it is emitted and replaced with a new buffer
timespan
,
@NonNull TimeUnit
the unit of time which applies to the timespan argument
unit
,
@NonNull 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 current Flowable.

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

Returns:

the new Flowable instance
buffer
(@NonNull Publisher<? extends TOpening>
the Publisher that, when it emits an item, causes a new buffer to be created
openingIndicator
,
@NonNull Function<? super TOpening, @NonNull ? 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 current Flowable.

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>
>
@NonNull Flowable<U>

Returns:

the new Flowable instance
buffer
(@NonNull Publisher<? extends TOpening>
the Publisher that, when it emits an item, causes a new buffer to be created
openingIndicator
,
@NonNull Function<? super TOpening, @NonNull ? 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
,
@NonNull Supplier<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 current Flowable.

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

Returns:

the new Flowable instance
buffer
(@NonNull Publisher<B>
the boundary Publisher
boundaryIndicator
)

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

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

Returns:

the new Flowable instance
buffer
(@NonNull Publisher<B>
the boundary Publisher
boundaryIndicator
,
int
the initial capacity of each buffer chunk
initialCapacity
)

Returns a Flowable that emits non-overlapping buffered items from the current Flowable 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>
>
@NonNull Flowable<U>

Returns:

the new Flowable instance
buffer
(@NonNull Publisher<B>
the boundary Publisher
boundaryIndicator
,
@NonNull Supplier<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 current Flowable each time the specified boundary Publisher emits an item.

public static int

Returns:

the default internal buffer size.
bufferSize
()

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
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 @NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<U>

Returns:

the new Flowable instance
cast
(@NonNull Class<U>
the target class type that cast will cast the items emitted by the current Flowable into before emitting them from the resulting Flowable
clazz
)

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

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

Returns:

the new Single instance
collect
(@NonNull Supplier<? extends U>
the mutable data structure that will collect the items
initialItemSupplier
,
@NonNull 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 non-null result type
R
,
the intermediate container type used for the accumulation
A
>
@NonNull Single<R>

Returns:

the new Single instance
collect
(@NonNull Collector<? super T, A, R>
the interface defining the container supplier, accumulator and finisher functions; see Collectors for some standard implementations
collector
)

Collects the finite upstream's values into a container via a Stream Collector callback set and emits it as the success result.

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

Returns:

the new Single instance
collectInto
(U
the mutable data structure that will collect the items
initialItem
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Iterable<@NonNull ? extends Publisher<? extends T>>
the collection of source Publishers
sources
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Iterable<@NonNull ? extends Publisher<? extends T>>
the collection of source Publishers
sources
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
the second source Publisher
source2
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
the second source Publisher
source2
,
@NonNull Publisher<? extends T3>
the third source Publisher
source3
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
the second source Publisher
source2
,
@NonNull Publisher<? extends T3>
the third source Publisher
source3
,
@NonNull Publisher<? extends T4>
the fourth source Publisher
source4
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
the second source Publisher
source2
,
@NonNull Publisher<? extends T3>
the third source Publisher
source3
,
@NonNull Publisher<? extends T4>
the fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
the fifth source Publisher
source5
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
the second source Publisher
source2
,
@NonNull Publisher<? extends T3>
the third source Publisher
source3
,
@NonNull Publisher<? extends T4>
the fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
the fifth source Publisher
source5
,
@NonNull Publisher<? extends T6>
the sixth source Publisher
source6
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
the second source Publisher
source2
,
@NonNull Publisher<? extends T3>
the third source Publisher
source3
,
@NonNull Publisher<? extends T4>
the fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
the fifth source Publisher
source5
,
@NonNull Publisher<? extends T6>
the sixth source Publisher
source6
,
@NonNull Publisher<? extends T7>
the seventh source Publisher
source7
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
the second source Publisher
source2
,
@NonNull Publisher<? extends T3>
the third source Publisher
source3
,
@NonNull Publisher<? extends T4>
the fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
the fifth source Publisher
source5
,
@NonNull Publisher<? extends T6>
the sixth source Publisher
source6
,
@NonNull Publisher<? extends T7>
the seventh source Publisher
source7
,
@NonNull Publisher<? extends T8>
the eighth source Publisher
source8
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatest
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
the second source Publisher
source2
,
@NonNull Publisher<? extends T3>
the third source Publisher
source3
,
@NonNull Publisher<? extends T4>
the fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
the fifth source Publisher
source5
,
@NonNull Publisher<? extends T6>
the sixth source Publisher
source6
,
@NonNull Publisher<? extends T7>
the seventh source Publisher
source7
,
@NonNull Publisher<? extends T8>
the eighth source Publisher
source8
,
@NonNull Publisher<? extends T9>
the ninth source Publisher
source9
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatestArray
(@NonNull Publisher<? extends T>[]
the collection of source Publishers
sources
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatestArray
(@NonNull Publisher<? extends T>[]
the collection of source Publishers
sources
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatestArrayDelayError
(@NonNull Publisher<? extends T>[]
the collection of source Publishers
sources
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatestArrayDelayError
(@NonNull Publisher<? extends T>[]
the collection of source Publishers
sources
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatestDelayError
(@NonNull Iterable<@NonNull ? extends Publisher<? extends T>>
the collection of source Publishers
sources
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
combineLatestDelayError
(@NonNull Iterable<@NonNull ? extends Publisher<? extends T>>
the collection of source Publishers
sources
,
@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new composed Flowable instance
compose
(@NonNull FlowableTransformer<? super T, ? extends R>
implements the function that transforms the current Flowable
composer
)

Transform the current Flowable by applying a particular FlowableTransformer function to it.

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

Returns:

the new Flowable instance
concat
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
concat
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
concat
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
concat
(@NonNull Publisher<? extends T>
a Publisher to be concatenated
source1
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
concat
(@NonNull Publisher<? extends T>
a Publisher to be concatenated
source1
,
@NonNull Publisher<? extends T>
a Publisher to be concatenated
source2
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
concat
(@NonNull Publisher<? extends T>
a Publisher to be concatenated
source1
,
@NonNull Publisher<? extends T>
a Publisher to be concatenated
source2
,
@NonNull Publisher<? extends T>
a Publisher to be concatenated
source3
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
concatArray
(@NonNull Publisher<? extends T>...
the array of source Publishers
sources
)

Concatenates a variable number of Publisher sources.

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

Returns:

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

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

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

Returns:

the new Flowable instance with the specified concatenation behavior
concatArrayEager
(@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable 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
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance with the specified concatenation behavior
concatArrayEagerDelayError
(@NonNull 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
>
@NonNull 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
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable with the concatenating behavior
concatDelayError
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable with the concatenating behavior
concatDelayError
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable with the concatenating behavior
concatDelayError
(@NonNull Publisher<@NonNull ? 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 inner 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance with the specified concatenation behavior
concatEager
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance with the specified concatenation behavior
concatEager
(@NonNull Iterable<@NonNull ? 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 and runs a limited number of inner sequences at once.

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

Returns:

the new Flowable instance with the specified concatenation behavior
concatEager
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance with the specified concatenation behavior
concatEager
(@NonNull Publisher<@NonNull ? 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 and runs a limited number of inner sequences at once.

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

Returns:

the new Flowable instance with the specified concatenation behavior
concatEagerDelayError
(@NonNull Iterable<@NonNull ? 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, delaying errors until all the inner sequences terminate.

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

Returns:

the new Flowable instance with the specified concatenation behavior
concatEagerDelayError
(@NonNull Iterable<@NonNull ? 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, delaying errors until all the inner sequences terminate and runs a limited number of inner sequences at once.

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

Returns:

the new Flowable instance with the specified concatenation behavior
concatEagerDelayError
(@NonNull Publisher<@NonNull ? 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, delaying errors until all the inner and the outer sequences terminate.

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

Returns:

the new Flowable instance with the specified concatenation behavior
concatEagerDelayError
(@NonNull Publisher<@NonNull ? 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, delaying errors until all the inner and outer sequences terminate and runs a limited number of inner sequences at once.

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

Returns:

the new Flowable instance
concatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, 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 current Flowable, where that function returns a Publisher, and then emitting the items that result from concatenating those returned Publishers.

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

Returns:

the new Flowable instance
concatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, 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 current Flowable, where that function returns a Publisher, and then emitting the items that result from concatenating those returned Publishers.

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

Returns:

the new Flowable instance
concatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, returns a Publisher
mapper
,
int
the number of elements to prefetch from the current Flowable
prefetch
,
@NonNull Scheduler
the scheduler where the mapper function will be executed
scheduler
)

Returns a new Flowable that emits items resulting from applying a function (on a designated scheduler) that you supply to each item emitted by the current Flowable, where that function returns a Publisher, and then emitting the items that result from concatenating those returned Publishers.

public final @NonNull Completable

Returns:

the new Completable instance
concatMapCompletable
(@NonNull 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 @NonNull Completable

Returns:

the new Completable instance
concatMapCompletable
(@NonNull 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 @NonNull Completable

Returns:

the new Completable instance
concatMapCompletableDelayError
(@NonNull 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 @NonNull Completable

Returns:

the new Completable instance
concatMapCompletableDelayError
(@NonNull 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 @NonNull Completable

Returns:

the new Completable instance
concatMapCompletableDelayError
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance with the concatenation behavior
concatMapDelayError
(@NonNull Function<? super T, @NonNull ? 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance with the concatenation behavior
concatMapDelayError
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
the function that maps the items of this Publisher into the inner Publishers.
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 inner Publisher source terminates
tillTheEnd
,
int
the number of elements to prefetch from the current Flowable
prefetch
)

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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance with the concatenation behavior
concatMapDelayError
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
the function that maps the items of this Publisher into the inner Publishers.
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 inner Publisher source terminates
tillTheEnd
,
int
the number of elements to prefetch from the current Flowable
prefetch
,
@NonNull Scheduler
the scheduler where the mapper function will be executed
scheduler
)

Maps each of the upstream items into a Publisher, subscribes to them one after the other, one at a time and emits their values in order while executing the mapper function on the designated scheduler, delaying any error from either this or any of the inner Publishers till all of them terminate.

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

Returns:

the new Flowable instance with the specified concatenation behavior
concatMapEager
(@NonNull Function<? super T, @NonNull ? 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance with the specified concatenation behavior
concatMapEager
(@NonNull Function<? super T, @NonNull ? 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance with the specified concatenation behavior
concatMapEagerDelayError
(@NonNull Function<? super T, @NonNull ? 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 inner 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance with the specified concatenation behavior
concatMapEagerDelayError
(@NonNull Function<? super T, @NonNull ? 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, 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
,
int
the maximum number of concurrent subscribed Publishers
maxConcurrency
,
int
the number of elements to prefetch from each source Publisher
prefetch
)

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

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

Returns:

the new Flowable instance
concatMapIterable
(@NonNull Function<? super T, @NonNull ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the current Flowable
mapper
)

Returns a Flowable that concatenate each item emitted by the current Flowable 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 Flowable
U
>
@NonNull Flowable<U>

Returns:

the new Flowable instance
concatMapIterable
(@NonNull Function<? super T, @NonNull ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the current Flowable
mapper
,
int
the number of elements to prefetch from the current Flowable
prefetch
)

Returns a Flowable that concatenate each item emitted by the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapMaybe
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapMaybe
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapMaybeDelayError
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapMaybeDelayError
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapMaybeDelayError
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapSingle
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapSingle
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapSingleDelayError
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapSingleDelayError
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapSingleDelayError
(@NonNull 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 <
the element type of the Streams and the result
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapStream
(@NonNull Function<? super T, @NonNull ? extends Stream<? extends R>>
the function that receives an upstream item and should return a Stream whose elements will be emitted to the downstream
mapper
)

Maps each upstream item into a Stream and emits the Stream's items to the downstream in a sequential fashion.

public final <
the element type of the Streams and the result
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
concatMapStream
(@NonNull Function<? super T, @NonNull ? extends Stream<? extends R>>
the function that receives an upstream item and should return a Stream whose elements will be emitted to the downstream
mapper
,
int
the number of upstream items to request upfront, then 75% of this amount after each 75% upstream items received
prefetch
)

Maps each upstream item into a Stream and emits the Stream's items to the downstream in a sequential fashion.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
concatWith
(@NonNull Publisher<? extends T>
a Publisher to be concatenated after the current
other
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
concatWith
(@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
concatWith
(@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
concatWith
(@NonNull 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 @NonNull Single<Boolean>

Returns:

the new Single instance
contains
(@NonNull Object
the item to search for in the emissions from the current Flowable
item
)

Returns a Single that emits a Boolean that indicates whether the current Flowable emitted a specified item.

public final @NonNull Single<Long>

Returns:

the new Single instance
count
()

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

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

Returns:

the new Flowable instance
create
(@NonNull FlowableOnSubscribe<T>
the emitter that is called when a Subscriber subscribes to the returned Flowable
source
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
debounce
(@NonNull Function<? super T, @NonNull ? extends Publisher<U>>
function to retrieve a sequence that indicates the throttle duration for each item
debounceIndicator
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
debounce
(long
the length of the window of time that must pass after the emission of an item from the current Flowable in which it emits no items in order for the item to be emitted by the resulting Flowable
timeout
,
@NonNull TimeUnit
the unit of time for the specified timeout
unit
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
debounce
(long
the time each item has to be "the most recent" of those emitted by the current Flowable to ensure that it's not dropped
timeout
,
@NonNull TimeUnit
the unit of time for the specified timeout
unit
,
@NonNull Scheduler
the Scheduler to use internally to manage the timers that handle the timeout for each item
scheduler
)

Returns a Flowable that mirrors the current Flowable, except that it drops items emitted by the current Flowable that are followed by newer items before a timeout value expires on a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
debounce
(long
the time each item has to be "the most recent" of those emitted by the current Flowable to ensure that it's not dropped
timeout
,
@NonNull TimeUnit
the unit of time for the specified timeout
unit
,
@NonNull Scheduler
the Scheduler to use internally to manage the timers that handle the timeout for each item
scheduler
,
@NonNull Consumer<? super T>
called with the current entry when it has been replaced by a new one
onDropped
)

Returns a Flowable that mirrors the current Flowable, except that it drops items emitted by the current Flowable that are followed by newer items before a timeout value expires on a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
defaultIfEmpty
(T
the item to emit if the current Flowable emits no items
defaultItem
)

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

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

Returns:

the new Flowable instance
defer
(@NonNull Supplier<? extends @NonNull Publisher<? extends T>>
the Publisher factory function to invoke for each Subscriber that subscribes to the resulting Flowable
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
delay
(@NonNull Function<? super T, @NonNull ? extends Publisher<U>>
a function that returns a Publisher for each item emitted by the current Flowable, which is then used to delay the emission of that item by the resulting Flowable until the Publisher returned from itemDelay emits an item
itemDelayIndicator
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
delay
(long
the delay to shift the source by
time
,
@NonNull TimeUnit
the TimeUnit in which period is defined
unit
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
delay
(long
the delay to shift the source by
time
,
@NonNull 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 current Flowable shifted forward in time by a specified delay.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
delay
(long
the delay to shift the source by
time
,
@NonNull TimeUnit
the time unit of delay
unit
,
@NonNull Scheduler
the Scheduler to use for delaying
scheduler
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
delay
(long
the delay to shift the source by
time
,
@NonNull TimeUnit
the time unit of delay
unit
,
@NonNull 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 current Flowable shifted forward in time by a specified delay.

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

Returns:

the new Flowable instance
delay
(@NonNull Publisher<U>
a function that returns a Publisher that triggers the subscription to the current Flowable once it emits any item
subscriptionIndicator
,
@NonNull Function<? super T, @NonNull ? extends Publisher<V>>
a function that returns a Publisher for each item emitted by the current Flowable, which is then used to delay the emission of that item by the resulting Flowable until the Publisher returned from itemDelay emits an item
itemDelayIndicator
)

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

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

Returns:

the new Flowable instance
delaySubscription
(@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
delaySubscription
(long
the time to delay the subscription
time
,
@NonNull TimeUnit
the time unit of delay
unit
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
delaySubscription
(long
the time to delay the subscription
time
,
@NonNull TimeUnit
the time unit of delay
unit
,
@NonNull Scheduler
the Scheduler on which the waiting and subscription will happen
scheduler
)

Returns a Flowable that delays the subscription to the current Flowable by a given amount of time, both waiting and subscribing on a given Scheduler.

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

Returns:

the new Flowable instance
dematerialize
(@NonNull Function<@NonNull ? super T, @NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
distinct
()

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

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

Returns:

the new Flowable instance
distinct
(@NonNull 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 current Flowable 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
distinct
(@NonNull 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
,
@NonNull Supplier<? 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 current Flowable 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
distinctUntilChanged
()

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

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

Returns:

the new Flowable instance
distinctUntilChanged
(@NonNull 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 current Flowable 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
distinctUntilChanged
(@NonNull 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 current Flowable that are distinct from their immediate predecessors when compared with each other via the provided comparator function.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doAfterNext
(@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
doAfterTerminate
(@NonNull Action
an Action to be invoked when the current Flowable finishes
onAfterTerminate
)

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

public final @NonNull Flowable<T>

Returns:

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

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnCancel
(@NonNull Action
the action that gets called when the current Flowable's Subscription is canceled
onCancel
)

Calls the cancel Action if the downstream cancels the sequence.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnComplete
(@NonNull Action
the action to invoke when the current Flowable calls onComplete
onComplete
)

Invokes an Action just before the current Flowable calls onComplete.

private @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnEach
(@NonNull Consumer<? super T>
the Consumer to invoke when the current Flowable calls onNext
onNext
,
@NonNull Consumer<? super Throwable>
the Consumer to invoke when the current Flowable calls onError
onError
,
Action
the Action to invoke when the current Flowable calls onComplete
onComplete
,
Action
the Action to invoke when the current Flowable calls onAfterTerminate
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 @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnEach
(@NonNull Consumer<@NonNull ? super Notification<T>>
the action to invoke for each item emitted by the current Flowable
onNotification
)

Invokes a Consumer with a Notification instances matching the signals emitted by the current Flowable before they are forwarded to the downstream.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnEach
(@NonNull 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
)

Calls the appropriate methods of the given Subscriber when the current Flowable signals events before forwarding it to the downstream.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnError
(@NonNull Consumer<? super Throwable>
the action to invoke if the current Flowable calls onError
onError
)

Calls the given Consumer with the error Throwable if the current Flowable failed before forwarding it to the downstream.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnLifecycle
(@NonNull Consumer<? super Subscription> onSubscribe, @NonNull LongConsumer
a LongConsumer called with the request amount sent via Subscription#request(long)
onRequest
,
@NonNull Action
called when the downstream cancels the Subscription via Subscription#cancel()
onCancel
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnNext
(@NonNull Consumer<? super T>
the action to invoke when the current Flowable calls onNext
onNext
)

Calls the given Consumer with the value emitted by the current Flowable before forwarding it to the downstream.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnRequest
(@NonNull LongConsumer
the action that gets called when a Subscriber requests items from the current Flowable
onRequest
)

Calls the given LongConsumer with the request amount from the downstream before forwarding it to the current Flowable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnSubscribe
(@NonNull Consumer<? super Subscription>
the Consumer that gets called when a Subscriber subscribes to the current Flowable
onSubscribe
)

Calls the given Consumer with the Subscription provided by the current Flowable upon subscription from the downstream before forwarding it to the subscriber's onSubscribe method.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
doOnTerminate
(@NonNull Action
the action to invoke when the current Flowable calls onComplete or onError
onTerminate
)

Calls the given Action when the current Flowable completes normally or with an error before those signals are forwarded to the downstream.

public final @NonNull Maybe<T>

Returns:

the new Maybe instance
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 @NonNull Single<T>

Returns:

the new Single instance
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 @NonNull Single<T>

Returns:

the new Single instance
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
>
@NonNull Flowable<T>

Returns:

the shared Flowable instance
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 resulting Flowable
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
error
(@NonNull Supplier<? extends @NonNull Throwable>
a Supplier 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 resulting Flowable
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
error
(@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
filter
(@NonNull Predicate<? super T>
a function that evaluates each item emitted by the current Flowable, returning true if it passes the filter
predicate
)

Filters items emitted by the current Flowable by only emitting those that satisfy a specified predicate.

public final @NonNull Single<T>

Returns:

the new Single instance
first
(T
the default item to emit if the current Flowable 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 @NonNull 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 @NonNull 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 @NonNull CompletionStage<T>

Returns:

the new CompletionStage instance
firstOrErrorStage
()

Signals the first upstream item or a NoSuchElementException if the upstream is empty via a CompletionStage.

public final @NonNull CompletionStage<T>

Returns:

the new CompletionStage instance
firstStage
(T
the item to signal if the upstream is empty
defaultItem
)

Signals the first upstream item (or the default item if the upstream is empty) via a CompletionStage.

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

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, returns a Publisher
mapper
)

Returns a Flowable that emits items based on applying a function that you supply to each item emitted by the current Flowable, 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, 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 current Flowable, 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, 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 current Flowable, 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, 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 current Flowable, 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, 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 current Flowable, 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that returns a Publisher to merge for each item emitted by the current Flowable
onNextMapper
,
@NonNull Function<? super Throwable, @NonNull ? extends Publisher<? extends R>>
a function that returns a Publisher to merge for an onError notification from the current Flowable
onErrorMapper
,
@NonNull Supplier<? extends Publisher<? extends R>>
a function that returns a Publisher to merge for an onComplete notification from the current Flowable
onCompleteSupplier
)

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

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

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that returns a Publisher to merge for each item emitted by the current Flowable
onNextMapper
,
@NonNull Function<Throwable, @NonNull ? extends Publisher<? extends R>>
a function that returns a Publisher to merge for an onError notification from the current Flowable
onErrorMapper
,
@NonNull Supplier<? extends Publisher<? extends R>>
a function that returns a Publisher to merge for an onComplete notification from the current Flowable
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 current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends U>>
a function that returns a Publisher for each item emitted by the current Flowable
mapper
,
@NonNull 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 Flowable
combiner
)

Returns a Flowable that emits the results of a specified function to the pair of values emitted by the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends U>>
a function that returns a Publisher for each item emitted by the current Flowable
mapper
,
@NonNull 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 Flowable
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 current Flowable and a specified inner Publisher.

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

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends U>>
a function that returns a Publisher for each item emitted by the current Flowable
mapper
,
@NonNull 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 Flowable
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 current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends U>>
a function that returns a Publisher for each item emitted by the current Flowable
mapper
,
@NonNull 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 Flowable
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 current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends U>>
a function that returns a Publisher for each item emitted by the current Flowable
mapper
,
@NonNull 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 Flowable
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 current Flowable and a specified collection Publisher, while limiting the maximum number of concurrent subscriptions to these Publishers.

public final @NonNull Completable

Returns:

the new Completable instance
flatMapCompletable
(@NonNull 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 @NonNull Completable

Returns:

the new Completable instance
flatMapCompletable
(@NonNull 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 output type and the element type of the Iterables
U
>
@NonNull Flowable<U>

Returns:

the new Flowable instance
flatMapIterable
(@NonNull Function<? super T, @NonNull ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the current Flowable
mapper
)

Merges Iterables generated by a mapper Function for each individual item emitted by the current Flowable into a single Flowable sequence.

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

Returns:

the new Flowable instance
flatMapIterable
(@NonNull Function<? super T, @NonNull ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the current Flowable
mapper
,
int
the number of elements to prefetch from the current Flowable
bufferSize
)

Merges Iterables generated by a mapper Function for each individual item emitted by the current Flowable into a single Flowable sequence.

public final <
the element type of the Iterables
U
,
the output type as determined by the resultSelector function
V
>
@NonNull Flowable<V>

Returns:

the new Flowable instance
flatMapIterable
(@NonNull Function<? super T, @NonNull ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for each item emitted by the current Flowable
mapper
,
@NonNull BiFunction<? super T, ? super U, ? extends V>
a function that returns an item based on the item emitted by the current Flowable and the Iterable returned for that item by the collectionSelector
combiner
)

Merges Iterables generated by a mapper Function for each individual item emitted by the current Flowable into a single Flowable sequence where the resulting items will be the combination of the original item and each inner item of the respective Iterable as returned by the resultSelector BiFunction.

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

Returns:

the new Flowable instance
flatMapIterable
(@NonNull Function<? super T, @NonNull ? extends Iterable<? extends U>>
a function that returns an Iterable sequence of values for when given an item emitted by the current Flowable
mapper
,
@NonNull BiFunction<? super T, ? super U, ? extends V>
a function that returns an item based on the item emitted by the current Flowable and the Iterable returned for that item by the collectionSelector
combiner
,
int
the number of elements to prefetch from the current Flowable
prefetch
)

Merges Iterables generated by a mapper Function for each individual item emitted by the current Flowable into a single Flowable sequence where the resulting items will be the combination of the original item and each inner item of the respective Iterable as returned by the resultSelector BiFunction.

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

Returns:

the new Flowable instance
flatMapMaybe
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMapMaybe
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMapSingle
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMapSingle
(@NonNull 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 <
the element type of the Streams and the result
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMapStream
(@NonNull Function<? super T, @NonNull ? extends Stream<? extends R>>
the function that receives an upstream item and should return a Stream whose elements will be emitted to the downstream
mapper
)

Maps each upstream item into a Stream and emits the Stream's items to the downstream in a sequential fashion.

public final <
the element type of the Streams and the result
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
flatMapStream
(@NonNull Function<? super T, @NonNull ? extends Stream<? extends R>>
the function that receives an upstream item and should return a Stream whose elements will be emitted to the downstream
mapper
,
int
the number of upstream items to request upfront, then 75% of this amount after each 75% upstream items received
prefetch
)

Maps each upstream item into a Stream and emits the Stream's items to the downstream in a sequential fashion.

public final @NonNull Disposable

Returns:

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

Subscribes to the current Flowable and receives notifications for each element.

public final @NonNull Disposable

Returns:

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

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

public final @NonNull Disposable

Returns:

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

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

public final @NonNull Disposable

Returns:

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

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

public static <
the target type
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromAction
(@NonNull Action
the Action to run for each Subscriber
action
)

Returns a Flowable instance that runs the given Action for each Subscriber and emits either its exception or simply completes.

public static <
the type of items in the array and the type of items to be emitted by the resulting Flowable
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromCallable
(@NonNull 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
callable
)

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 target type
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromCompletable
(@NonNull CompletableSource
the CompletableSource to convert from
completableSource
)

Wraps a CompletableSource into a Flowable.

public static <
the element type of the CompletionStage
T
>
@NonNull Flowable<@NonNull T>

Returns:

the new Flowable instance
fromCompletionStage
(@NonNull CompletionStage<T>
the CompletionStage to convert to Flowable and signal its terminal value or error
stage
)

Signals the completion value or error of the given (hot) CompletionStage-based asynchronous calculation.

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

Returns:

the new Flowable instance
fromFuture
(@NonNull 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 Flowable
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromFuture
(@NonNull Future<? extends T>
the source Future
future
,
long
the maximum time to wait before calling get
timeout
,
@NonNull 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 items in the Iterable sequence and the type of items to be emitted by the resulting Flowable
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromIterable
(@NonNull 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 MaybeSource element
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromMaybe
(@NonNull MaybeSource<T>
the MaybeSource instance to subscribe to, not null
maybe
)

Returns a Flowable instance that when subscribed to, subscribes to the MaybeSource instance and emits onSuccess as a single item or forwards any onComplete or onError signal.

public static <
the element type of the source and resulting sequence
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromObservable
(@NonNull ObservableSource<T>
the ObservableSource to convert
source
,
@NonNull BackpressureStrategy
the backpressure strategy to apply
strategy
)

Converts the given ObservableSource into a Flowable by applying the specified backpressure strategy.

public static <
the element type of the optional value
T
>
@NonNull Flowable<@NonNull T>

Returns:

the new Flowable instance
fromOptional
(@NonNull Optional<T>
the optional value to convert into a Flowable
optional
)

Converts the existing value of the provided optional into a just(Object) or an empty optional into an empty() Flowable instance.

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

Returns:

the new Flowable instance
fromPublisher
(@NonNull Publisher<? extends T>
the Publisher to convert
publisher
)

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

public static <
the target type
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromRunnable
(@NonNull Runnable
the Runnable to run for each Subscriber
run
)

Returns a Flowable instance that runs the given Runnable for each Subscriber and emits either its unchecked exception or simply completes.

public static <
the value type of the SingleSource element
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
fromSingle
(@NonNull SingleSource<T>
the SingleSource instance to subscribe to, not null
source
)

Returns a Flowable instance that when subscribed to, subscribes to the SingleSource instance and emits onSuccess as a single item or forwards the onError signal.

public static <
the element type of the source Stream
T
>
@NonNull Flowable<@NonNull T>

Returns:

the new Flowable instance
fromStream
(@NonNull Stream<T>
the Stream of values to emit
stream
)

Converts a Stream into a finite Flowable and emits its items in the sequence.

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

Returns:

the new Flowable instance
fromSupplier
(@NonNull Supplier<? extends T>
a function, the execution of which should be deferred; fromSupplier will invoke this function only when a Subscriber subscribes to the Publisher that fromSupplier returns
supplier
)

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

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

Returns:

the new Flowable instance
generate
(@NonNull Consumer<@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
generate
(@NonNull Supplier<S>
the Supplier to generate the initial state for each Subscriber
initialState
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
generate
(@NonNull Supplier<S>
the Supplier to generate the initial state for each Subscriber
initialState
,
@NonNull 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
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
generate
(@NonNull Supplier<S>
the Supplier to generate the initial state for each Subscriber
initialState
,
@NonNull BiFunction<S, @NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
generate
(@NonNull Supplier<S>
the Supplier to generate the initial state for each Subscriber
initialState
,
@NonNull BiFunction<S, @NonNull 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
,
@NonNull 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
>
@NonNull Flowable<GroupedFlowable<K, T>>

Returns:

the new Flowable instance
groupBy
(@NonNull Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
)

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

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

Returns:

the new Flowable instance
groupBy
(@NonNull 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 the current Flowable according to a specified criterion, and emits these grouped items as GroupedFlowables.

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

Returns:

the new Flowable instance
groupBy
(@NonNull Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
@NonNull Function<? super T, ? extends V>
a function that extracts the return element for each item
valueSelector
)

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

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

Returns:

the new Flowable instance
groupBy
(@NonNull Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
@NonNull 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 the current Flowable according to a specified criterion, and emits these grouped items as GroupedFlowables.

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

Returns:

the new Flowable instance
groupBy
(@NonNull Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
@NonNull 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 the current Flowable according to a specified criterion, and emits these grouped items as GroupedFlowables.

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

Returns:

the new Flowable instance
groupBy
(@NonNull Function<? super T, ? extends K>
a function that extracts the key for each item
keySelector
,
@NonNull 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
,
@NonNull 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 the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
groupJoin
(@NonNull Publisher<? extends TRight>
the other Publisher to correlate items from the current Flowable with
other
,
@NonNull Function<? super T, @NonNull ? extends Publisher<TLeftEnd>>
a function that returns a Publisher whose emissions indicate the duration of the values of the current Flowable
leftEnd
,
@NonNull Function<? super TRight, @NonNull ? extends Publisher<TRightEnd>>
a function that returns a Publisher whose emissions indicate the duration of the values of the right Publisher
rightEnd
,
@NonNull 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 Flowable
resultSelector
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
hide
()

Hides the identity of this Flowable and its Subscription.

public final @NonNull Completable

Returns:

the new Completable instance
ignoreElements
()

Ignores all items emitted by the current Flowable and only calls onComplete or onError.

public static @NonNull Flowable<Long>

Returns:

the new Flowable instance
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
,
@NonNull 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 @NonNull Flowable<Long>

Returns:

the new Flowable instance
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
,
@NonNull TimeUnit
the time unit for both initialDelay and period
unit
,
@NonNull 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 @NonNull Flowable<Long>

Returns:

the new Flowable instance
interval
(long
the period size in time units (see below)
period
,
@NonNull 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 @NonNull Flowable<Long>

Returns:

the new Flowable instance
interval
(long
the period size in time units (see below)
period
,
@NonNull TimeUnit
time units to use for the interval size
unit
,
@NonNull 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 @NonNull 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
,
@NonNull 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 @NonNull 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
,
@NonNull TimeUnit
the unit of measure of the initialDelay and period amounts
unit
,
@NonNull 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 @NonNull Single<Boolean>

Returns:

the new Single instance
isEmpty
()

Returns a Single that emits true if the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
join
(@NonNull Publisher<? extends TRight>
the second Publisher to join items from
other
,
@NonNull Function<? super T, @NonNull ? extends Publisher<TLeftEnd>>
a function to select a duration for each item emitted by the current Flowable, used to determine overlap
leftEnd
,
@NonNull Function<? super TRight, @NonNull ? extends Publisher<TRightEnd>>
a function to select a duration for each item emitted by the right Publisher, used to determine overlap
rightEnd
,
@NonNull BiFunction<? super T, ? super TRight, ? extends R>
a function that computes an item to be emitted by the resulting Flowable 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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 @NonNull Single<T>

Returns:

the new Single instance
last
(T
the default item to emit if the current Flowable 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 @NonNull Maybe<T>

Returns:

the 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 @NonNull 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 @NonNull CompletionStage<T>

Returns:

the new CompletionStage instance
lastOrErrorStage
()

Signals the last upstream item or a NoSuchElementException if the upstream is empty via a CompletionStage.

public final @NonNull CompletionStage<T>

Returns:

the new CompletionStage instance
lastStage
(T
the item to signal if the upstream is empty
defaultItem
)

Signals the last upstream item (or the default item if the upstream is empty) via a CompletionStage.

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

Returns:

the new Flowable instance
lift
(@NonNull 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 <
the output type
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
map
(@NonNull Function<? super T, ? extends R>
a function to apply to each item emitted by the current Flowable
mapper
)

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

public final <
the non-null output type
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
mapOptional
(@NonNull Function<? super T, @NonNull Optional<? extends R>>
the function that receives the upstream item and should return a non-empty Optional to emit as the output or an empty Optional to skip to the next upstream value
mapper
)

Maps each upstream value into an Optional and emits the contained item if not empty.

public final @NonNull Flowable<Notification<T>>

Returns:

the new Flowable instance
materialize
()

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

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

Returns:

the new Flowable instance
merge
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
merge
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
merge
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
merge
(@NonNull Publisher<@NonNull ? 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 thos Publishers , without any transformation.

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

Returns:

the new Flowable instance
merge
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
merge
(@NonNull Publisher<? extends T>
a Publisher to be merged
source1
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
merge
(@NonNull Publisher<? extends T>
a Publisher to be merged
source1
,
@NonNull Publisher<? extends T>
a Publisher to be merged
source2
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
merge
(@NonNull Publisher<? extends T>
a Publisher to be merged
source1
,
@NonNull Publisher<? extends T>
a Publisher to be merged
source2
,
@NonNull Publisher<? extends T>
a Publisher to be merged
source3
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
,
@NonNull Publisher<? extends T>...
the array of Publishers
sources
)

Flattens an array 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeArray
(@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
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
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeArrayDelayError
(@NonNull Publisher<? extends T>...
the array 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeDelayError
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeDelayError
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeDelayError
(@NonNull Iterable<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeDelayError
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeDelayError
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeDelayError
(@NonNull Publisher<? extends T>
a Publisher to be merged
source1
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeDelayError
(@NonNull Publisher<? extends T>
a Publisher to be merged
source1
,
@NonNull Publisher<? extends T>
a Publisher to be merged
source2
,
@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
mergeDelayError
(@NonNull Publisher<? extends T>
a Publisher to be merged
source1
,
@NonNull Publisher<? extends T>
a Publisher to be merged
source2
,
@NonNull Publisher<? extends T>
a Publisher to be merged
source3
,
@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
mergeWith
(@NonNull Publisher<? extends T>
a Publisher to be merged
other
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
mergeWith
(@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
mergeWith
(@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
mergeWith
(@NonNull 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
>
@NonNull Flowable<T>

Returns:

the shared Flowable instance
never
()

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
observeOn
(@NonNull Scheduler
the Scheduler to notify Subscribers on
scheduler
)

Signals the items and terminal signals of the current Flowable on the specified Scheduler, asynchronously with a bounded buffer of bufferSize() slots.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
observeOn
(@NonNull 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
)

Signals the items and terminal signals of the current Flowable on the specified Scheduler, asynchronously with a bounded buffer and optionally delays onError notifications.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
observeOn
(@NonNull 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
)

Signals the items and terminal signals of the current Flowable on the specified Scheduler, asynchronously with a bounded buffer of configurable size and optionally delays onError notifications.

public final <
the output type
U
>
@NonNull Flowable<U>

Returns:

the new Flowable instance
ofType
(@NonNull Class<U>
the class type to filter the items emitted by the current Flowable
clazz
)

Filters the items emitted by the current Flowable, only emitting those of the specified type.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureBuffer
()

Buffers an unlimited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
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
)

Buffers an unlimited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place, optionally delaying an error until all buffered items have been consumed.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureBuffer
(int
number of slots available in the buffer.
capacity
)

Buffers an limited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place, however, the resulting Flowable will signal a MissingBackpressureException via onError as soon as the buffer's capacity is exceeded, dropping all undelivered items, and canceling the flow.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
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
)

Buffers an limited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place, however, the resulting Flowable will signal a MissingBackpressureException via onError as soon as the buffer's capacity is exceeded, dropping all undelivered items, and canceling the flow.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
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
)

Buffers an optionally unlimited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
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
,
@NonNull Action
action to execute if an item needs to be buffered, but there are no available slots.
onOverflow
)

Buffers an optionally unlimited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
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
,
@NonNull Action
action to execute if an item needs to be buffered, but there are no available slots.
onOverflow
,
@NonNull Consumer<? super T>
the Consumer to be called with the item that could not be buffered due to capacity constraints.
onDropped
)

Buffers an optionally unlimited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureBuffer
(int
number of slots available in the buffer.
capacity
,
@NonNull Action
action to execute if an item needs to be buffered, but there are no available slots. Null is allowed.
onOverflow
)

Buffers an limited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place, however, the resulting Flowable will signal a MissingBackpressureException via onError as soon as the buffer's capacity is exceeded, dropping all undelivered items, canceling the flow and calling the onOverflow action.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureBuffer
(long
number of slots available in the buffer.
capacity
,
@Nullable Action
action to execute if an item needs to be buffered, but there are no available slots, null is allowed.
onOverflow
,
@NonNull BackpressureOverflowStrategy
how should the resulting Flowable react to buffer overflows, null is not allowed.
overflowStrategy
)

Buffers an optionally unlimited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureBuffer
(long
number of slots available in the buffer.
capacity
,
@Nullable Action
action to execute if an item needs to be buffered, but there are no available slots, null is allowed.
onOverflow
,
@NonNull BackpressureOverflowStrategy
how should the resulting Flowable react to buffer overflows, null is not allowed.
overflowStrategy
,
@NonNull Consumer<? super T>
the Consumer to be called with the item that could not be buffered due to capacity constraints.
onDropped
)

Buffers an optionally unlimited number of items from the current Flowable and allows it to emit as fast it can while allowing the downstream to consume the items at its own place.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureDrop
()

Drops items from the current Flowable if the downstream is not ready to receive new items (indicated by a lack of Subscription#request(long) calls from it).

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureDrop
(@NonNull Consumer<? super T>
the action to invoke for each item dropped, should be fast and should never block.
onDrop
)

Drops items from the current Flowable if the downstream is not ready to receive new items (indicated by a lack of Subscription#request(long) calls from it) and calls the given Consumer with such dropped items.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureLatest
()

Drops all but the latest item emitted by the current Flowable if the downstream is not ready to receive new items (indicated by a lack of Subscription#request(long) calls from it) and emits this latest item when the downstream becomes ready.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureLatest
(@NonNull Consumer<? super T>
called with the current entry when it has been replaced by a new one
onDropped
)

Drops all but the latest item emitted by the current Flowable if the downstream is not ready to receive new items (indicated by a lack of Subscription#request(long) calls from it) and emits this latest item when the downstream becomes ready.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onBackpressureReduce
(@NonNull BiFunction<T, T, T>
the bi-function to call when there is more than one non-emitted value to downstream, the first argument of the bi-function is previous item and the second one is currently emitting from upstream
reducer
)

Reduces a sequence of two not emitted values via a function into a single value if the downstream is not ready to receive new items (indicated by a lack of Subscription#request(long) calls from it) and emits this latest item when the downstream becomes ready.

public final <
the aggregate type emitted when the downstream requests more items
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
onBackpressureReduce
(@NonNull Supplier<R>
the factory to call to create new item of type R to pass it as the first argument to reducer. It is called when previous returned value by reducer already sent to downstream or the very first update from upstream received.
supplier
,
@NonNull BiFunction<R, ? super T, R>
the bi-function to call to reduce excessive updates which downstream is not ready to receive. The first argument of type R is the object returned by supplier or result of previous reducer invocation. The second argument of type T is the current update from upstream.
reducer
)

Reduces upstream values into an aggregate value, provided by a supplier and combined via a reducer function, while the downstream is not ready to receive items, then emits this aggregate value when the downstream becomes ready.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onErrorComplete
()

Returns a Flowable instance that if the current Flowable emits an error, it will emit an onComplete and swallow the throwable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onErrorComplete
(@NonNull Predicate<? super Throwable>
the predicate to call when an Throwable is emitted which should return true if the Throwable should be swallowed and replaced with an onComplete.
predicate
)

Returns a Flowable instance that if the current Flowable emits an error and the predicate returns true, it will emit an onComplete and swallow the throwable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onErrorResumeNext
(@NonNull Function<? super Throwable, @NonNull ? extends Publisher<? extends T>>
a function that returns a Publisher that will take over if the current Flowable encounters an error
fallbackSupplier
)

Resumes the flow with a Publisher returned for the failure Throwable of the current Flowable by a function instead of signaling the error via onError.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onErrorResumeWith
(@NonNull Publisher<? extends T>
the next Publisher source that will take over if the current Flowable encounters an error
fallback
)

Resumes the flow with the given Publisher when the current Flowable fails instead of signaling the error via onError.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onErrorReturn
(@NonNull 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
itemSupplier
)

Ends the flow with a last item returned by a function for the Throwable error signaled by the current Flowable instead of signaling the error via onError.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
onErrorReturnItem
(T
the value that is emitted along with a regular onComplete in case the current Flowable signals an exception
item
)

Ends the flow with the given last item when the current Flowable fails instead of signaling the error via onError.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance 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 @NonNull 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 @NonNull 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 @NonNull 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 @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
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 Flowable
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
publish
(@NonNull Function<? super Flowable<T>, @NonNull ? 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 Flowable
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
publish
(@NonNull Function<? super Flowable<T>, @NonNull ? 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 @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
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 @NonNull Flowable<Integer>

Returns:

the new Flowable instance
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 @NonNull Flowable<Long>

Returns:

the new Flowable instance
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 @NonNull Flowable<T>

Returns:

the new Flowable instance
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 @NonNull Maybe<T>

Returns:

the new Maybe instance
reduce
(@NonNull BiFunction<T, T, T>
an accumulator function to be invoked on each item emitted by the current Flowable, 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 the current Flowable, then feeds the result of that function along with the second item emitted by the current Flowable into the same function, and so on until all items have been emitted by the current and finite Flowable, 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
>
@NonNull Single<R>

Returns:

the new Single instance
reduce
(R
the initial (seed) accumulator value
seed
,
@NonNull BiFunction<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the current Flowable, 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 the current Flowable and a specified seed value, then feeds the result of that function along with the second item emitted by the current Flowable into the same function, and so on until all items have been emitted by the current and finite Flowable, emitting the final result from the final call to your function as its sole item.

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

Returns:

the new Single instance
reduceWith
(@NonNull Supplier<R>
the Supplier that provides the initial (seed) accumulator value for each individual Subscriber
seedSupplier
,
@NonNull BiFunction<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the current Flowable, 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 the current Flowable and a seed value derived from calling a specified seedSupplier, then feeds the result of that function along with the second item emitted by the current Flowable into the same function, and so on until all items have been emitted by the current and finite Flowable, emitting the final result from the final call to your function as its sole item.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
repeat
()

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
repeat
(long
the number of times the current Flowable 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 current Flowable at most count times.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
repeatUntil
(@NonNull 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 current Flowable until the provided stop function returns true.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
repeatWhen
(@NonNull Function<? super Flowable<Object>, @NonNull ? extends Publisher<@NonNull ?>>
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 current Flowable with the exception of an onComplete.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
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 Flowable
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
replay
(@NonNull Function<? super Flowable<T>, @NonNull ? extends Publisher<R>>
the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the current Flowable
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 current Flowable.

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

Returns:

the new Flowable instance
replay
(@NonNull Function<? super Flowable<T>, @NonNull ? extends Publisher<R>>
the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the current Flowable
selector
,
int
the buffer size that limits the number of items the operator 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 current Flowable, replaying bufferSize notifications.

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

Returns:

the new Flowable instance
replay
(@NonNull Function<? super Flowable<T>, @NonNull ? extends Publisher<R>>
the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the current Flowable
selector
,
int
the buffer size that limits the number of items the operator can replay
bufferSize
,
boolean
if true, whenever the internal buffer is truncated to the given bufferSize, the oldest item will be guaranteed dereferenced, thus avoiding unexpected retention
eagerTruncate
)

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 current Flowable, replaying bufferSize notifications.

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

Returns:

the new Flowable instance
replay
(@NonNull Function<? super Flowable<T>, @NonNull ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the current Flowable
selector
,
int
the buffer size that limits the number of items the operator can replay
bufferSize
,
long
the duration of the window in which the replayed items must have been emitted
time
,
@NonNull 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 current Flowable, replaying no more than bufferSize items that were emitted within a specified time window.

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

Returns:

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

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

Returns:

the new Flowable instance
replay
(@NonNull Function<? super Flowable<T>, @NonNull ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the current Flowable
selector
,
int
the buffer size that limits the number of items the operator can replay
bufferSize
,
long
the duration of the window in which the replayed items must have been emitted
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the Scheduler that is the time source for the window
scheduler
,
boolean
if true, whenever the internal buffer is truncated to the given bufferSize/age, the oldest item will be guaranteed dereferenced, thus avoiding unexpected retention
eagerTruncate
)

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 current Flowable, replaying no more than bufferSize items that were emitted within a specified time window.

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

Returns:

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

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

Returns:

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

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

Returns:

the new Flowable instance
replay
(@NonNull Function<? super Flowable<T>, @NonNull ? extends Publisher<R>>
a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the current Flowable
selector
,
long
the duration of the window in which the replayed items must have been emitted
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the scheduler that is the time source for the window
scheduler
,
boolean
if true, whenever the internal buffer is truncated to the given age, the oldest item will be guaranteed dereferenced, thus avoiding unexpected retention
eagerTruncate
)

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 current Flowable, replaying all items that were emitted within a specified time window.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
replay
(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 current Flowable and replays at most bufferSize items to late Subscribers.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
replay
(int
the buffer size that limits the number of items that can be replayed
bufferSize
,
boolean
if true, whenever the internal buffer is truncated to the given bufferSize, the oldest item will be guaranteed dereferenced, thus avoiding unexpected retention
eagerTruncate
)

Returns a ConnectableFlowable that shares a single subscription to the current Flowable and replays at most bufferSize items to late Subscribers.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
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
,
@NonNull TimeUnit
the time unit of time
unit
)

Returns a ConnectableFlowable that shares a single subscription to the current Flowable and replays at most bufferSize items that were emitted during a specified time window.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
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
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the scheduler that is used as a time source for the window
scheduler
)

Returns a ConnectableFlowable that shares a single subscription to the current Flowable and replays a maximum of bufferSize items that are emitted within a specified time window to late Subscribers.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
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
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the scheduler that is used as a time source for the window
scheduler
,
boolean
if true, whenever the internal buffer is truncated to the given bufferSize/age, the oldest item will be guaranteed dereferenced, thus avoiding unexpected retention
eagerTruncate
)

Returns a ConnectableFlowable that shares a single subscription to the current Flowable and replays a maximum of bufferSize items that are emitted within a specified time window to late Subscribers.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
replay
(long
the duration of the window in which the replayed items must have been emitted
time
,
@NonNull TimeUnit
the time unit of time
unit
)

Returns a ConnectableFlowable that shares a single subscription to the current Flowable and replays all items emitted by it within a specified time window to late Subscribers.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
replay
(long
the duration of the window in which the replayed items must have been emitted
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the Scheduler that is the time source for the window
scheduler
)

Returns a ConnectableFlowable that shares a single subscription to the current Flowable and replays all items emitted by it within a specified time window to late Subscribers.

public final @NonNull ConnectableFlowable<T>

Returns:

the new ConnectableFlowable instance
replay
(long
the duration of the window in which the replayed items must have been emitted
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the Scheduler that is the time source for the window
scheduler
,
boolean
if true, whenever the internal buffer is truncated to the given bufferSize/age, the oldest item will be guaranteed dereferenced, thus avoiding unexpected retention
eagerTruncate
)

Returns a ConnectableFlowable that shares a single subscription to the current Flowable and replays all items emitted by it within a specified time window to late Subscribers.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
retry
()

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
retry
(@NonNull BiPredicate<@NonNull ? super Integer, @NonNull ? 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 current Flowable, resubscribing to it if it calls onError and the predicate returns true for that specific exception and retry count.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
retry
(long
the number of times to resubscribe if the current Flowable fails
times
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
retry
(long
the number of times to resubscribe if the current Flowable fails
times
,
@NonNull Predicate<@NonNull ? 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
retry
(@NonNull Predicate<@NonNull ? 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 @NonNull Flowable<T>

Returns:

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

Retries until the given stop function returns true.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
retryWhen
(@NonNull Function<? super Flowable<Throwable>, @NonNull ? extends Publisher<@NonNull ?>>
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 current Flowable with the exception of an onError.

public final void
safeSubscribe(@NonNull Subscriber<? super T>
the incoming Subscriber instance
subscriber
)

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 @NonNull Flowable<T>

Returns:

the new Flowable instance
sample
(long
the sampling rate
period
,
@NonNull TimeUnit
the TimeUnit in which period is defined
unit
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
sample
(long
the sampling rate
period
,
@NonNull 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 current Flowable within periodic time intervals and optionally emit the very last upstream item when the upstream completes.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
sample
(long
the sampling rate
period
,
@NonNull TimeUnit
the TimeUnit in which period is defined
unit
,
@NonNull Scheduler
the Scheduler to use when sampling
scheduler
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
sample
(long
the sampling rate
period
,
@NonNull TimeUnit
the TimeUnit in which period is defined
unit
,
@NonNull 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 current Flowable 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
sample
(long
the sampling rate
period
,
@NonNull TimeUnit
the TimeUnit in which period is defined
unit
,
@NonNull 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
,
@NonNull Consumer<? super T>
called with the current entry when it has been replaced by a new one
onDropped
)

Returns a Flowable that emits the most recently emitted item (if any) emitted by the current Flowable 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
sample
(@NonNull Publisher<U>
the Publisher to use for sampling the current Flowable
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 current Flowable since the previous emission from the sampler Publisher.

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

Returns:

the new Flowable instance
sample
(@NonNull Publisher<U>
the Publisher to use for sampling the current Flowable
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 current Flowable 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
scan
(@NonNull BiFunction<T, T, T>
an accumulator function to be invoked on each item emitted by the current Flowable, whose result will be emitted to Subscribers via onNext and used in the next accumulator call
accumulator
)

Returns a Flowable that emits the first value emitted by the current Flowable, then emits one value for each subsequent value emitted by the current Flowable.

public final <
the initial, accumulator and result type
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
scan
(R
the initial (seed) accumulator item
initialValue
,
@NonNull BiFunction<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the current Flowable, whose result will be emitted to Subscribers via onNext and used in the next accumulator call
accumulator
)

Returns a Flowable that emits the provided initial (seed) value, then emits one value for each value emitted by the current Flowable.

public final <
the initial, accumulator and result type
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
scanWith
(@NonNull Supplier<R>
a Supplier that returns the initial (seed) accumulator item for each individual Subscriber
seedSupplier
,
@NonNull BiFunction<R, ? super T, R>
an accumulator function to be invoked on each item emitted by the current Flowable, whose result will be emitted to Subscribers via onNext and used in the next accumulator call
accumulator
)

Returns a Flowable that emits the provided initial (seed) value, then emits one value for each value emitted by the current Flowable.

public static <
the type of items emitted by each Publisher
T
>
@NonNull Single<Boolean>

Returns:

the new Single instance
sequenceEqual
(@NonNull Publisher<? extends T>
the first Publisher to compare
source1
,
@NonNull 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
>
@NonNull Single<Boolean>

Returns:

the new Single instance
sequenceEqual
(@NonNull Publisher<? extends T>
the first Publisher to compare
source1
,
@NonNull Publisher<? extends T>
the second Publisher to compare
source2
,
@NonNull 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
>
@NonNull Single<Boolean>

Returns:

the new Single instance
sequenceEqual
(@NonNull Publisher<? extends T>
the first Publisher to compare
source1
,
@NonNull Publisher<? extends T>
the second Publisher to compare
source2
,
@NonNull 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
>
@NonNull Single<Boolean>

Returns:

the new Single instance
sequenceEqual
(@NonNull Publisher<? extends T>
the first Publisher to compare
source1
,
@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
serialize
()

Forces the current Flowable's emissions and notifications to be serialized and for it to obey the Publisher contract in other ways.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
share
()

Returns a new Flowable that multicasts (and shares a single subscription to) the current Flowable.

public final @NonNull Single<T>

Returns:

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

Returns a Single that emits the single item emitted by the current Flowable if it emits only a single item, or a default item if the current Flowable emits no items.

public final @NonNull Maybe<T>

Returns:

the new Maybe instance
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 @NonNull 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 @NonNull CompletionStage<T>

Returns:

the new CompletionStage instance
singleOrErrorStage
()

Signals the only expected upstream item, a NoSuchElementException if the upstream is empty or signals IllegalArgumentException if the upstream has more than one item via a CompletionStage.

public final @NonNull CompletionStage<T>

Returns:

the new CompletionStage instance
singleStage
(T
the item to signal if the upstream is empty
defaultItem
)

Signals the only expected upstream item (or the default item if the upstream is empty) or signals IllegalArgumentException if the upstream has more than one item via a CompletionStage.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skip
(long
the number of items to skip
count
)

Returns a Flowable that skips the first count items emitted by the current Flowable and emits the remainder.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skip
(long
the length of the time window to skip
time
,
@NonNull TimeUnit
the time unit of time
unit
)

Returns a Flowable that skips values emitted by the current Flowable before a specified time window elapses.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skip
(long
the length of the time window to skip
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the Scheduler on which the timed wait happens
scheduler
)

Returns a Flowable that skips values emitted by the current Flowable before a specified time window on a specified Scheduler elapses.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
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 current Flowable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skipLast
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
)

Returns a Flowable that drops items emitted by the current Flowable during a specified time window before the source completes.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skipLast
(long
the length of the time window
time
,
@NonNull 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 current Flowable during a specified time window before the source completes.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skipLast
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the scheduler used as the time source
scheduler
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skipLast
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull 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 current Flowable during a specified time window (defined on a specified scheduler) before the source completes.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skipLast
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull 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 current Flowable during a specified time window (defined on a specified scheduler) before the source completes.

public final <
the element type of the other Publisher
U
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
skipUntil
(@NonNull Publisher<U>
the second Publisher that has to emit an item before the current Flowable's elements begin to be mirrored by the resulting Flowable
other
)

Returns a Flowable that skips items emitted by the current Flowable until a second Publisher emits an item.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
skipWhile
(@NonNull Predicate<? super T>
a function to test each item emitted from the current Flowable
predicate
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
sorted
()

Returns a Flowable that emits the events emitted by source Publisher, in a sorted order.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
sorted
(@NonNull Comparator<@NonNull ? super T>
a function that compares two items emitted by the current Flowable and returns an Integer that indicates their sort order
comparator
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
startWith
(@NonNull CompletableSource
the other CompletableSource to run first
other
)

Returns a Flowable which first runs the other CompletableSource then the current Flowable if the other completed normally.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
startWith
(@NonNull SingleSource<T>
the other SingleSource to run first
other
)

Returns a Flowable which first runs the other SingleSource then the current Flowable if the other succeeded normally.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
startWith
(@NonNull MaybeSource<T>
the other MaybeSource to run first
other
)

Returns a Flowable which first runs the other MaybeSource then the current Flowable if the other succeeded or completed normally.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
startWith
(@NonNull 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 current Flowable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
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 current Flowable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
startWithItem
(T
the item to emit first
item
)

Returns a Flowable that emits a specified item before it begins to emit items emitted by the current Flowable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
startWithIterable
(@NonNull Iterable<? extends T>
an Iterable that contains the items you want the resulting Flowable to emit first
items
)

Returns a Flowable that emits the items in a specified Iterable before it begins to emit items emitted by the current Flowable.

public final @NonNull Disposable

Returns:

the new Disposable instance that allows cancelling the flow
subscribe
()

Subscribes to the current Flowable and ignores onNext and onComplete emissions.

public final @NonNull Disposable

Returns:

the new Disposable instance that allows cancelling the flow
subscribe
(@NonNull Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the current Flowable
onNext
)

Subscribes to the current Flowable and provides a callback to handle the items it emits.

public final @NonNull Disposable

Returns:

the new Disposable instance that allows cancelling the flow
subscribe
(@NonNull Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the current Flowable
onNext
,
@NonNull Consumer<? super Throwable>
the Consumer<Throwable> you have designed to accept any error notification from the current Flowable
onError
)

Subscribes to the current Flowable and provides callbacks to handle the items it emits and any error notification it issues.

public final @NonNull Disposable

Returns:

the new Disposable instance that allows cancelling the flow
subscribe
(@NonNull Consumer<? super T>
the Consumer<T> you have designed to accept emissions from the current Flowable
onNext
,
@NonNull Consumer<? super Throwable>
the Consumer<Throwable> you have designed to accept any error notification from the current Flowable
onError
,
@NonNull Action
the Action you have designed to accept a completion notification from the the current Flowable
onComplete
)

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

public final @NonNull Disposable

Returns:

the Disposable that allows disposing the particular subscription.
subscribe
(@NonNull Consumer<? super T>
the callback for upstream items
onNext
,
@NonNull Consumer<? super Throwable>
the callback for an upstream error if any
onError
,
@NonNull Action
the callback for the upstream completion if any
onComplete
,
@NonNull DisposableContainer
the DisposableContainer (such as CompositeDisposable) to add and remove the created Disposable Subscriber
container
)

Wraps the given onXXX callbacks into a Disposable Subscriber, adds it to the given DisposableContainer and ensures, that if the upstream terminates or this particular Disposable is disposed, the Subscriber is removed from the given container.

public final void
subscribe(@NonNull Subscriber<? super T>
the Subscriber that will consume signals from this Publisher
subscriber
)

Implements org.reactivestreams.Publisher.subscribe.

Request Publisher to start streaming data.
public final void
subscribe(@NonNull FlowableSubscriber<? super T>
the FlowableSubscriber that will consume signals from this Flowable
subscriber
)

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(@NonNull Subscriber<? super T>
the incoming Subscriber, never null
subscriber
)

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
subscribeOn
(@NonNull Scheduler
the Scheduler to perform subscription actions on
scheduler
)

Asynchronously subscribes Subscribers to the current Flowable on the specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
subscribeOn
(@NonNull 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 the current Flowable 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
switchIfEmpty
(@NonNull 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 current Flowable or the items of an alternate Publisher if the current Flowable is empty.

public final <
the element type of the inner Publishers and the output
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
switchMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, returns a Publisher
mapper
)

Returns a new Flowable by applying a function that you supply to each item emitted by the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
switchMap
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, returns a Publisher
mapper
,
int
the number of elements to prefetch from the current active inner Publisher
bufferSize
)

Returns a new Flowable by applying a function that you supply to each item emitted by the current Flowable 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, @NonNull ? extends Publisher<? extends R>> mapper, int bufferSize, boolean delayError)

public final @NonNull Completable

Returns:

the new Completable instance
switchMapCompletable
(@NonNull 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 @NonNull Completable

Returns:

the new Completable instance
switchMapCompletableDelayError
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
switchMapDelayError
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, returns a Publisher
mapper
)

Returns a new Flowable by applying a function that you supply to each item emitted by the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
switchMapDelayError
(@NonNull Function<? super T, @NonNull ? extends Publisher<? extends R>>
a function that, when applied to an item emitted by the current Flowable, returns a Publisher
mapper
,
int
the number of elements to prefetch from the current active inner Publisher
bufferSize
)

Returns a new Flowable by applying a function that you supply to each item emitted by the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
switchMapMaybe
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
switchMapMaybeDelayError
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
switchMapSingle
(@NonNull 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
switchMapSingleDelayError
(@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
switchOnNext
(@NonNull 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
switchOnNext
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
switchOnNextDelayError
(@NonNull Publisher<@NonNull ? 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
switchOnNextDelayError
(@NonNull Publisher<@NonNull ? 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
take
(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
)

Returns a Flowable that emits only the first count items emitted by the current Flowable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
take
(long
the length of the time window
time
,
@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
take
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(int
the maximum number of items to emit from the end of the sequence of items emitted by the current Flowable
count
)

Returns a Flowable that emits at most the last count items emitted by the current Flowable.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
)

Returns a Flowable that emits at most a specified number of items from the current Flowable that were emitted in a specified window of time before the current Flowable completed.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull 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 current Flowable that were emitted in a specified window of time before the current Flowable completed, where the timing information is provided by a given Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(long
the maximum number of items to emit
count
,
long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull 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 current Flowable that were emitted in a specified window of time before the current Flowable completed, where the timing information is provided by a given Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
)

Returns a Flowable that emits the items from the current Flowable that were emitted in a specified window of time before the current Flowable completed.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(long
the length of the time window
time
,
@NonNull 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 current Flowable that were emitted in a specified window of time before the current Flowable completed.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull Scheduler
the Scheduler that provides the timestamps for the observed items
scheduler
)

Returns a Flowable that emits the items from the current Flowable that were emitted in a specified window of time before the current Flowable completed, where the timing information is provided by a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull 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 current Flowable that were emitted in a specified window of time before the current Flowable completed, where the timing information is provided by a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeLast
(long
the length of the time window
time
,
@NonNull TimeUnit
the time unit of time
unit
,
@NonNull 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 current Flowable that were emitted in a specified window of time before the current Flowable completed, where the timing information is provided by a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeUntil
(@NonNull Predicate<? super T>
a function that evaluates an item emitted by the current Flowable and returns a Boolean
stopPredicate
)

Returns a Flowable that emits items emitted by the current Flowable, 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
takeUntil
(@NonNull Publisher<U>
the Publisher whose first emitted item or completion will cause takeUntil to stop emitting items from the current Flowable
other
)

Returns a Flowable that emits the items emitted by the current Flowable until a second Publisher emits an item or completes.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
takeWhile
(@NonNull Predicate<? super T>
a function that evaluates an item emitted by the current Flowable and returns a Boolean
predicate
)

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

public final @NonNull TestSubscriber<T>

Returns:

the new TestSubscriber instance
test
()

Creates a TestSubscriber that requests Long#MAX_VALUE and subscribes it to this Flowable.

public final @NonNull 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 @NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleFirst
(long
time to wait before emitting another item after emitting the last item
windowDuration
,
@NonNull TimeUnit
the unit of time of windowDuration
unit
)

Returns a Flowable that emits only the first item emitted by the current Flowable during sequential time windows of a specified duration.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleFirst
(long
time to wait before emitting another item after emitting the last item
skipDuration
,
@NonNull TimeUnit
the unit of time of skipDuration
unit
,
@NonNull 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 current Flowable during sequential time windows of a specified duration, where the windows are managed by a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleFirst
(long
time to wait before emitting another item after emitting the last item
skipDuration
,
@NonNull TimeUnit
the unit of time of skipDuration
unit
,
@NonNull Scheduler
the Scheduler to use internally to manage the timers that handle timeout for each event
scheduler
,
@NonNull Consumer<? super T>
called when an item doesn't get delivered to the downstream
onDropped
)

Returns a Flowable that emits only the first item emitted by the current Flowable during sequential time windows of a specified duration, where the windows are managed by a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleLast
(long
duration of windows within which the last item emitted by the current Flowable will be emitted
intervalDuration
,
@NonNull TimeUnit
the unit of time of intervalDuration
unit
)

Returns a Flowable that emits only the last item emitted by the current Flowable during sequential time windows of a specified duration.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleLast
(long
duration of windows within which the last item emitted by the current Flowable will be emitted
intervalDuration
,
@NonNull TimeUnit
the unit of time of intervalDuration
unit
,
@NonNull 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 current Flowable during sequential time windows of a specified duration, where the duration is governed by a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleLast
(long
duration of windows within which the last item emitted by the current Flowable will be emitted
intervalDuration
,
@NonNull TimeUnit
the unit of time of intervalDuration
unit
,
@NonNull Scheduler
the Scheduler to use internally to manage the timers that handle timeout for each event
scheduler
,
@NonNull Consumer<? super T>
called with the current entry when it has been replaced by a new one
onDropped
)

Returns a Flowable that emits only the last item emitted by the current Flowable during sequential time windows of a specified duration, where the duration is governed by a specified Scheduler.

public final @NonNull 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
,
@NonNull 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 @NonNull 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
,
@NonNull 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 @NonNull 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
,
@NonNull TimeUnit
the time unit
unit
,
@NonNull 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 @NonNull 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
,
@NonNull TimeUnit
the time unit
unit
,
@NonNull 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 @NonNull 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
,
@NonNull TimeUnit
the time unit
unit
,
@NonNull 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
,
@NonNull Consumer<? super T>
called when an item is replaced by a newer item that doesn't get delivered to the downstream, including the very last item if emitLast is false and the current undelivered item when the sequence gets canceled.
onDropped
)

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, invoking the consumer for any dropped item.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleWithTimeout
(long
the length of the window of time that must pass after the emission of an item from the current Flowable in which it emits no items in order for the item to be emitted by the resulting Flowable
timeout
,
@NonNull TimeUnit
the unit of time for the specified timeout
unit
)

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

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleWithTimeout
(long
the length of the window of time that must pass after the emission of an item from the current Flowable in which it emits no items in order for the item to be emitted by the resulting Flowable
timeout
,
@NonNull TimeUnit
the unit of time for the specified timeout
unit
,
@NonNull Scheduler
the Scheduler to use internally to manage the timers that handle the timeout for each item
scheduler
)

Returns a Flowable that mirrors the current Flowable, except that it drops items emitted by the current Flowable that are followed by newer items before a timeout value expires on a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
throttleWithTimeout
(long
the length of the window of time that must pass after the emission of an item from the current Flowable in which it emits no items in order for the item to be emitted by the resulting Flowable
timeout
,
@NonNull TimeUnit
the unit of time for the specified timeout
unit
,
@NonNull Scheduler
the Scheduler to use internally to manage the timers that handle the timeout for each item
scheduler
,
@NonNull Consumer<? super T>
called with the current entry when it has been replaced by a new one
onDropped
)

Returns a Flowable that mirrors the current Flowable, except that it drops items emitted by the current Flowable that are followed by newer items before a timeout value expires on a specified Scheduler.

public final @NonNull Flowable<Timed<T>>

Returns:

the new Flowable instance
timeInterval
()

Returns a Flowable that emits records of the time interval between consecutive items emitted by the current Flowable.

public final @NonNull Flowable<Timed<T>>

Returns:

the new Flowable instance
timeInterval
(@NonNull 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 current Flowable, where this interval is computed on a specified Scheduler.

public final @NonNull Flowable<Timed<T>>

Returns:

the new Flowable instance
timeInterval
(@NonNull 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 current Flowable.

public final @NonNull Flowable<Timed<T>>

Returns:

the new Flowable instance
timeInterval
(@NonNull TimeUnit
the time unit for the current time
unit
,
@NonNull 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 current Flowable, where this interval is computed on a specified Scheduler.

public final <
the timeout value type (ignored)
V
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
timeout
(@NonNull Function<? super T, @NonNull ? extends Publisher<V>>
a function that returns a Publisher for each item emitted by the current Flowable and that determines the timeout window for the subsequent item
itemTimeoutIndicator
)

Returns a Flowable that mirrors the current Flowable, but notifies Subscribers of a TimeoutException if an item emitted by the current Flowable 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
timeout
(@NonNull Function<? super T, @NonNull ? extends Publisher<V>>
a function that returns a Publisher, for each item emitted by the current Flowable, that determines the timeout window for the subsequent item
itemTimeoutIndicator
,
@NonNull Publisher<? extends T>
the fallback Publisher to switch to if the current Flowable times out
fallback
)

Returns a Flowable that mirrors the current Flowable, but that switches to a fallback Publisher if an item emitted by the current Flowable 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
timeout
(long
maximum duration between emitted items before a timeout occurs
timeout
,
@NonNull TimeUnit
the unit of time that applies to the timeout argument.
unit
)

Returns a Flowable that mirrors the current Flowable but applies a timeout policy for each emitted item.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
timeout
(long
maximum duration between items before a timeout occurs
timeout
,
@NonNull TimeUnit
the unit of time that applies to the timeout argument
unit
,
@NonNull Publisher<? extends T>
the fallback Publisher to use in case of a timeout
fallback
)

Returns a Flowable that mirrors the current Flowable but applies a timeout policy for each emitted item.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
timeout
(long
maximum duration between items before a timeout occurs
timeout
,
@NonNull TimeUnit
the unit of time that applies to the timeout argument
unit
,
@NonNull Scheduler
the Scheduler to run the timeout timers on
scheduler
,
@NonNull Publisher<? extends T>
the Publisher to use as the fallback in case of a timeout
fallback
)

Returns a Flowable that mirrors the current Flowable but applies a timeout policy for each emitted item using a specified Scheduler.

public final @NonNull Flowable<T>

Returns:

the new Flowable instance
timeout
(long
maximum duration between items before a timeout occurs
timeout
,
@NonNull TimeUnit
the unit of time that applies to the timeout argument
unit
,
@NonNull Scheduler
the Scheduler to run the timeout timers on
scheduler
)

Returns a Flowable that mirrors the current Flowable 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
timeout
(@NonNull Publisher<U>
a function that returns a Publisher that determines the timeout window for the first source item
firstTimeoutIndicator
,
@NonNull Function<? super T, @NonNull ? extends Publisher<V>>
a function that returns a Publisher for each item emitted by the current Flowable 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 current Flowable, but notifies Subscribers of a TimeoutException if either the first item emitted by the current Flowable 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
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
timeout
(@NonNull Publisher<U>
a function that returns a Publisher which determines the timeout window for the first source item
firstTimeoutIndicator
,
@NonNull Function<? super T, @NonNull ? extends Publisher<V>>
a function that returns a Publisher for each item emitted by the current Flowable and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequence
itemTimeoutIndicator
,
@NonNull Publisher<? extends T>
the fallback Publisher to switch to if the current Flowable times out
fallback
)

Returns a Flowable that mirrors the current Flowable, but switches to a fallback Publisher if either the first item emitted by the current Flowable or any subsequent item doesn't arrive within time windows defined by other Publishers.

private Flowable<T>
timeout0(long timeout, TimeUnit unit, Publisher<? extends T> fallback, Scheduler scheduler)

private <U, V> Flowable<T>
timeout0(Publisher<U> firstTimeoutIndicator, Function<? super T, @NonNull ? extends Publisher<V>> itemTimeoutIndicator, Publisher<? extends T> fallback)

public static @NonNull Flowable<Long>

Returns:

the new Flowable instance
timer
(long
the initial delay before emitting a single 0L
delay
,
@NonNull TimeUnit
time units to use for delay
unit
)

Returns a Flowable that emits 0L after a specified delay, and then completes.

public static @NonNull Flowable<Long>

Returns:

the new Flowable instance
timer
(long
the initial delay before emitting a single 0L
delay
,
@NonNull TimeUnit
time units to use for delay
unit
,
@NonNull 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 @NonNull Flowable<Timed<T>>

Returns:

the new Flowable instance
timestamp
()

Returns a Flowable that emits each item emitted by the current Flowable, wrapped in a Timed object.

public final @NonNull Flowable<Timed<T>>

Returns:

the new Flowable instance
timestamp
(@NonNull Scheduler
the Scheduler to use as a time source
scheduler
)

Returns a Flowable that emits each item emitted by the current Flowable, wrapped in a Timed object whose timestamps are provided by a specified Scheduler.

public final @NonNull Flowable<Timed<T>>

Returns:

the new Flowable instance
timestamp
(@NonNull TimeUnit
the time unit for the current time
unit
)

Returns a Flowable that emits each item emitted by the current Flowable, wrapped in a Timed object.

public final @NonNull Flowable<Timed<T>>

Returns:

the new Flowable instance
timestamp
(@NonNull TimeUnit
the time unit for the current time
unit
,
@NonNull Scheduler
the Scheduler to use as a time source
scheduler
)

Returns a Flowable that emits each item emitted by the current Flowable, wrapped in a Timed object whose timestamps are provided by a specified Scheduler.

public final <
the resulting object type
R
>
R

Returns:

the converted value
to
(@NonNull 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 @NonNull Future<T>

Returns:

the new Future instance
toFuture
()

Returns a Future representing the only value emitted by this Flowable.

public final @NonNull Single<List<T>>

Returns:

the new Single instance
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 @NonNull Single<List<T>>

Returns:

the new Single instance
toList
(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>
>
@NonNull Single<U>

Returns:

the new Single instance
toList
(@NonNull Supplier<U>
the Supplier 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
>
@NonNull Single<Map<K, T>>

Returns:

the new Single instance
toMap
(@NonNull 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
>
@NonNull Single<Map<K, V>>

Returns:

the new Single instance
toMap
(@NonNull Function<? super T, ? extends K>
the function that extracts the key from a source item to be used in the HashMap
keySelector
,
@NonNull 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
>
@NonNull Single<Map<K, V>>

Returns:

the new Single instance
toMap
(@NonNull Function<? super T, ? extends K>
the function that extracts the key from a source item to be used in the Map
keySelector
,
@NonNull Function<? super T, ? extends V>
the function that extracts the value from the source items to be used as value in the Map
valueSelector
,
@NonNull Supplier<? 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
>
@NonNull Single<Map<K, Collection<T>>>

Returns:

the new Single instance
toMultimap
(@NonNull 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
>
@NonNull Single<Map<K, Collection<V>>>

Returns:

the new Single instance
toMultimap
(@NonNull Function<? super T, ? extends K>
the function that extracts a key from the source items to be used as key in the HashMap
keySelector
,
@NonNull 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
>
@NonNull Single<Map<K, Collection<V>>>

Returns:

the new Single instance
toMultimap
(@NonNull 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
,
@NonNull 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
,
@NonNull Supplier<? extends Map<K, Collection<V>>>
the function that returns a Map instance to be used
mapSupplier
,
@NonNull 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
>
@NonNull Single<Map<K, Collection<V>>>

Returns:

the new Single instance
toMultimap
(@NonNull 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
,
@NonNull 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
,
@NonNull Supplier<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 @NonNull Observable<T>

Returns:

the new Observable instance
toObservable
()

Converts the current Flowable into a non-backpressured Observable.

public final @NonNull Single<List<T>>

Returns:

the new Single instance
toSortedList
()

Returns a Single that emits a List that contains the items emitted by the finite source Publisher, in a sorted order.

public final @NonNull Single<List<T>>

Returns:

the new Single instance
toSortedList
(@NonNull Comparator<? super T>
a function that compares two items emitted by the current Flowable and returns an int 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 @NonNull Single<List<T>>

Returns:

the new Single instance
toSortedList
(@NonNull Comparator<? super T>
a function that compares two items emitted by the current Flowable and returns an int 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 @NonNull Single<List<T>>

Returns:

the new Single instance
toSortedList
(int
the initial capacity of the ArrayList used to accumulate items before sorting
capacityHint
)

Returns a Single that emits a List that contains the items emitted by the finite source Publisher, in a sorted order.

public static <
the value type emitted
T
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
unsafeCreate
(@NonNull 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 @NonNull Flowable<T>

Returns:

the new Flowable instance
unsubscribeOn
(@NonNull Scheduler
the Scheduler to perform cancellation actions on
scheduler
)

Cancels the current Flowable asynchronously by invoking Subscription#cancel() on the specified Scheduler.

public static <
the element type of the generated Publisher
T
,
the type of the resource associated with the output sequence
D
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
using
(@NonNull Supplier<? extends D>
the factory function to create a resource object that depends on the Publisher
resourceSupplier
,
@NonNull Function<? super D, @NonNull ? extends Publisher<? extends T>>
the factory function to create a Publisher
sourceSupplier
,
@NonNull Consumer<? super D>
the function that will dispose of the resource
resourceCleanup
)

Constructs a Flowable that creates a dependent resource object, a Publisher with that resource and calls the provided resourceDisposer function if this inner source terminates or the downstream cancels the flow.

public static <
the element type of the generated Publisher
T
,
the type of the resource associated with the output sequence
D
>
@NonNull Flowable<T>

Returns:

the new Flowable instance
using
(@NonNull Supplier<? extends D>
the factory function to create a resource object that depends on the Publisher
resourceSupplier
,
@NonNull Function<? super D, @NonNull ? extends Publisher<? extends T>>
the factory function to create a Publisher
sourceSupplier
,
@NonNull Consumer<? super D>
the function that will dispose of the resource
resourceCleanup
,
boolean
If true, the resource disposal will happen either on a cancel() call before the upstream is disposed or just before the emission of a terminal event (onComplete or onError). If false the resource disposal will happen either on a cancel() call after the upstream is disposed or just after the emission of a terminal event (onComplete or onError).
eager
)

Constructs a Flowable that creates a dependent resource object, a Publisher with that resource and calls the provided resourceDisposer function if this inner source terminates or the downstream disposes the flow; doing it before these end-states have been reached if eager == true, after otherwise.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
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
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
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
,
@NonNull TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
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
,
@NonNull TimeUnit
the unit of time that applies to the timespan and timeskip arguments
unit
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
@NonNull TimeUnit
the unit of time that applies to the timespan argument
unit
)

Returns a Flowable that emits windows of items it collects from the current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
@NonNull TimeUnit
the unit of time which applies to the timespan argument
unit
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
@NonNull TimeUnit
the unit of time which applies to the timespan argument
unit
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
@NonNull TimeUnit
the unit of time which applies to the timespan argument
unit
,
@NonNull 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 current Flowable.

public final @NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(long
the period of time each window collects items before it should be emitted and replaced with a new window
timespan
,
@NonNull TimeUnit
the unit of time which applies to the timespan argument
unit
,
@NonNull 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 current Flowable.

public final <
the window element type (ignored)
B
>
@NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(@NonNull 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 current Flowable 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
>
@NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(@NonNull 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 current Flowable 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
>
@NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(@NonNull Publisher<U>
a Publisher that, when it emits an item, causes another window to be created
openingIndicator
,
@NonNull Function<? super U, @NonNull ? 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 current Flowable.

public final <
the element type of the window-opening Publisher
U
,
the element type of the window-closing Publishers
V
>
@NonNull Flowable<Flowable<T>>

Returns:

the new Flowable instance
window
(@NonNull Publisher<U>
a Publisher that, when it emits an item, causes another window to be created
openingIndicator
,
@NonNull Function<? super U, @NonNull ? 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 current Flowable.

public final <
the element type of the other Publisher
U
,
the result type of the combination
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
withLatestFrom
(@NonNull Publisher<? extends U>
the other Publisher
other
,
@NonNull BiFunction<? super T, ? super U, ? extends R>
the function to call when the current Flowable emits an item and the other Publisher has already emitted an item, to generate the item to be emitted by the resulting Flowable
combiner
)

Merges the specified Publisher into the current Flowable sequence by using the resultSelector function only when the current Flowable (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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
withLatestFrom
(@NonNull Publisher<T1>
the first other Publisher
source1
,
@NonNull Publisher<T2>
the second other Publisher
source2
,
@NonNull 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 the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
withLatestFrom
(@NonNull Publisher<T1>
the first other Publisher
source1
,
@NonNull Publisher<T2>
the second other Publisher
source2
,
@NonNull Publisher<T3>
the third other Publisher
source3
,
@NonNull 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 the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
withLatestFrom
(@NonNull Publisher<T1>
the first other Publisher
source1
,
@NonNull Publisher<T2>
the second other Publisher
source2
,
@NonNull Publisher<T3>
the third other Publisher
source3
,
@NonNull Publisher<T4>
the fourth other Publisher
source4
,
@NonNull 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 the current Flowable with the latest emissions from the other Publishers via a function to produce the output item.

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

Returns:

the new Flowable instance
withLatestFrom
(@NonNull Publisher<@NonNull ?>[]
the array of other sources
others
,
@NonNull Function<? super Object[], R>
the function called with an array of values from each participating Publisher
combiner
)

Combines the value emission from the current Flowable with the latest emissions from the other Publishers via a function to produce the output item.

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

Returns:

the new Flowable instance
withLatestFrom
(@NonNull Iterable<@NonNull ? extends Publisher<@NonNull ?>>
the iterable of other sources
others
,
@NonNull Function<? super Object[], R>
the function called with an array of values from each participating Publisher
combiner
)

Combines the value emission from the current Flowable 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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Iterable<@NonNull ? extends Publisher<? extends T>>
an Iterable of source Publishers
sources
,
@NonNull 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 Flowable
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 common source value type
T
,
the zipped result type
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Iterable<@NonNull ? extends Publisher<? extends T>>
an Iterable of source Publishers
sources
,
@NonNull 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 Flowable
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 static <
the value type of the first source
T1
,
the value type of the second source
T2
,
the zipped result type
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull Publisher<? extends T3>
a third source Publisher
source3
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull Publisher<? extends T3>
a third source Publisher
source3
,
@NonNull Publisher<? extends T4>
a fourth source Publisher
source4
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull Publisher<? extends T3>
a third source Publisher
source3
,
@NonNull Publisher<? extends T4>
a fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
a fifth source Publisher
source5
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull Publisher<? extends T3>
a third source Publisher
source3
,
@NonNull Publisher<? extends T4>
a fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
a fifth source Publisher
source5
,
@NonNull Publisher<? extends T6>
a sixth source Publisher
source6
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull Publisher<? extends T3>
a third source Publisher
source3
,
@NonNull Publisher<? extends T4>
a fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
a fifth source Publisher
source5
,
@NonNull Publisher<? extends T6>
a sixth source Publisher
source6
,
@NonNull Publisher<? extends T7>
a seventh source Publisher
source7
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull Publisher<? extends T3>
a third source Publisher
source3
,
@NonNull Publisher<? extends T4>
a fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
a fifth source Publisher
source5
,
@NonNull Publisher<? extends T6>
a sixth source Publisher
source6
,
@NonNull Publisher<? extends T7>
a seventh source Publisher
source7
,
@NonNull Publisher<? extends T8>
an eighth source Publisher
source8
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zip
(@NonNull Publisher<? extends T1>
the first source Publisher
source1
,
@NonNull Publisher<? extends T2>
a second source Publisher
source2
,
@NonNull Publisher<? extends T3>
a third source Publisher
source3
,
@NonNull Publisher<? extends T4>
a fourth source Publisher
source4
,
@NonNull Publisher<? extends T5>
a fifth source Publisher
source5
,
@NonNull Publisher<? extends T6>
a sixth source Publisher
source6
,
@NonNull Publisher<? extends T7>
a seventh source Publisher
source7
,
@NonNull Publisher<? extends T8>
an eighth source Publisher
source8
,
@NonNull Publisher<? extends T9>
a ninth source Publisher
source9
,
@NonNull 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 Flowable
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
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zipArray
(@NonNull 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 Flowable
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
,
@NonNull 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 final <
the type of items in the other Iterable
U
,
the type of items emitted by the resulting Flowable
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zipWith
(@NonNull Iterable<U>
the Iterable sequence
other
,
@NonNull BiFunction<? super T, ? super U, ? extends R>
a function that combines the pairs of items from the current Flowable and the Iterable to generate the items to be emitted by the resulting Flowable
zipper
)

Returns a Flowable that emits items that are the result of applying a specified function to pairs of values, one each from the current Flowable 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 Flowable
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zipWith
(@NonNull Publisher<? extends U>
the other Publisher
other
,
@NonNull 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 Flowable
zipper
)

Returns a Flowable that emits items that are the result of applying a specified function to pairs of values, one each from the current Flowable and another specified Publisher.

public final <
the type of items emitted by the other Publisher
U
,
the type of items emitted by the resulting Flowable
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zipWith
(@NonNull Publisher<? extends U>
the other Publisher
other
,
@NonNull 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 Flowable
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 current Flowable and another specified Publisher.

public final <
the type of items emitted by the other Publisher
U
,
the type of items emitted by the resulting Flowable
R
>
@NonNull Flowable<R>

Returns:

the new Flowable instance
zipWith
(@NonNull Publisher<? extends U>
the other Publisher
other
,
@NonNull 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 Flowable
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 current Flowable and another specified Publisher.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait