* Note that as with the {@code Observable} protocol, {@code onError} and {@code onComplete} are mutually exclusive events.
*
- * Like {@link Observable}, a running {@code Completable} can be stopped through the {@link Disposable} instance
+ * Like {@code Observable}, a running {@code Completable} can be stopped through the {@link Disposable} instance
* provided to consumers through {@link SingleObserver#onSubscribe}.
*
* Like an {@code Observable}, a {@code Completable} is lazy, can be either "hot" or "cold", synchronous or
@@ -62,7 +62,7 @@
*
*
*
- * See {@link Flowable} or {@link Observable} for the
+ * See {@link Flowable} or {@code Observable} for the
* implementation of the Reactive Pattern for a stream or vector of values.
*
* Example:
@@ -105,18 +105,18 @@
*/
public abstract class Completable implements CompletableSource {
/**
- * Returns a Completable which terminates as soon as one of the source Completables
- * terminates (normally or with an error) and disposes all other Completables.
+ * Returns a {@code Completable} which terminates as soon as one of the source {@code Completable}s
+ * terminates (normally or with an error) and disposes all other {@code Completable}s.
*
*
*
*
Scheduler:
*
{@code ambArray} does not operate by default on a particular {@link Scheduler}.
*
- * @param sources the array of source Completables. A subscription to each source will
+ * @param sources the array of source {@code Completable}s. A subscription to each source will
* occur in the same order as in this array.
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -135,18 +135,18 @@ public static Completable ambArray(@NonNull CompletableSource... sources) {
}
/**
- * Returns a Completable which terminates as soon as one of the source Completables
- * terminates (normally or with an error) and disposes all other Completables.
+ * Returns a {@code Completable} which terminates as soon as one of the source {@code Completable}s in the {@link Iterable} sequence
+ * terminates (normally or with an error) and disposes all other {@code Completable}s.
*
*
*
*
Scheduler:
*
{@code amb} does not operate by default on a particular {@link Scheduler}.
*
- * @param sources the array of source Completables. A subscription to each source will
- * occur in the same order as in this Iterable.
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @param sources the {@code Iterable} of source {@code Completable}s. A subscription to each source will
+ * occur in the same order as in this {@code Iterable}.
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -158,14 +158,14 @@ public static Completable amb(@NonNull Iterable extends CompletableSource> sou
}
/**
- * Returns a Completable instance that completes immediately when subscribed to.
+ * Returns a {@code Completable} instance that completes immediately when subscribed to.
*
*
*
*
Scheduler:
*
{@code complete} does not operate by default on a particular {@link Scheduler}.
*
- * @return a Completable instance that completes immediately
+ * @return a {@code Completable} instance that completes immediately
*/
@CheckReturnValue
@NonNull
@@ -175,7 +175,7 @@ public static Completable complete() {
}
/**
- * Returns a Completable which completes only when all sources complete, one after another.
+ * Returns a {@code Completable} which completes only when all sources complete, one after another.
*
*
*
@@ -183,8 +183,8 @@ public static Completable complete() {
*
{@code concatArray} does not operate by default on a particular {@link Scheduler}.
*
* @param sources the sources to concatenate
- * @return the Completable instance which completes only when all sources complete
- * @throws NullPointerException if sources is null
+ * @return the {@code Completable} instance which completes only when all sources complete
+ * @throws NullPointerException if {@code sources} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -202,7 +202,7 @@ public static Completable concatArray(@NonNull CompletableSource... sources) {
}
/**
- * Returns a Completable which completes only when all sources complete, one after another.
+ * Returns a {@code Completable} which completes only when all sources complete, one after another.
*
{@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @param sources the sources to concatenate
- * @return the Completable instance which completes only when all sources complete
- * @throws NullPointerException if sources is null
+ * @return the {@code Completable} instance which completes only when all sources complete
+ * @throws NullPointerException if {@code sources} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -223,19 +223,19 @@ public static Completable concat(@NonNull Iterable extends CompletableSource>
}
/**
- * Returns a Completable which completes only when all sources complete, one after another.
+ * Returns a {@code Completable} which completes only when all sources complete, one after another.
*
*
*
*
Backpressure:
*
The returned {@code Completable} honors the backpressure of the downstream consumer
- * and expects the other {@code Publisher} to honor it as well.
+ * and expects the other {@link Publisher} to honor it as well.
*
Scheduler:
*
{@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @param sources the sources to concatenate
- * @return the Completable instance which completes only when all sources complete
- * @throws NullPointerException if sources is null
+ * @return the {@code Completable} instance which completes only when all sources complete
+ * @throws NullPointerException if sources is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -246,20 +246,21 @@ public static Completable concat(@NonNull Publisher extends CompletableSource>
}
/**
- * Returns a Completable which completes only when all sources complete, one after another.
+ * Returns a {@code Completable} which completes only when all sources complete, one after another.
*
*
*
*
Backpressure:
*
The returned {@code Completable} honors the backpressure of the downstream consumer
- * and expects the other {@code Publisher} to honor it as well.
+ * and expects the other {@link Publisher} to honor it as well.
*
Scheduler:
*
{@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @param sources the sources to concatenate
* @param prefetch the number of sources to prefetch from the sources
- * @return the Completable instance which completes only when all sources complete
- * @throws NullPointerException if sources is null
+ * @return the {@code Completable} instance which completes only when all sources complete
+ * @throws NullPointerException if {@code sources} is {@code null}
+ * @throws IllegalArgumentException if {@code prefetch} is non-positive
*/
@CheckReturnValue
@NonNull
@@ -272,7 +273,7 @@ public static Completable concat(@NonNull Publisher extends CompletableSource>
}
/**
- * Provides an API (via a cold Completable) that bridges the reactive world with the callback-style world.
+ * Provides an API (via a cold {@code Completable}) that bridges the reactive world with the callback-style world.
*
*
*
@@ -301,14 +302,15 @@ public static Completable concat(@NonNull Publisher extends CompletableSource>
* Whenever a {@link CompletableObserver} subscribes to the returned {@code Completable}, the provided
* {@link CompletableOnSubscribe} callback is invoked with a fresh instance of a {@link CompletableEmitter}
* that will interact only with that specific {@code CompletableObserver}. If this {@code CompletableObserver}
- * disposes the flow (making {@link CompletableEmitter#isDisposed} return true),
+ * disposes the flow (making {@link CompletableEmitter#isDisposed} return {@code true}),
* other observers subscribed to the same returned {@code Completable} are not affected.
*
*
Scheduler:
*
{@code create} does not operate by default on a particular {@link Scheduler}.
*
- * @param source the emitter that is called when a CompletableObserver subscribes to the returned {@code Completable}
- * @return the new Completable instance
+ * @param source the emitter that is called when a {@code CompletableObserver} subscribes to the returned {@code Completable}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code source} is {@code null}
* @see CompletableOnSubscribe
* @see Cancellable
*/
@@ -321,7 +323,7 @@ public static Completable create(@NonNull CompletableOnSubscribe source) {
}
/**
- * Constructs a Completable instance by wrapping the given source callback
+ * Constructs a {@code Completable} instance by wrapping the given source callback
* without any safeguards; you should manage the lifecycle and response
* to downstream disposal.
*
{@code unsafeCreate} does not operate by default on a particular {@link Scheduler}.
*
- * @param source the callback which will receive the CompletableObserver instances
- * when the Completable is subscribed to.
- * @return the created Completable instance
- * @throws NullPointerException if source is null
+ * @param source the callback which will receive the {@link CompletableObserver} instances
+ * when the {@code Completable} is subscribed to.
+ * @return the created {@code Completable} instance
+ * @throws NullPointerException if {@code source} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -347,15 +349,16 @@ public static Completable unsafeCreate(@NonNull CompletableSource source) {
}
/**
- * Defers the subscription to a Completable instance returned by a supplier.
+ * Defers the subscription to a {@code Completable} instance returned by a supplier.
*
*
*
*
Scheduler:
*
{@code defer} does not operate by default on a particular {@link Scheduler}.
*
- * @param completableSupplier the supplier that returns the Completable that will be subscribed to.
- * @return the Completable instance
+ * @param completableSupplier the supplier that returns the {@code Completable} that will be subscribed to.
+ * @return the {@code Completable} instance
+ * @throws NullPointerException if {@code completableSupplier} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -366,20 +369,20 @@ public static Completable defer(@NonNull Supplier extends CompletableSource> c
}
/**
- * Creates a Completable which calls the given error supplier for each subscriber
- * and emits its returned Throwable.
+ * Creates a {@code Completable} which calls the given error supplier for each subscriber
+ * and emits its returned {@link Throwable}.
*
*
*
- * If the errorSupplier returns null, the child CompletableObservers will receive a
- * NullPointerException.
+ * If the {@code errorSupplier} returns {@code null}, the downstream {@link CompletableObserver}s will receive a
+ * {@link NullPointerException}.
*
*
Scheduler:
*
{@code error} does not operate by default on a particular {@link Scheduler}.
*
- * @param errorSupplier the error supplier, not null
- * @return the new Completable instance
- * @throws NullPointerException if errorSupplier is null
+ * @param errorSupplier the error supplier, not {@code null}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code errorSupplier} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -390,16 +393,16 @@ public static Completable error(@NonNull Supplier extends Throwable> errorSupp
}
/**
- * Creates a Completable instance that emits the given Throwable exception to subscribers.
+ * Creates a {@code Completable} instance that emits the given {@link Throwable} exception to subscribers.
*
*
*
*
Scheduler:
*
{@code error} does not operate by default on a particular {@link Scheduler}.
*
- * @param error the Throwable instance to emit, not null
- * @return the new Completable instance
- * @throws NullPointerException if error is null
+ * @param error the {@code Throwable} instance to emit, not {@code null}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code error} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -410,7 +413,7 @@ public static Completable error(@NonNull Throwable error) {
}
/**
- * Returns a Completable instance that runs the given Action for each subscriber and
+ * Returns a {@code Completable} instance that runs the given {@link Action} for each subscriber and
* emits either an unchecked exception or simply completes.
*
{@code fromAction} does not operate by default on a particular {@link Scheduler}.
*
Error handling:
- *
If the {@link Action} throws an exception, the respective {@link Throwable} is
+ *
If the {@code Action} throws an exception, the respective {@link Throwable} is
* delivered to the downstream via {@link CompletableObserver#onError(Throwable)},
* except when the downstream has disposed this {@code Completable} source.
* In this latter case, the {@code Throwable} is delivered to the global error handler via
* {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.rxjava3.exceptions.UndeliverableException UndeliverableException}.
*
*
- * @param run the runnable to run for each subscriber
- * @return the new Completable instance
- * @throws NullPointerException if run is null
+ * @param run the {@code Action} to run for each subscribing {@link CompletableObserver}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code run} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -438,23 +441,24 @@ public static Completable fromAction(@NonNull Action run) {
}
/**
- * Returns a Completable which when subscribed, executes the callable function, ignores its
- * normal result and emits onError or onComplete only.
+ * Returns a {@code Completable} which when subscribed, executes the {@link Callable} function, ignores its
+ * normal result and emits {@code onError} or {@code onComplete} only.
*
*
*
*
Scheduler:
*
{@code fromCallable} does not operate by default on a particular {@link Scheduler}.
*
Error handling:
- *
If the {@link Callable} throws an exception, the respective {@link Throwable} is
+ *
If the {@code Callable} throws an exception, the respective {@link Throwable} is
* delivered to the downstream via {@link CompletableObserver#onError(Throwable)},
* except when the downstream has disposed this {@code Completable} source.
* In this latter case, the {@code Throwable} is delivered to the global error handler via
* {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.rxjava3.exceptions.UndeliverableException UndeliverableException}.
*
*
- * @param callable the callable instance to execute for each subscriber
- * @return the new Completable instance
+ * @param callable the {@code Callable} instance to execute for each subscribing {@link CompletableObserver}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code callable} is {@code null}
* @see #defer(Supplier)
* @see #fromSupplier(Supplier)
*/
@@ -467,17 +471,20 @@ public static Completable fromCallable(@NonNull Callable> callable) {
}
/**
- * Returns a Completable instance that reacts to the termination of the given Future in a blocking fashion.
+ * Returns a {@code Completable} instance that reacts to the termination of the given {@link Future} in a blocking fashion.
*
*
*
- * Note that if any of the observers to this Completable call dispose, this Completable will cancel the future.
+ * Note that disposing the {@code Completable} won't cancel the {@code Future}.
+ * Use {@link #doOnDispose(Action)} and call {@link Future#cancel(boolean)} in the
+ * {@link Action}.
*
*
Scheduler:
*
{@code fromFuture} does not operate by default on a particular {@link Scheduler}.
*
- * @param future the future to react to
- * @return the new Completable instance
+ * @param future the {@code Future} to react to
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code future} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -488,8 +495,8 @@ public static Completable fromFuture(@NonNull Future> future) {
}
/**
- * Returns a Completable instance that when subscribed to, subscribes to the {@code Maybe} instance and
- * emits a completion event if the maybe emits {@code onSuccess}/{@code onComplete} or forwards any
+ * Returns a {@code Completable} instance that when subscribed to, subscribes to the {@link Maybe} instance and
+ * emits an {@code onComplete} event if the maybe emits {@code onSuccess}/{@code onComplete} or forwards any
* {@code onError} events.
*
History: 2.1.17 - beta
* @param the value type of the {@link MaybeSource} element
- * @param maybe the Maybe instance to subscribe to, not null
- * @return the new Completable instance
- * @throws NullPointerException if single is null
+ * @param maybe the {@code Maybe} instance to subscribe to, not {@code null}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code maybe} is {@code null}
* @since 2.2
*/
@CheckReturnValue
@@ -513,7 +520,7 @@ public static Completable fromMaybe(@NonNull MaybeSource maybe) {
}
/**
- * Returns a Completable instance that runs the given Runnable for each subscriber and
+ * Returns a {@code Completable} instance that runs the given {@link Runnable} for each {@link CompletableObserver} and
* emits either its exception or simply completes.
*
{@code fromRunnable} does not operate by default on a particular {@link Scheduler}.
*
Error handling:
- *
If the {@link Runnable} throws an exception, the respective {@link Throwable} is
+ *
If the {@code Runnable} throws an exception, the respective {@link Throwable} is
* delivered to the downstream via {@link CompletableObserver#onError(Throwable)},
* except when the downstream has disposed this {@code Completable} source.
* In this latter case, the {@code Throwable} is delivered to the global error handler via
* {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.rxjava3.exceptions.UndeliverableException UndeliverableException}.
*
*
- * @param run the runnable to run for each subscriber
- * @return the new Completable instance
- * @throws NullPointerException if run is null
+ * @param run the {@code Runnable} to run for each {@code CompletableObserver}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code run} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -541,7 +548,7 @@ public static Completable fromRunnable(@NonNull Runnable run) {
}
/**
- * Returns a Completable instance that subscribes to the given Observable, ignores all values and
+ * Returns a {@code Completable} instance that subscribes to the given {@link ObservableSource}, ignores all values and
* emits only the terminal event.
*
{@code fromObservable} does not operate by default on a particular {@link Scheduler}.
*
- * @param the type of the Observable
- * @param observable the Observable instance to subscribe to, not null
- * @return the new Completable instance
- * @throws NullPointerException if flowable is null
+ * @param the type of the {@code ObservableSource}
+ * @param observable the {@code ObservableSource} instance to subscribe to, not {@code null}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code observable} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -563,19 +570,19 @@ public static Completable fromObservable(@NonNull ObservableSource observ
}
/**
- * Returns a Completable instance that subscribes to the given publisher, ignores all values and
+ * Returns a {@code Completable} instance that subscribes to the given {@link Publisher}, ignores all values and
* emits only the terminal event.
*
*
*
- * The {@link Publisher} must follow the
+ * The {@code Publisher} must follow the
* Reactive-Streams specification.
* Violating the specification may result in undefined behavior.
*
* If possible, use {@link #create(CompletableOnSubscribe)} to create a
* source-like {@code Completable} instead.
*
- * Note that even though {@link Publisher} appears to be a functional interface, it
+ * Note that even though {@code Publisher} appears to be a functional interface, it
* is not recommended to implement it through a lambda as the specification requires
* state management that is not achievable with a stateless lambda.
*
{@code fromPublisher} does not operate by default on a particular {@link Scheduler}.
*
- * @param the type of the publisher
- * @param publisher the Publisher instance to subscribe to, not null
- * @return the new Completable instance
- * @throws NullPointerException if publisher is null
+ * @param the type of the {@code Publisher}
+ * @param publisher the {@code Publisher} instance to subscribe to, not {@code null}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code publisher} is {@code null}
* @see #create(CompletableOnSubscribe)
*/
@CheckReturnValue
@@ -601,18 +608,18 @@ public static Completable fromPublisher(@NonNull Publisher publisher) {
}
/**
- * Returns a Completable instance that when subscribed to, subscribes to the Single instance and
- * emits a completion event if the single emits onSuccess or forwards any onError events.
+ * Returns a {@code Completable} instance that when subscribed to, subscribes to the {@link SingleSource} instance and
+ * emits a completion event if the single emits {@code onSuccess} or forwards any {@code onError} events.
*
*
*
*
Scheduler:
*
{@code fromSingle} does not operate by default on a particular {@link Scheduler}.
*
- * @param the value type of the Single
- * @param single the Single instance to subscribe to, not null
- * @return the new Completable instance
- * @throws NullPointerException if single is null
+ * @param the value type of the {@code SingleSource}
+ * @param single the {@code SingleSource} instance to subscribe to, not {@code null}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code single} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -623,23 +630,24 @@ public static Completable fromSingle(@NonNull SingleSource single) {
}
/**
- * Returns a Completable which when subscribed, executes the supplier function, ignores its
- * normal result and emits onError or onComplete only.
+ * Returns a {@code Completable} which when subscribed, executes the {@link Supplier} function, ignores its
+ * normal result and emits {@code onError} or {@code onComplete} only.
*
*
*
*
Scheduler:
*
{@code fromSupplier} does not operate by default on a particular {@link Scheduler}.
*
Error handling:
- *
If the {@link Supplier} throws an exception, the respective {@link Throwable} is
+ *
If the {@code Supplier} throws an exception, the respective {@link Throwable} is
* delivered to the downstream via {@link CompletableObserver#onError(Throwable)},
* except when the downstream has disposed this {@code Completable} source.
* In this latter case, the {@code Throwable} is delivered to the global error handler via
* {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.rxjava3.exceptions.UndeliverableException UndeliverableException}.
*
*
- * @param supplier the Supplier instance to execute for each subscriber
- * @return the new Completable instance
+ * @param supplier the {@code Supplier} instance to execute for each {@link CompletableObserver}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code supplier} is {@code null}
* @see #defer(Supplier)
* @see #fromCallable(Callable)
* @since 3.0.0
@@ -653,30 +661,30 @@ public static Completable fromSupplier(@NonNull Supplier> supplier) {
}
/**
- * Returns a Completable instance that subscribes to all sources at once and
- * completes only when all source Completables complete or one of them emits an error.
+ * Returns a {@code Completable} instance that subscribes to all sources at once and
+ * completes only when all source {@link CompletableSource}s complete or one of them emits an error.
*
*
*
*
Scheduler:
*
{@code mergeArray} does not operate by default on a particular {@link Scheduler}.
*
Error handling:
- *
If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
+ *
If any of the source {@code CompletableSource}s signal a {@link Throwable} via {@code onError}, the resulting
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are disposed.
* If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
* first one's error or, depending on the concurrency of the sources, may terminate with a
- * {@code CompositeException} containing two or more of the various error signals.
+ * {@link CompositeException} containing two or more of the various error signals.
* {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
- * {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
+ * {@link RxJavaPlugins#onError(Throwable)} method as {@link UndeliverableException} errors. Similarly, {@code Throwable}s
* signaled by source(s) after the returned {@code Completable} has been disposed or terminated with a
* (composite) error will be sent to the same global error handler.
* Use {@link #mergeArrayDelayError(CompletableSource...)} to merge sources and terminate only when all source {@code CompletableSource}s
* have completed or failed with an error.
*
*
- * @param sources the iterable sequence of sources.
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @param sources the array of {@code CompletableSource}s.
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
* @see #mergeArrayDelayError(CompletableSource...)
*/
@CheckReturnValue
@@ -695,30 +703,30 @@ public static Completable mergeArray(@NonNull CompletableSource... sources) {
}
/**
- * Returns a Completable instance that subscribes to all sources at once and
- * completes only when all source Completables complete or one of them emits an error.
+ * Returns a {@code Completable} instance that subscribes to all sources at once and
+ * completes only when all source {@link CompletableSource}s complete or one of them emits an error.
*
*
*
*
Scheduler:
*
{@code merge} does not operate by default on a particular {@link Scheduler}.
*
Error handling:
- *
If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
+ *
If any of the source {@code CompletableSource}s signal a {@link Throwable} via {@code onError}, the resulting
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are disposed.
* If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
* first one's error or, depending on the concurrency of the sources, may terminate with a
- * {@code CompositeException} containing two or more of the various error signals.
+ * {@link CompositeException} containing two or more of the various error signals.
* {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
- * {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
+ * {@link RxJavaPlugins#onError(Throwable)} method as {@link UndeliverableException} errors. Similarly, {@code Throwable}s
* signaled by source(s) after the returned {@code Completable} has been disposed or terminated with a
* (composite) error will be sent to the same global error handler.
* Use {@link #mergeDelayError(Iterable)} to merge sources and terminate only when all source {@code CompletableSource}s
* have completed or failed with an error.
*
*
- * @param sources the iterable sequence of sources.
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @param sources the {@link Iterable} sequence of {@code CompletableSource}s.
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
* @see #mergeDelayError(Iterable)
*/
@CheckReturnValue
@@ -730,33 +738,33 @@ public static Completable merge(@NonNull Iterable extends CompletableSource> s
}
/**
- * Returns a Completable instance that subscribes to all sources at once and
- * completes only when all source Completables complete or one of them emits an error.
+ * Returns a {@code Completable} instance that subscribes to all sources at once and
+ * completes only when all source {@link CompletableSource}s complete or one of them emits an error.
*
*
*
*
Backpressure:
- *
The returned {@code Completable} honors the backpressure of the downstream consumer
- * and expects the other {@code Publisher} to honor it as well.
+ *
The operator consumes the given {@link Publisher} in an unbounded manner
+ * (requesting {@link Long#MAX_VALUE} upfront).
*
Scheduler:
*
{@code merge} does not operate by default on a particular {@link Scheduler}.
*
Error handling:
- *
If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
+ *
If any of the source {@code CompletableSource}s signal a {@link Throwable} via {@code onError}, the resulting
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are disposed.
* If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
* first one's error or, depending on the concurrency of the sources, may terminate with a
- * {@code CompositeException} containing two or more of the various error signals.
+ * {@link CompositeException} containing two or more of the various error signals.
* {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
- * {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
+ * {@link RxJavaPlugins#onError(Throwable)} method as {@link UndeliverableException} errors. Similarly, {@code Throwable}s
* signaled by source(s) after the returned {@code Completable} has been disposed or terminated with a
* (composite) error will be sent to the same global error handler.
* Use {@link #mergeDelayError(Publisher)} to merge sources and terminate only when all source {@code CompletableSource}s
* have completed or failed with an error.
*
*
- * @param sources the iterable sequence of sources.
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @param sources the {@code Publisher} sequence of {@code CompletableSource}s.
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
* @see #mergeDelayError(Publisher)
*/
@CheckReturnValue
@@ -768,35 +776,36 @@ public static Completable merge(@NonNull Publisher extends CompletableSource>
}
/**
- * Returns a Completable instance that keeps subscriptions to a limited number of sources at once and
- * completes only when all source Completables complete or one of them emits an error.
+ * Returns a {@code Completable} instance that keeps subscriptions to a limited number of sources at once and
+ * completes only when all source {@link CompletableSource}s complete or one of them emits an error.
*
*
*
*
Backpressure:
- *
The returned {@code Completable} honors the backpressure of the downstream consumer
- * and expects the other {@code Publisher} to honor it as well.
+ *
The operator consumes the given {@link Publisher} in a bounded manner,
+ * requesting {@code maxConcurrency} items first, then keeps requesting as
+ * many more as the inner {@code CompletableSource}s terminate.
*
Scheduler:
*
{@code merge} does not operate by default on a particular {@link Scheduler}.
*
Error handling:
- *
If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
+ *
If any of the source {@code CompletableSource}s signal a {@link Throwable} via {@code onError}, the resulting
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are disposed.
* If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
* first one's error or, depending on the concurrency of the sources, may terminate with a
- * {@code CompositeException} containing two or more of the various error signals.
+ * {@link CompositeException} containing two or more of the various error signals.
* {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
- * {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
+ * {@link RxJavaPlugins#onError(Throwable)} method as {@link UndeliverableException} errors. Similarly, {@code Throwable}s
* signaled by source(s) after the returned {@code Completable} has been disposed or terminated with a
* (composite) error will be sent to the same global error handler.
* Use {@link #mergeDelayError(Publisher, int)} to merge sources and terminate only when all source {@code CompletableSource}s
* have completed or failed with an error.
*
*
- * @param sources the iterable sequence of sources.
+ * @param sources the {@code Publisher} sequence of {@code CompletableSource}s.
* @param maxConcurrency the maximum number of concurrent subscriptions
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
- * @throws IllegalArgumentException if maxConcurrency is less than 1
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
+ * @throws IllegalArgumentException if {@code maxConcurrency} is less than 1
* @see #mergeDelayError(Publisher, int)
*/
@CheckReturnValue
@@ -808,22 +817,23 @@ public static Completable merge(@NonNull Publisher extends CompletableSource>
}
/**
- * Returns a Completable instance that keeps subscriptions to a limited number of sources at once and
- * completes only when all source Completables terminate in one way or another, combining any exceptions
- * thrown by either the sources Observable or the inner Completable instances.
+ * Returns a {@code Completable} instance that keeps subscriptions to a limited number of {@link CompletableSource}s at once and
+ * completes only when all source {@code CompletableSource}s terminate in one way or another, combining any exceptions
+ * signaled by either the source {@link Publisher} or the inner {@code CompletableSource} instances.
*
*
Backpressure:
- *
The returned {@code Flowable} honors the backpressure of the downstream consumer
- * and expects the other {@code Publisher} to honor it as well.
+ *
The operator consumes the given {@code Publisher} in a bounded manner,
+ * requesting {@code maxConcurrency} items first, then keeps requesting as
+ * many more as the inner {@code CompletableSource}s terminate.
*
Scheduler:
*
{@code merge0} does not operate by default on a particular {@link Scheduler}.
*
- * @param sources the iterable sequence of sources.
+ * @param sources the {@code Publisher} sequence of {@code CompletableSource}s.
* @param maxConcurrency the maximum number of concurrent subscriptions
- * @param delayErrors delay all errors from the main source and from the inner Completables?
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
- * @throws IllegalArgumentException if maxConcurrency is less than 1
+ * @param delayErrors delay all errors from the main source and from the inner {@code CompletableSource}s?
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
+ * @throws IllegalArgumentException if {@code maxConcurrency} is less than 1
*/
@CheckReturnValue
@NonNull
@@ -836,8 +846,8 @@ private static Completable merge0(@NonNull Publisher extends CompletableSource
}
/**
- * Returns a CompletableConsumable that subscribes to all Completables in the source array and delays
- * any error emitted by either the sources observable or any of the inner Completables until all of
+ * Returns a {@code Completable} that subscribes to all {@link CompletableSource}s in the source array and delays
+ * any error emitted by any of the inner {@code CompletableSource}s until all of
* them terminate in a way or another.
*
{@code mergeArrayDelayError} does not operate by default on a particular {@link Scheduler}.
*
- * @param sources the array of Completables
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @param sources the array of {@code CompletableSource}s
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -859,8 +869,8 @@ public static Completable mergeArrayDelayError(@NonNull CompletableSource... sou
}
/**
- * Returns a Completable that subscribes to all Completables in the source sequence and delays
- * any error emitted by either the sources observable or any of the inner Completables until all of
+ * Returns a {@code Completable} that subscribes to all {@link CompletableSource}s in the source sequence and delays
+ * any error emitted by any of the inner {@code CompletableSource}s until all of
* them terminate in a way or another.
*
*
@@ -868,9 +878,9 @@ public static Completable mergeArrayDelayError(@NonNull CompletableSource... sou
*
Scheduler:
*
{@code mergeDelayError} does not operate by default on a particular {@link Scheduler}.
*
- * @param sources the sequence of Completables
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @param sources the sequence of {@code CompletableSource}s
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -881,21 +891,21 @@ public static Completable mergeDelayError(@NonNull Iterable extends Completabl
}
/**
- * Returns a Completable that subscribes to all Completables in the source sequence and delays
- * any error emitted by either the sources observable or any of the inner Completables until all of
+ * Returns a {@code Completable} that subscribes to all {@link CompletableSource}s in the source sequence and delays
+ * any error emitted by either the sources {@link Publisher} or any of the inner {@code CompletableSource}s until all of
* them terminate in a way or another.
*
*
*
*
Backpressure:
- *
The returned {@code Completable} honors the backpressure of the downstream consumer
- * and expects the other {@code Publisher} to honor it as well.
+ *
The operator consumes the {@code Publisher} in an unbounded manner
+ * (requesting {@link Long#MAX_VALUE} from it).
*
Scheduler:
*
{@code mergeDelayError} does not operate by default on a particular {@link Scheduler}.
*
- * @param sources the sequence of Completables
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @param sources the sequence of {@code CompletableSource}s
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -906,23 +916,24 @@ public static Completable mergeDelayError(@NonNull Publisher extends Completab
}
/**
- * Returns a Completable that subscribes to a limited number of inner Completables at once in
+ * Returns a {@code Completable} that subscribes to a limited number of inner {@link CompletableSource}s at once in
* the source sequence and delays any error emitted by either the sources
- * observable or any of the inner Completables until all of
+ * {@link Publisher} or any of the inner {@code CompletableSource}s until all of
* them terminate in a way or another.
*
*
*
*
Backpressure:
- *
The returned {@code Completable} honors the backpressure of the downstream consumer
- * and expects the other {@code Publisher} to honor it as well.
+ *
The operator requests {@code maxConcurrency} items from the {@code Publisher}
+ * upfront and keeps requesting as many more as many inner {@code CompletableSource}s terminate.
*
Scheduler:
*
{@code mergeDelayError} does not operate by default on a particular {@link Scheduler}.
*
- * @param sources the sequence of Completables
- * @param maxConcurrency the maximum number of concurrent subscriptions to Completables
- * @return the new Completable instance
- * @throws NullPointerException if sources is null
+ * @param sources the sequence of {@code CompletableSource}s
+ * @param maxConcurrency the maximum number of concurrent subscriptions to have
+ * at a time to the inner {@code CompletableSource}s
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code sources} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -933,14 +944,14 @@ public static Completable mergeDelayError(@NonNull Publisher extends Completab
}
/**
- * Returns a Completable that never calls onError or onComplete.
+ * Returns a {@code Completable} that never calls {@code onError} or {@code onComplete}.
*
*
*
*
Scheduler:
*
{@code never} does not operate by default on a particular {@link Scheduler}.
*
- * @return the singleton instance that never calls onError or onComplete
+ * @return the singleton instance that never calls {@code onError} or {@code onComplete}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -950,7 +961,7 @@ public static Completable never() {
}
/**
- * Returns a Completable instance that fires its onComplete event after the given delay elapsed.
+ * Returns a {@code Completable} instance that fires its {@code onComplete} event after the given delay elapsed.
*
*
*
@@ -959,7 +970,8 @@ public static Completable never() {
*
* @param delay the delay time
* @param unit the delay unit
- * @return the new Completable instance
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code unit} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
@@ -969,18 +981,19 @@ public static Completable timer(long delay, @NonNull TimeUnit unit) {
}
/**
- * Returns a Completable instance that fires its onComplete event after the given delay elapsed
- * by using the supplied scheduler.
+ * Returns a {@code Completable} instance that fires its {@code onComplete} event after the given delay elapsed
+ * by using the supplied {@link Scheduler}.
*
*
*
*
Scheduler:
- *
{@code timer} operates on the {@link Scheduler} you specify.
+ *
{@code timer} operates on the {@code Scheduler} you specify.
*
* @param delay the delay time
* @param unit the delay unit
- * @param scheduler the scheduler where to emit the complete event
- * @return the new Completable instance
+ * @param scheduler the {@code Scheduler} where to emit the {@code onComplete} event
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code unit} or {@code scheduler} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -992,9 +1005,9 @@ public static Completable timer(long delay, @NonNull TimeUnit unit, @NonNull Sch
}
/**
- * Creates a NullPointerException instance and sets the given Throwable as its initial cause.
- * @param ex the Throwable instance to use as cause, not null (not verified)
- * @return the created NullPointerException
+ * Creates a {@link NullPointerException} instance and sets the given {@link Throwable} as its initial cause.
+ * @param ex the {@code Throwable} instance to use as cause, not {@code null} (not verified)
+ * @return the created {@code NullPointerException}
*/
private static NullPointerException toNpe(Throwable ex) {
NullPointerException npe = new NullPointerException("Actually not, but can't pass out an exception otherwise...");
@@ -1003,8 +1016,8 @@ private static NullPointerException toNpe(Throwable ex) {
}
/**
- * Returns a Completable instance which manages a resource along
- * with a custom Completable instance while the subscription is active.
+ * Returns a {@code Completable} instance which manages a resource along
+ * with a custom {@link CompletableSource} instance while the subscription is active.
*
{@code using} does not operate by default on a particular {@link Scheduler}.
*
* @param the resource type
- * @param resourceSupplier the supplier that returns a resource to be managed.
- * @param completableFunction the function that given a resource returns a Completable instance that will be subscribed to
- * @param disposer the consumer that disposes the resource created by the resource supplier
- * @return the new Completable instance
+ * @param resourceSupplier the {@link Supplier} that returns a resource to be managed.
+ * @param completableFunction the {@link Function} that given a resource returns a {@code CompletableSource} instance that will be subscribed to
+ * @param disposer the {@link Consumer} that disposes the resource created by the resource supplier
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code resourceSupplier}, {@code completableFunction}
+ * or {@code disposer} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1029,29 +1044,31 @@ public static Completable using(@NonNull Supplier resourceSupplier,
}
/**
- * Returns a Completable instance which manages a resource along
- * with a custom Completable instance while the subscription is active and performs eager or lazy
+ * Returns a {@code Completable} instance which manages a resource along
+ * with a custom {@link CompletableSource} instance while the subscription is active and performs eager or lazy
* resource disposition.
*
*
*
* If this overload performs a lazy disposal after the terminal event is emitted.
- * Exceptions thrown at this time will be delivered to RxJavaPlugins only.
+ * The exceptions thrown at this time will be delivered to the global {@link RxJavaPlugins#onError(Throwable)} handler only.
*
*
Scheduler:
*
{@code using} does not operate by default on a particular {@link Scheduler}.
*
* @param the resource type
- * @param resourceSupplier the supplier that returns a resource to be managed
- * @param completableFunction the function that given a resource returns a non-null
- * Completable instance that will be subscribed to
- * @param disposer the consumer that disposes the resource created by the resource supplier
+ * @param resourceSupplier the {@link Supplier} that returns a resource to be managed
+ * @param completableFunction the {@link Function} that given a resource returns a non-{@code null}
+ * {@code CompletableSource} instance that will be subscribed to
+ * @param disposer the {@link Consumer} that disposes the resource created by the resource supplier
* @param eager
* If {@code true} then resource disposal will happen either on a {@code dispose()} call before the upstream is disposed
* or just before the emission of a terminal event ({@code onComplete} or {@code onError}).
* If {@code false} the resource disposal will happen either on a {@code dispose()} call after the upstream is disposed
* or just after the emission of a terminal event ({@code onComplete} or {@code onError}).
- * @return the new Completable instance
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code resourceSupplier}, {@code completableFunction}
+ * or {@code disposer} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1069,8 +1086,8 @@ public static Completable using(
}
/**
- * Wraps the given CompletableSource into a Completable
- * if not already Completable.
+ * Wraps the given {@link CompletableSource} into a {@code Completable}
+ * if not already {@code Completable}.
*
*
*
@@ -1078,8 +1095,8 @@ public static Completable using(
*
{@code wrap} does not operate by default on a particular {@link Scheduler}.
*
* @param source the source to wrap
- * @return the source or its wrapper Completable
- * @throws NullPointerException if source is null
+ * @return the source or its wrapper {@code Completable}
+ * @throws NullPointerException if {@code source} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1093,18 +1110,18 @@ public static Completable wrap(@NonNull CompletableSource source) {
}
/**
- * Returns a Completable that emits the a terminated event of either this Completable
- * or the other Completable whichever fires first.
+ * Returns a {@code Completable} that emits the a terminated event of either this {@code Completable}
+ * or the other {@link CompletableSource}, whichever fires first.
*
*
*
*
Scheduler:
*
{@code ambWith} does not operate by default on a particular {@link Scheduler}.
*
- * @param other the other Completable, not null. A subscription to this provided source will occur after subscribing
+ * @param other the other {@code CompletableSource}, not {@code null}. A subscription to this provided source will occur after subscribing
* to the current source.
- * @return the new Completable instance
- * @throws NullPointerException if other is null
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code other} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1115,20 +1132,20 @@ public final Completable ambWith(@NonNull CompletableSource other) {
}
/**
- * Returns an Observable which will subscribe to this Completable and once that is completed then
- * will subscribe to the {@code next} ObservableSource. An error event from this Completable will be
- * propagated to the downstream subscriber and will result in skipping the subscription of the
- * Observable.
+ * Returns an {@link Observable} which will subscribe to this {@code Completable} and once that is completed then
+ * will subscribe to the {@code next} {@link ObservableSource}. An error event from this {@code Completable} will be
+ * propagated to the downstream observer and will result in skipping the subscription to the
+ * next {@code ObservableSource}.
*
*
*
*
Scheduler:
*
{@code andThen} does not operate by default on a particular {@link Scheduler}.
*
- * @param the value type of the next ObservableSource
- * @param next the Observable to subscribe after this Completable is completed, not null
- * @return Observable that composes this Completable and next
- * @throws NullPointerException if next is null
+ * @param the value type of the next {@code ObservableSource}
+ * @param next the {@code ObservableSource} to subscribe after this {@code Completable} is completed, not {@code null}
+ * @return the new {@code Observable} that composes this {@code Completable} and the next {@code ObservableSource}
+ * @throws NullPointerException if {@code next} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1139,10 +1156,10 @@ public final Completable ambWith(@NonNull CompletableSource other) {
}
/**
- * Returns a Flowable which will subscribe to this Completable and once that is completed then
- * will subscribe to the {@code next} Flowable. An error event from this Completable will be
- * propagated to the downstream subscriber and will result in skipping the subscription of the
- * Publisher.
+ * Returns a {@link Flowable} which will subscribe to this {@code Completable} and once that is completed then
+ * will subscribe to the {@code next} {@link Publisher}. An error event from this {@code Completable} will be
+ * propagated to the downstream subscriber and will result in skipping the subscription to the next
+ * {@code Publisher}.
*
*
*
@@ -1152,10 +1169,10 @@ public final Completable ambWith(@NonNull CompletableSource other) {
*
Scheduler:
*
{@code andThen} does not operate by default on a particular {@link Scheduler}.
*
- * @param the value type of the next Publisher
- * @param next the Publisher to subscribe after this Completable is completed, not null
- * @return Flowable that composes this Completable and next
- * @throws NullPointerException if next is null
+ * @param the value type of the next {@code Publisher}
+ * @param next the {@code Publisher} to subscribe after this {@code Completable} is completed, not {@code null}
+ * @return the new {@code Flowable} that composes this {@code Completable} and the next {@code Publisher}
+ * @throws NullPointerException if {@code next} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1167,10 +1184,10 @@ public final Completable ambWith(@NonNull CompletableSource other) {
}
/**
- * Returns a Single which will subscribe to this Completable and once that is completed then
- * will subscribe to the {@code next} SingleSource. An error event from this Completable will be
- * propagated to the downstream subscriber and will result in skipping the subscription of the
- * Single.
+ * Returns a {@link Single} which will subscribe to this {@code Completable} and once that is completed then
+ * will subscribe to the {@code next} {@link SingleSource}. An error event from this {@code Completable} will be
+ * propagated to the downstream observer and will result in skipping the subscription to the next
+ * {@code SingleSource}.
*
*
*
@@ -1178,9 +1195,10 @@ public final Completable ambWith(@NonNull CompletableSource other) {
*
{@code andThen} does not operate by default on a particular {@link Scheduler}.
*
*
- * @param the value type of the next SingleSource
- * @param next the Single to subscribe after this Completable is completed, not null
- * @return Single that composes this Completable and next
+ * @param the value type of the next {@code SingleSource}
+ * @param next the {@code SingleSource} to subscribe after this {@code Completable} is completed, not {@code null}
+ * @return the new {@code Single} that composes this {@code Completable} and the next {@code SingleSource}
+ * @throws NullPointerException if {@code next} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1191,10 +1209,10 @@ public final Completable ambWith(@NonNull CompletableSource other) {
}
/**
- * Returns a {@link Maybe} which will subscribe to this Completable and once that is completed then
- * will subscribe to the {@code next} MaybeSource. An error event from this Completable will be
- * propagated to the downstream subscriber and will result in skipping the subscription of the
- * Maybe.
+ * Returns a {@link Maybe} which will subscribe to this {@code Completable} and once that is completed then
+ * will subscribe to the {@code next} {@link MaybeSource}. An error event from this {@code Completable} will be
+ * propagated to the downstream observer and will result in skipping the subscription to the next
+ * {@code MaybeSource}.
*
*
*
@@ -1202,9 +1220,10 @@ public final Completable ambWith(@NonNull CompletableSource other) {
*
{@code andThen} does not operate by default on a particular {@link Scheduler}.
*
*
- * @param the value type of the next MaybeSource
- * @param next the Maybe to subscribe after this Completable is completed, not null
- * @return Maybe that composes this Completable and next
+ * @param the value type of the next {@code MaybeSource}
+ * @param next the {@code MaybeSource} to subscribe after this {@code Completable} is completed, not {@code null}
+ * @return the new {@code Maybe} that composes this {@code Completable} and the next {@code MaybeSource}
+ * @throws NullPointerException if {@code next} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1215,8 +1234,10 @@ public final Completable ambWith(@NonNull CompletableSource other) {
}
/**
- * Returns a Completable that first runs this Completable
- * and then the other completable.
+ * Returns a {@code Completable} that first runs this {@code Completable}
+ * and then the other {@link CompletableSource}. An error event from this {@code Completable} will be
+ * propagated to the downstream observer and will result in skipping the subscription to the next
+ * {@code CompletableSource}.
*
*
*
@@ -1225,9 +1246,9 @@ public final Completable ambWith(@NonNull CompletableSource other) {
*
Scheduler:
*
{@code andThen} does not operate by default on a particular {@link Scheduler}.
*
- * @param next the other Completable, not null
- * @return the new Completable instance
- * @throws NullPointerException if other is null
+ * @param next the other {@code CompletableSource}, not {@code null}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code next} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1238,7 +1259,7 @@ public final Completable andThen(@NonNull CompletableSource next) {
}
/**
- * Subscribes to and awaits the termination of this Completable instance in a blocking manner and
+ * Subscribes to and awaits the termination of this {@code Completable} instance in a blocking manner and
* rethrows any exception emitted.
*
*
@@ -1250,7 +1271,7 @@ public final Completable andThen(@NonNull CompletableSource next) {
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
* {@link Error}s are rethrown as they are.
*
- * @throws RuntimeException wrapping an InterruptedException if the current thread is interrupted
+ * @throws RuntimeException wrapping an {@link InterruptedException} if the current thread is interrupted
*/
@SchedulerSupport(SchedulerSupport.NONE)
public final void blockingAwait() {
@@ -1260,7 +1281,7 @@ public final void blockingAwait() {
}
/**
- * Subscribes to and awaits the termination of this Completable instance in a blocking manner
+ * Subscribes to and awaits the termination of this {@code Completable} instance in a blocking manner
* with a specific timeout and rethrows any exception emitted within the timeout window.
*
*
@@ -1274,9 +1295,10 @@ public final void blockingAwait() {
*
* @param timeout the timeout value
* @param unit the timeout unit
- * @return true if the this Completable instance completed normally within the time limit,
- * false if the timeout elapsed before this Completable terminated.
- * @throws RuntimeException wrapping an InterruptedException if the current thread is interrupted
+ * @return {@code true} if the this {@code Completable} instance completed normally within the time limit,
+ * {@code false} if the timeout elapsed before this {@code Completable} terminated.
+ * @throws RuntimeException wrapping an {@link InterruptedException} if the current thread is interrupted
+ * @throws NullPointerException if {@code unit} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1288,8 +1310,8 @@ public final boolean blockingAwait(long timeout, @NonNull TimeUnit unit) {
}
/**
- * Subscribes to this Completable only once, when the first CompletableObserver
- * subscribes to the result Completable, caches its terminal event
+ * Subscribes to this {@code Completable} only once, when the first {@link CompletableObserver}
+ * subscribes to the result {@code Completable}, caches its terminal event
* and relays/replays it to observers.
*
*
@@ -1301,7 +1323,7 @@ public final boolean blockingAwait(long timeout, @NonNull TimeUnit unit) {
*
{@code cache} does not operate by default on a particular {@link Scheduler}.
*
*
History: 2.0.4 - experimental
- * @return the new Completable instance
+ * @return the new {@code Completable} instance
* @since 2.1
*/
@CheckReturnValue
@@ -1313,16 +1335,16 @@ public final Completable cache() {
/**
* Calls the given transformer function with this instance and returns the function's resulting
- * Completable.
+ * {@link CompletableSource} wrapped with {@link #wrap(CompletableSource)}.
*
*
*
*
Scheduler:
*
{@code compose} does not operate by default on a particular {@link Scheduler}.
*
- * @param transformer the transformer function, not null
- * @return the Completable returned by the function
- * @throws NullPointerException if transformer is null
+ * @param transformer the transformer function, not {@code null}
+ * @return a {@code Completable} wrapping the {@code CompletableSource} returned by the function via {@link #wrap(CompletableSource)}
+ * @throws NullPointerException if {@code transformer} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1332,16 +1354,20 @@ public final Completable compose(@NonNull CompletableTransformer transformer) {
}
/**
- * Concatenates this Completable with another Completable.
+ * Concatenates this {@code Completable} with another {@link CompletableSource}.
+ * An error event from this {@code Completable} will be
+ * propagated to the downstream observer and will result in skipping the subscription to the next
+ * {@code CompletableSource}.
*
*
*
*
Scheduler:
*
{@code concatWith} does not operate by default on a particular {@link Scheduler}.
*
- * @param other the other Completable, not null
- * @return the new Completable which subscribes to this and then the other Completable
- * @throws NullPointerException if other is null
+ * @param other the other {@code CompletableSource}, not {@code null}
+ * @return the new {@code Completable} which subscribes to this and then the other {@code CompletableSource}
+ * @throws NullPointerException if {@code other} is {@code null}
+ * @see #andThen(CompletableSource)
* @see #andThen(MaybeSource)
* @see #andThen(ObservableSource)
* @see #andThen(SingleSource)
@@ -1356,7 +1382,7 @@ public final Completable concatWith(@NonNull CompletableSource other) {
}
/**
- * Returns a Completable which delays the emission of the completion event by the given time.
+ * Returns a {@code Completable} which delays the emission of the completion event by the given time.
*
*
*
@@ -1365,8 +1391,8 @@ public final Completable concatWith(@NonNull CompletableSource other) {
*
* @param delay the delay time
* @param unit the delay unit
- * @return the new Completable instance
- * @throws NullPointerException if unit is null
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code unit} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
@@ -1376,19 +1402,19 @@ public final Completable delay(long delay, @NonNull TimeUnit unit) {
}
/**
- * Returns a Completable which delays the emission of the completion event by the given time while
- * running on the specified scheduler.
+ * Returns a {@code Completable} which delays the emission of the completion event by the given time while
+ * running on the specified {@link Scheduler}.
*
*
*
*
Scheduler:
- *
{@code delay} operates on the {@link Scheduler} you specify.
+ *
{@code delay} operates on the {@code Scheduler} you specify.
*
* @param delay the delay time
* @param unit the delay unit
- * @param scheduler the scheduler to run the delayed completion on
- * @return the new Completable instance
- * @throws NullPointerException if unit or scheduler is null
+ * @param scheduler the {@code Scheduler} to run the delayed completion on
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code unit} or {@code scheduler} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
@@ -1398,20 +1424,20 @@ public final Completable delay(long delay, @NonNull TimeUnit unit, @NonNull Sche
}
/**
- * Returns a Completable which delays the emission of the completion event, and optionally the error as well, by the given time while
- * running on the specified scheduler.
+ * Returns a {@code Completable} which delays the emission of the completion event, and optionally the error as well, by the given time while
+ * running on the specified {@link Scheduler}.
*
*
*
*
Scheduler:
- *
{@code delay} operates on the {@link Scheduler} you specify.
+ *
{@code delay} operates on the {@code Scheduler} you specify.
*
* @param delay the delay time
* @param unit the delay unit
- * @param scheduler the scheduler to run the delayed completion on
+ * @param scheduler the {@code Scheduler} to run the delayed completion on
* @param delayError delay the error emission as well?
- * @return the new Completable instance
- * @throws NullPointerException if unit or scheduler is null
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code unit} or {@code scheduler} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1423,7 +1449,7 @@ public final Completable delay(long delay, @NonNull TimeUnit unit, @NonNull Sche
}
/**
- * Returns a Completable that delays the subscription to the source CompletableSource by a given amount of time.
+ * Returns a {@code Completable} that delays the subscription to the upstream by a given amount of time.
*
*
*
@@ -1434,7 +1460,8 @@ public final Completable delay(long delay, @NonNull TimeUnit unit, @NonNull Sche
*
* @param delay the time to delay the subscription
* @param unit the time unit of {@code delay}
- * @return a Completable that delays the subscription to the source CompletableSource by the given amount
+ * @return a {@code Completable} that delays the subscription to the upstream by the given amount
+ * @throws NullPointerException if {@code unit} is {@code null}
* @since 3.0.0
* @see ReactiveX operators documentation: Delay
*/
@@ -1446,20 +1473,21 @@ public final Completable delaySubscription(long delay, @NonNull TimeUnit unit) {
}
/**
- * Returns a Completable that delays the subscription to the source CompletableSource by a given amount of time,
- * both waiting and subscribing on a given Scheduler.
+ * Returns a {@code Completable} that delays the subscription to the upstream by a given amount of time,
+ * both waiting and subscribing on a given {@link Scheduler}.
*
*
*
*
Scheduler:
- *
You specify which {@link Scheduler} this operator will use.
+ *
You specify which {@code Scheduler} this operator will use.
*
*
History: 2.2.3 - experimental
* @param delay the time to delay the subscription
* @param unit the time unit of {@code delay}
- * @param scheduler the Scheduler on which the waiting and subscription will happen
- * @return a Completable that delays the subscription to the source CompletableSource by a given
- * amount, waiting and subscribing on the given Scheduler
+ * @param scheduler the {@code Scheduler} on which the waiting and subscription will happen
+ * @return a {@code Completable} that delays the subscription to the upstream by a given
+ * amount of time, waiting and subscribing on the given {@code Scheduler}
+ * @throws NullPointerException if {@code unit} or {@code scheduler} is {@code null}
* @since 3.0.0
* @see ReactiveX operators documentation: Delay
*/
@@ -1471,16 +1499,16 @@ public final Completable delaySubscription(long delay, @NonNull TimeUnit unit, @
}
/**
- * Returns a Completable which calls the given onComplete callback if this Completable completes.
+ * Returns a {@code Completable} which calls the given {@code onComplete} {@link Action} if this {@code Completable} completes.
*
*
*
*
Scheduler:
*
{@code doOnComplete} does not operate by default on a particular {@link Scheduler}.
*
- * @param onComplete the callback to call when this emits an onComplete event
- * @return the new Completable instance
- * @throws NullPointerException if onComplete is null
+ * @param onComplete the {@code Action} to call when this emits an {@code onComplete} event
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code onComplete} is {@code null}
* @see #doFinally(Action)
*/
@CheckReturnValue
@@ -1493,17 +1521,17 @@ public final Completable doOnComplete(@NonNull Action onComplete) {
}
/**
- * Calls the shared {@code Action} if a CompletableObserver subscribed to the current
- * Completable disposes the common Disposable it received via onSubscribe.
+ * Calls the shared {@link Action} if a {@link CompletableObserver} subscribed to the current
+ * {@code Completable} disposes the common {@link Disposable} it received via {@code onSubscribe}.
*
*
*
*
Scheduler:
*
{@code doOnDispose} does not operate by default on a particular {@link Scheduler}.
*
- * @param onDispose the action to call when the child subscriber disposes the subscription
- * @return the new Completable instance
- * @throws NullPointerException if onDispose is null
+ * @param onDispose the {@code Action} to call when the downstream observer disposes the subscription
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code onDispose} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1515,16 +1543,16 @@ public final Completable doOnDispose(@NonNull Action onDispose) {
}
/**
- * Returns a Completable which calls the given onError callback if this Completable emits an error.
+ * Returns a {@code Completable} which calls the given {@code onError} {@link Consumer} if this {@code Completable} emits an error.
*
*
*
*
Scheduler:
*
{@code doOnError} does not operate by default on a particular {@link Scheduler}.
*
- * @param onError the error callback
- * @return the new Completable instance
- * @throws NullPointerException if onError is null
+ * @param onError the error {@code Consumer} receiving the upstream {@link Throwable} if the upstream signals it via {@code onError}
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code onError} is {@code null}
* @see #doFinally(Action)
*/
@CheckReturnValue
@@ -1537,17 +1565,18 @@ public final Completable doOnError(@NonNull Consumer super Throwable> onError)
}
/**
- * Returns a Completable which calls the given onEvent callback with the (throwable) for an onError
- * or (null) for an onComplete signal from this Completable before delivering said signal to the downstream.
+ * Returns a {@code Completable} which calls the given {@code onEvent} {@link Consumer} with the {@link Throwable} for an {@code onError}
+ * or {@code null} for an {@code onComplete} signal from this {@code Completable} before delivering the signal to the downstream.
*
*
*
*
Scheduler:
*
{@code doOnEvent} does not operate by default on a particular {@link Scheduler}.
*
- * @param onEvent the event callback
- * @return the new Completable instance
- * @throws NullPointerException if onEvent is null
+ * @param onEvent the event {@code Consumer} that receives {@code null} for upstream
+ * completion or a {@code Throwable} if the upstream signaled an error
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code onEvent} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1558,18 +1587,20 @@ public final Completable doOnEvent(@NonNull Consumer super Throwable> onEvent)
}
/**
- * Returns a Completable instance that calls the various callbacks on the specific
+ * Returns a {@code Completable} instance that calls the various callbacks upon the specific
* lifecycle events.
*
*
Scheduler:
*
{@code doOnLifecycle} does not operate by default on a particular {@link Scheduler}.
*
- * @param onSubscribe the consumer called when a CompletableSubscriber subscribes.
- * @param onError the consumer called when this emits an onError event
- * @param onComplete the runnable called just before when this Completable completes normally
- * @param onAfterTerminate the runnable called after this Completable completes normally
- * @param onDispose the runnable called when the child disposes the subscription
- * @return the new Completable instance
+ * @param onSubscribe the consumer called when a {@link CompletableObserver} subscribes.
+ * @param onError the consumer called when this emits an {@code onError} event
+ * @param onComplete the runnable called just before when the upstream {@code Completable} completes normally
+ * @param onAfterTerminate the runnable called after this {@code Completable} completes normally
+ * @param onDispose the {@link Runnable} called when the downstream disposes the subscription
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code onSubscribe}, {@code onError}, {@code onComplete}
+ * {@code onTerminate}, {@code onAfterTerminate} or {@code onDispose} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1591,17 +1622,17 @@ private Completable doOnLifecycle(
}
/**
- * Returns a Completable instance that calls the given onSubscribe callback with the disposable
- * that child subscribers receive on subscription.
+ * Returns a {@code Completable} instance that calls the given {@code onSubscribe} callback with the disposable
+ * that the downstream {@link CompletableObserver}s receive upon subscription.
*
*
*
*
Scheduler:
*
{@code doOnSubscribe} does not operate by default on a particular {@link Scheduler}.
*
- * @param onSubscribe the callback called when a child subscriber subscribes
- * @return the new Completable instance
- * @throws NullPointerException if onSubscribe is null
+ * @param onSubscribe the {@link Consumer} called when a downstream {@code CompletableObserver} subscribes
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code onSubscribe} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1613,7 +1644,7 @@ public final Completable doOnSubscribe(@NonNull Consumer super Disposable> onS
}
/**
- * Returns a Completable instance that calls the given onTerminate callback just before this Completable
+ * Returns a {@code Completable} instance that calls the given {@code onTerminate} {@link Action} just before this {@code Completable}
* completes normally or with an exception.
*
*
@@ -1621,8 +1652,8 @@ public final Completable doOnSubscribe(@NonNull Consumer super Disposable> onS
*
Scheduler:
*
{@code doOnTerminate} does not operate by default on a particular {@link Scheduler}.
*
- * @param onTerminate the callback to call just before this Completable terminates
- * @return the new Completable instance
+ * @param onTerminate the {@code Action} to call just before this {@code Completable} terminates
+ * @return the new {@code Completable} instance
* @see #doFinally(Action)
*/
@CheckReturnValue
@@ -1635,7 +1666,7 @@ public final Completable doOnTerminate(@NonNull Action onTerminate) {
}
/**
- * Returns a Completable instance that calls the given onTerminate callback after this Completable
+ * Returns a {@code Completable} instance that calls the given {@code onAfterTerminate} {@link Action} after this {@code Completable}
* completes normally or with an exception.
*
*
@@ -1643,8 +1674,8 @@ public final Completable doOnTerminate(@NonNull Action onTerminate) {
*
Scheduler:
*
{@code doAfterTerminate} does not operate by default on a particular {@link Scheduler}.
*
- * @param onAfterTerminate the callback to call after this Completable terminates
- * @return the new Completable instance
+ * @param onAfterTerminate the {@code Action} to call after this {@code Completable} terminates
+ * @return the new {@code Completable} instance
* @see #doFinally(Action)
*/
@CheckReturnValue
@@ -1660,7 +1691,7 @@ public final Completable doAfterTerminate(@NonNull Action onAfterTerminate) {
Functions.EMPTY_ACTION);
}
/**
- * Calls the specified action after this Completable signals onError or onComplete or gets disposed by
+ * Calls the specified {@link Action} after this {@code Completable} signals {@code onError} or {@code onComplete} or gets disposed by
* the downstream.
*
*
@@ -1675,8 +1706,9 @@ public final Completable doAfterTerminate(@NonNull Action onAfterTerminate) {
*
{@code doFinally} does not operate by default on a particular {@link Scheduler}.
*
*
History: 2.0.1 - experimental
- * @param onFinally the action called when this Completable terminates or gets disposed
- * @return the new Completable instance
+ * @param onFinally the {@code Action} called when this {@code Completable} terminates or gets disposed
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code onFinally} is {@code null}
* @since 2.1
*/
@CheckReturnValue
@@ -1798,22 +1830,23 @@ public final Completable doFinally(@NonNull Action onFinally) {
* class and creating a {@link CompletableTransformer} with it is recommended.
*
* Note also that it is not possible to stop the subscription phase in {@code lift()} as the {@code apply()} method
- * requires a non-null {@code CompletableObserver} instance to be returned, which is then unconditionally subscribed to
+ * requires a non-{@code null} {@code CompletableObserver} instance to be returned, which is then unconditionally subscribed to
* the upstream {@code Completable}. For example, if the operator decided there is no reason to subscribe to the
* upstream source because of some optimization possibility or a failure to prepare the operator, it still has to
- * return a {@code CompletableObserver} that should immediately dispose the upstream's {@code Disposable} in its
+ * return a {@code CompletableObserver} that should immediately dispose the upstream's {@link Disposable} in its
* {@code onSubscribe} method. Again, using a {@code CompletableTransformer} and extending the {@code Completable} is
* a better option as {@link #subscribeActual} can decide to not subscribe to its upstream after all.
*
*
Scheduler:
*
{@code lift} does not operate by default on a particular {@link Scheduler}, however, the
- * {@link CompletableOperator} may use a {@code Scheduler} to support its own asynchronous behavior.
+ * {@code CompletableOperator} may use a {@code Scheduler} to support its own asynchronous behavior.
*
*
- * @param onLift the {@link CompletableOperator} that receives the downstream's {@code CompletableObserver} and should return
+ * @param onLift the {@code CompletableOperator} that receives the downstream's {@code CompletableObserver} and should return
* a {@code CompletableObserver} with custom behavior to be used as the consumer for the current
* {@code Completable}.
- * @return the new Completable instance
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code onLift} is {@code null}
* @see RxJava wiki: Writing operators
* @see #compose(CompletableTransformer)
*/
@@ -1826,7 +1859,7 @@ public final Completable lift(@NonNull CompletableOperator onLift) {
}
/**
- * Maps the signal types of this Completable into a {@link Notification} of the same kind
+ * Maps the signal types of this {@code Completable} into a {@link Notification} of the same kind
* and emits it as a single success value to downstream.
*
*
@@ -1835,8 +1868,8 @@ public final Completable lift(@NonNull CompletableOperator onLift) {
*
{@code materialize} does not operate by default on a particular {@link Scheduler}.
*
*
History: 2.2.4 - experimental
- * @param the intended target element type of the notification
- * @return the new Single instance
+ * @param the intended target element type of the {@code Notification}
+ * @return the new {@link Single} instance
* @since 3.0.0
* @see Single#dematerialize(Function)
*/
@@ -1848,7 +1881,7 @@ public final Single> materialize() {
}
/**
- * Returns a Completable which subscribes to this and the other Completable and completes
+ * Returns a {@code Completable} which subscribes to this and the other {@link CompletableSource} and completes
* when both of them complete or one emits an error.
*
*
@@ -1856,9 +1889,9 @@ public final Single> materialize() {
*
Scheduler:
*
{@code mergeWith} does not operate by default on a particular {@link Scheduler}.
*
- * @param other the other Completable instance
- * @return the new Completable instance
- * @throws NullPointerException if other is null
+ * @param other the other {@code CompletableSource} instance
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code other} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1869,16 +1902,16 @@ public final Completable mergeWith(@NonNull CompletableSource other) {
}
/**
- * Returns a Completable which emits the terminal events from the thread of the specified scheduler.
+ * Returns a {@code Completable} which emits the terminal events from the thread of the specified {@link Scheduler}.
*
*
*
*
Scheduler:
- *
{@code observeOn} operates on a {@link Scheduler} you specify.
+ *
{@code observeOn} operates on a {@code Scheduler} you specify.
*
- * @param scheduler the scheduler to emit terminal events on
- * @return the new Completable instance
- * @throws NullPointerException if scheduler is null
+ * @param scheduler the {@code Scheduler} to emit terminal events on
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code scheduler} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1889,15 +1922,15 @@ public final Completable observeOn(@NonNull Scheduler scheduler) {
}
/**
- * Returns a Completable instance that if this Completable emits an error, it will emit an onComplete
- * and swallow the throwable.
+ * Returns a {@code Completable} instance that if this {@code Completable} emits an error, it will emit an {@code onComplete}
+ * and swallow the upstream {@link Throwable}.
*
*
*
*
Scheduler:
*
{@code onErrorComplete} does not operate by default on a particular {@link Scheduler}.
*
- * @return the new Completable instance
+ * @return the new {@code Completable} instance
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1907,17 +1940,18 @@ public final Completable onErrorComplete() {
}
/**
- * Returns a Completable instance that if this Completable emits an error and the predicate returns
- * true, it will emit an onComplete and swallow the throwable.
+ * Returns a {@code Completable} instance that if this {@code Completable} emits an error and the {@link Predicate} returns
+ * {@code true}, it will emit an {@code onComplete} and swallow the {@link Throwable}.
*
*
*
*
Scheduler:
*
{@code onErrorComplete} does not operate by default on a particular {@link Scheduler}.
*
- * @param predicate the predicate to call when an Throwable is emitted which should return true
- * if the Throwable should be swallowed and replaced with an onComplete.
- * @return the new Completable instance
+ * @param predicate the {@code Predicate} to call when a {@code Throwable} is emitted which should return {@code true}
+ * if the {@code Throwable} should be swallowed and replaced with an {@code onComplete}.
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code predicate} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1929,8 +1963,8 @@ public final Completable onErrorComplete(@NonNull Predicate super Throwable> p
}
/**
- * Returns a Completable instance that when encounters an error from this Completable, calls the
- * specified mapper function that returns another Completable instance for it and resumes the
+ * Returns a {@code Completable} instance that when encounters an error from this {@code Completable}, calls the
+ * specified {@code mapper} {@link Function} that returns a {@link CompletableSource} instance for it and resumes the
* execution with it.
*
*
@@ -1938,9 +1972,10 @@ public final Completable onErrorComplete(@NonNull Predicate super Throwable> p
*
Scheduler:
*
{@code onErrorResumeNext} does not operate by default on a particular {@link Scheduler}.
*
- * @param errorMapper the mapper function that takes the error and should return a Completable as
+ * @param errorMapper the {@code mapper} {@code Function} that takes the error and should return a {@code CompletableSource} as
* continuation.
- * @return the new Completable instance
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code errorMapper} is {@code null}
*/
@CheckReturnValue
@NonNull
@@ -1951,8 +1986,8 @@ public final Completable onErrorResumeNext(@NonNull Function super Throwable,
}
/**
- * Nulls out references to the upstream producer and downstream CompletableObserver if
- * the sequence is terminated or downstream calls dispose().
+ * Nulls out references to the upstream producer and downstream {@link CompletableObserver} if
+ * the sequence is terminated or downstream calls {@code dispose()}.
*
*
*
@@ -1960,8 +1995,8 @@ public final Completable onErrorResumeNext(@NonNull Function super Throwable,
*
{@code onTerminateDetach} does not operate by default on a particular {@link Scheduler}.
*
*
History: 2.1.5 - experimental
- * @return a Completable which nulls out references to the upstream producer and downstream CompletableObserver if
- * the sequence is terminated or downstream calls dispose()
+ * @return a {@code Completable} which {@code null}s out references to the upstream producer and downstream {@code CompletableObserver} if
+ * the sequence is terminated or downstream calls {@code dispose()}
* @since 2.2
*/
@CheckReturnValue
@@ -1972,14 +2007,14 @@ public final Completable onTerminateDetach() {
}
/**
- * Returns a Completable that repeatedly subscribes to this Completable until disposed.
+ * Returns a {@code Completable} that repeatedly subscribes to this {@code Completable} until disposed.
*
*
*
*
Scheduler:
*
{@code repeat} does not operate by default on a particular {@link Scheduler}.
*
- * @return the new Completable instance
+ * @return the new {@code Completable} instance
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1989,15 +2024,15 @@ public final Completable repeat() {
}
/**
- * Returns a Completable that subscribes repeatedly at most the given times to this Completable.
+ * Returns a {@code Completable} that subscribes repeatedly at most the given number of times to this {@code Completable}.
*
*
*
*
Scheduler:
*
{@code repeat} does not operate by default on a particular {@link Scheduler}.
*
- * @param times the number of times the resubscription should happen
- * @return the new Completable instance
+ * @param times the number of times the re-subscription should happen
+ * @return the new {@code Completable} instance
* @throws IllegalArgumentException if times is less than zero
*/
@CheckReturnValue
@@ -2008,17 +2043,17 @@ public final Completable repeat(long times) {
}
/**
- * Returns a Completable that repeatedly subscribes to this Completable so long as the given
- * stop supplier returns false.
+ * Returns a {@code Completable} that repeatedly subscribes to this {@code Completable} so long as the given
+ * stop {@link BooleanSupplier} returns {@code false}.
*
*
*
*
Scheduler:
*
{@code repeatUntil} does not operate by default on a particular {@link Scheduler}.
*
- * @param stop the supplier that should return true to stop resubscribing.
- * @return the new Completable instance
- * @throws NullPointerException if stop is null
+ * @param stop the {@code BooleanSupplier} that should return {@code true} to stop resubscribing.
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code stop} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -2028,19 +2063,19 @@ public final Completable repeatUntil(@NonNull BooleanSupplier stop) {
}
/**
- * Returns a Completable instance that repeats when the Publisher returned by the handler
- * emits an item or completes when this Publisher emits a completed event.
+ * Returns a {@code Completable} instance that repeats when the {@link Publisher} returned by the handler {@link Function}
+ * emits an item or completes when this {@code Publisher} emits an {@code onComplete} event.
*
*
*
*
Scheduler:
*
{@code repeatWhen} does not operate by default on a particular {@link Scheduler}.
*
- * @param handler the function that transforms the stream of values indicating the completion of
- * this Completable and returns a Publisher that emits items for repeating or completes to indicate the
+ * @param handler the {@code Function} that transforms the stream of values indicating the completion of
+ * this {@code Completable} and returns a {@code Publisher} that emits items for repeating or completes to indicate the
* repetition should stop
- * @return the new Completable instance
- * @throws NullPointerException if stop is null
+ * @return the new {@code Completable} instance
+ * @throws NullPointerException if {@code stop} is {@code null}
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@@ -2050,14 +2085,14 @@ public final Completable repeatWhen(@NonNull Function super Flowable