diff --git a/src/main/java/io/reactivex/rxjava3/core/Single.java b/src/main/java/io/reactivex/rxjava3/core/Single.java index 3cb676c9cf..50b98a466f 100644 --- a/src/main/java/io/reactivex/rxjava3/core/Single.java +++ b/src/main/java/io/reactivex/rxjava3/core/Single.java @@ -400,6 +400,8 @@ public static Flowable concatArray(SingleSource... sources) /** * Concatenates a sequence of SingleSource eagerly into a single stream of values. *

+ * + *

* Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the * source SingleSources. The operator buffers the value emitted by these SingleSources and then drains them * in order, each one after the previous one completes. @@ -1154,6 +1156,8 @@ public static Flowable merge( /** * Merges an Iterable sequence of SingleSource instances into a single Flowable sequence, * running all SingleSources at once and delaying any error(s) until all sources succeed or fail. + *

+ * *

*
Backpressure:
*
The returned {@code Flowable} honors the backpressure of the downstream consumer.
@@ -1178,6 +1182,8 @@ public static Flowable mergeDelayError(Iterable + * *
*
Backpressure:
*
The returned {@code Flowable} honors the backpressure of the downstream consumer.
@@ -1205,7 +1211,7 @@ public static Flowable mergeDelayError(Publisher - * + * *

* You can combine items emitted by multiple Singles so that they appear as a single Flowable, by * using the {@code mergeDelayError} method. @@ -1243,7 +1249,7 @@ public static Flowable mergeDelayError( * Flattens three Singles into a single Flowable, without any transformation, delaying * any error(s) until all sources succeed or fail. *

- * + * *

* You can combine items emitted by multiple Singles so that they appear as a single Flowable, by using * the {@code mergeDelayError} method. @@ -1285,7 +1291,7 @@ public static Flowable mergeDelayError( * Flattens four Singles into a single Flowable, without any transformation, delaying * any error(s) until all sources succeed or fail. *

- * + * *

* You can combine items emitted by multiple Singles so that they appear as a single Flowable, by using * the {@code mergeDelayError} method. @@ -1416,6 +1422,8 @@ public static Single equals(final SingleSource first, /** * Advanced use only: creates a Single instance without * any safeguards by using a callback that is called with a SingleObserver. + *

+ * *

*
Scheduler:
*
{@code unsafeCreate} does not operate by default on a particular {@link Scheduler}.
@@ -1442,6 +1450,8 @@ public static Single unsafeCreate(SingleSource onSubscribe) { /** * Allows using and disposing a resource while running a SingleSource instance generated from * that resource (similar to a try-with-resources). + *

+ * *

*
Scheduler:
*
{@code using} does not operate by default on a particular {@link Scheduler}.
@@ -1469,6 +1479,8 @@ public static Single using(Supplier resourceSupplier, /** * Allows using and disposing a resource while running a SingleSource instance generated from * that resource (similar to a try-with-resources). + *

+ * *

*
Scheduler:
*
{@code using} does not operate by default on a particular {@link Scheduler}.
@@ -1508,6 +1520,8 @@ public static Single using( /** * Wraps a SingleSource instance into a new Single instance if not already a Single * instance. + *

+ * *

*
Scheduler:
*
{@code wrap} does not operate by default on a particular {@link Scheduler}.
@@ -2092,6 +2106,8 @@ public final Single compose(SingleTransformer tra /** * Stores the success value or exception from the current Single and replays it to late SingleObservers. *

+ * + *

* The returned Single subscribes to the current Single when the first SingleObserver subscribes. *

*
Scheduler:
@@ -2110,6 +2126,8 @@ public final Single cache() { /** * Casts the success value of the current Single into the target type or signals a * ClassCastException if not compatible. + *

+ * *

*
Scheduler:
*
{@code cast} does not operate by default on a particular {@link Scheduler}.
@@ -2250,6 +2268,8 @@ public final Single delay(final long time, final TimeUnit unit, final Schedul /** * Delays the actual subscription to the current Single until the given other CompletableSource * completes. + *

+ * *

If the delaying source signals an error, that error is re-emitted and no subscription * to the current Single happens. *

@@ -2272,6 +2292,8 @@ public final Single delaySubscription(CompletableSource other) { /** * Delays the actual subscription to the current Single until the given other SingleSource * signals success. + *

+ * *

If the delaying source signals an error, that error is re-emitted and no subscription * to the current Single happens. *

@@ -2295,6 +2317,8 @@ public final Single delaySubscription(SingleSource other) { /** * Delays the actual subscription to the current Single until the given other ObservableSource * signals its first value or completes. + *

+ * *

If the delaying source signals an error, that error is re-emitted and no subscription * to the current Single happens. *

@@ -2318,6 +2342,8 @@ public final Single delaySubscription(ObservableSource other) { /** * Delays the actual subscription to the current Single until the given other Publisher * signals its first value or completes. + *

+ * *

If the delaying source signals an error, that error is re-emitted and no subscription * to the current Single happens. *

The other source is consumed in an unbounded manner (requesting Long.MAX_VALUE from it). @@ -2345,6 +2371,8 @@ public final Single delaySubscription(Publisher other) { /** * Delays the actual subscription to the current Single until the given time delay elapsed. + *

+ * *

*
Scheduler:
*
{@code delaySubscription} does by default subscribe to the current Single @@ -2363,6 +2391,8 @@ public final Single delaySubscription(long time, TimeUnit unit) { /** * Delays the actual subscription to the current Single until the given time delay elapsed. + *

+ * *

*
Scheduler:
*
{@code delaySubscription} does by default subscribe to the current Single @@ -2385,6 +2415,8 @@ public final Single delaySubscription(long time, TimeUnit unit, Scheduler sch * {@code onSuccess}, {@code onError} or {@code onComplete} signals as a * {@link Maybe} source. *

+ * + *

* The intended use of the {@code selector} function is to perform a * type-safe identity mapping (see example) on a source that is already of type * {@code Notification}. The Java language doesn't allow @@ -2572,6 +2604,8 @@ public final Single doOnSuccess(final Consumer onSuccess) { /** * Calls the shared consumer with the error sent via onError or the value * via onSuccess for each SingleObserver that subscribes to the current Single. + *

+ * *

*
Scheduler:
*
{@code doOnEvent} does not operate by default on a particular {@link Scheduler}.
@@ -2842,6 +2876,8 @@ public final Completable flatMapCompletable(final Function + * *
*
Scheduler:
*
{@code blockingGet} does not operate by default on a particular {@link Scheduler}.
@@ -2869,6 +2905,8 @@ public final T blockingGet() { * and providing a new {@code SingleObserver}, containing the custom operator's intended business logic, that will be * used in the subscription process going further upstream. *

+ * + *

* Generally, such a new {@code SingleObserver} will wrap the downstream's {@code SingleObserver} and forwards the * {@code onSuccess} and {@code onError} events from the upstream directly or according to the * emission pattern the custom operator's business logic requires. In addition, such operator can intercept the @@ -3056,6 +3094,10 @@ public final Single> materialize() { /** * Signals true if the current Single signals a success value that is Object-equals with the value * provided. + *

+ * + *

+ * *

*
Scheduler:
*
{@code contains} does not operate by default on a particular {@link Scheduler}.
@@ -3073,6 +3115,8 @@ public final Single contains(Object value) { /** * Signals true if the current Single signals a success value that is equal with * the value provided by calling a bi-predicate. + *

+ * *

*
Scheduler:
*
{@code contains} does not operate by default on a particular {@link Scheduler}.
@@ -3203,7 +3247,7 @@ public final Single onErrorReturnItem(final T value) { * Instructs a Single to pass control to another Single rather than invoking * {@link SingleObserver#onError(Throwable)} if it encounters an error. *

- * + * *

* By default, when a Single encounters an error that prevents it from emitting the expected item to * its {@link SingleObserver}, the Single invokes its SingleObserver's {@code onError} method, and then quits @@ -3274,6 +3318,8 @@ public final Single onErrorResumeNext( /** * Nulls out references to the upstream producer and downstream SingleObserver if * the sequence is terminated or downstream calls dispose(). + *

+ * *

*
Scheduler:
*
{@code onTerminateDetach} does not operate by default on a particular {@link Scheduler}.
@@ -3381,6 +3427,8 @@ public final Flowable repeatUntil(BooleanSupplier stop) { /** * Repeatedly re-subscribes to the current Single indefinitely if it fails with an onError. + *

+ * *

*
Scheduler:
*
{@code retry} does not operate by default on a particular {@link Scheduler}.
@@ -3397,6 +3445,8 @@ public final Single retry() { /** * Repeatedly re-subscribe at most the specified times to the current Single * if it fails with an onError. + *

+ * *

*
Scheduler:
*
{@code retry} does not operate by default on a particular {@link Scheduler}.
@@ -3414,6 +3464,8 @@ public final Single retry(long times) { /** * Re-subscribe to the current Single if the given predicate returns true when the Single fails * with an onError. + *

+ * *

*
Scheduler:
*
{@code retry} does not operate by default on a particular {@link Scheduler}.
@@ -3432,6 +3484,8 @@ public final Single retry(BiPredicate pre /** * Repeatedly re-subscribe at most times or until the predicate returns false, whichever happens first * if it fails with an onError. + *

+ * *

*
Scheduler:
*
{@code retry} does not operate by default on a particular {@link Scheduler}.
@@ -3452,6 +3506,8 @@ public final Single retry(long times, Predicate predicate) /** * Re-subscribe to the current Single if the given predicate returns true when the Single fails * with an onError. + *

+ * *

*
Scheduler:
*
{@code retry} does not operate by default on a particular {@link Scheduler}.
@@ -3471,6 +3527,8 @@ public final Single retry(Predicate predicate) { * Re-subscribes to the current Single if and when the Publisher returned by the handler * function signals a value. *

+ * + *

* If the Publisher signals an {@code onComplete}, the resulting {@code Single} will signal a {@link NoSuchElementException}. *

* Note that the inner {@code Publisher} returned by the handler function should signal @@ -3517,6 +3575,8 @@ public final Single retryWhen(Function, ? extends /** * Subscribes to a Single but ignore its emission or notification. *

+ * + *

* If the Single emits an error, it is wrapped into an * {@link io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException OnErrorNotImplementedException} * and routed to the RxJavaPlugins.onError handler. @@ -3536,6 +3596,8 @@ public final Disposable subscribe() { /** * Subscribes to a Single and provides a composite callback to handle the item it emits * or any error notification it issues. + *

+ * *

*
Scheduler:
*
{@code subscribe} does not operate by default on a particular {@link Scheduler}.
@@ -3563,6 +3625,8 @@ public final Disposable subscribe(final BiConsumer /** * Subscribes to a Single and provides a callback to handle the item it emits. *

+ * + *

* If the Single emits an error, it is wrapped into an * {@link io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException OnErrorNotImplementedException} * and routed to the RxJavaPlugins.onError handler. @@ -3587,6 +3651,8 @@ public final Disposable subscribe(Consumer onSuccess) { /** * Subscribes to a Single and provides callbacks to handle the item it emits or any error notification it * issues. + *

+ * *

*
Scheduler:
*
{@code subscribe} does not operate by default on a particular {@link Scheduler}.
@@ -3648,6 +3714,8 @@ public final void subscribe(SingleObserver observer) { /** * Subscribes a given SingleObserver (subclass) to this Single and returns the given * SingleObserver as is. + *

+ * *

Usage example: *


      * Single<Integer> source = Single.just(1);
@@ -3705,7 +3773,7 @@ public final Single subscribeOn(final Scheduler scheduler) {
      * termination of {@code other}, this will emit a {@link CancellationException} rather than go to
      * {@link SingleObserver#onSuccess(Object)}.
      * 

- * + * *

*
Scheduler:
*
{@code takeUntil} does not operate by default on a particular {@link Scheduler}.
@@ -3730,7 +3798,7 @@ public final Single takeUntil(final CompletableSource other) { * emission of an item from {@code other}, this will emit a {@link CancellationException} rather than go to * {@link SingleObserver#onSuccess(Object)}. *

- * + * *

*
Backpressure:
*
The {@code other} publisher is consumed in an unbounded fashion but will be @@ -3762,7 +3830,7 @@ public final Single takeUntil(final Publisher other) { * emission of an item from {@code other}, this will emit a {@link CancellationException} rather than go to * {@link SingleObserver#onSuccess(Object)}. *

- * + * *

*
Scheduler:
*
{@code takeUntil} does not operate by default on a particular {@link Scheduler}.
@@ -3786,6 +3854,8 @@ public final Single takeUntil(final SingleSource other) { /** * Signals a TimeoutException if the current Single doesn't signal a success value within the * specified timeout window. + *

+ * *

*
Scheduler:
*
{@code timeout} signals the TimeoutException on the {@code computation} {@link Scheduler}.
@@ -3804,6 +3874,8 @@ public final Single timeout(long timeout, TimeUnit unit) { /** * Signals a TimeoutException if the current Single doesn't signal a success value within the * specified timeout window. + *

+ * *

*
Scheduler:
*
{@code timeout} signals the TimeoutException on the {@link Scheduler} you specify.
@@ -3824,6 +3896,8 @@ public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler) /** * Runs the current Single and if it doesn't signal within the specified timeout window, it is * disposed and the other SingleSource subscribed to. + *

+ * *

*
Scheduler:
*
{@code timeout} subscribes to the other SingleSource on the {@link Scheduler} you specify.
@@ -3846,6 +3920,8 @@ public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler, /** * Runs the current Single and if it doesn't signal within the specified timeout window, it is * disposed and the other SingleSource subscribed to. + *

+ * *

*
Scheduler:
*
{@code timeout} subscribes to the other SingleSource on @@ -4004,6 +4080,8 @@ public final Observable toObservable() { /** * Returns a Single which makes sure when a SingleObserver disposes the Disposable, * that call is propagated up on the specified scheduler. + *

+ * *

*
Scheduler:
*
{@code unsubscribeOn} calls dispose() of the upstream on the {@link Scheduler} you specify.
@@ -4057,6 +4135,8 @@ public final Single zipWith(SingleSource other, BiFunction + * *
*
Scheduler:
*
{@code test} does not operate by default on a particular {@link Scheduler}.
@@ -4074,6 +4154,8 @@ public final TestObserver test() { /** * Creates a TestObserver optionally in cancelled state, then subscribes it to this Single. + *

+ * *

*
Scheduler:
*
{@code test} does not operate by default on a particular {@link Scheduler}.