From ade5ac3d6f50e4eec2210f0ad83e7b070794171a Mon Sep 17 00:00:00 2001 From: Niklas Baudy Date: Thu, 24 Nov 2016 10:14:24 +0100 Subject: [PATCH 1/3] Add CheckReturnValue method --- src/main/java/io/reactivex/Completable.java | 3 ++ src/main/java/io/reactivex/Flowable.java | 4 +++ src/main/java/io/reactivex/Maybe.java | 3 ++ src/main/java/io/reactivex/Observable.java | 3 ++ src/main/java/io/reactivex/Single.java | 3 ++ .../annotations/CheckReturnValue.java | 33 +++++++++++++++++++ 6 files changed, 49 insertions(+) create mode 100644 src/main/java/io/reactivex/annotations/CheckReturnValue.java diff --git a/src/main/java/io/reactivex/Completable.java b/src/main/java/io/reactivex/Completable.java index 23a3839cb7..b58aa96b34 100644 --- a/src/main/java/io/reactivex/Completable.java +++ b/src/main/java/io/reactivex/Completable.java @@ -1555,6 +1555,7 @@ public final void subscribe(CompletableObserver s) { * @throws NullPointerException if {@code observer} is null * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final E subscribeWith(E observer) { subscribe(observer); @@ -1871,6 +1872,7 @@ public final Completable unsubscribeOn(final Scheduler scheduler) { * @return the new TestObserver instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final TestObserver test() { TestObserver ts = new TestObserver(); @@ -1889,6 +1891,7 @@ public final TestObserver test() { * @return the new TestObserver instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final TestObserver test(boolean cancelled) { TestObserver ts = new TestObserver(); diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index 92ad7ae1d6..1c70acc1ff 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -12266,6 +12266,7 @@ public final void subscribe(Subscriber s) { * @throws NullPointerException if {@code subscriber} is null * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final > E subscribeWith(E subscriber) { @@ -15303,6 +15304,7 @@ public final Flowable zipWith(Publisher other, * @return the new TestSubscriber instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final TestSubscriber test() { // NoPMD @@ -15324,6 +15326,7 @@ public final TestSubscriber test() { // NoPMD * @return the new TestSubscriber instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final TestSubscriber test(long initialRequest) { // NoPMD @@ -15347,6 +15350,7 @@ public final TestSubscriber test(long initialRequest) { // NoPMD * @return the new TestSubscriber instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final TestSubscriber test(long initialRequest, boolean cancel) { // NoPMD diff --git a/src/main/java/io/reactivex/Maybe.java b/src/main/java/io/reactivex/Maybe.java index 9804233003..99852baff6 100644 --- a/src/main/java/io/reactivex/Maybe.java +++ b/src/main/java/io/reactivex/Maybe.java @@ -3625,6 +3625,7 @@ public final Maybe subscribeOn(Scheduler scheduler) { * @return the input {@code subscriber} * @throws NullPointerException if {@code subscriber} is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > E subscribeWith(E observer) { subscribe(observer); @@ -3954,6 +3955,7 @@ public final Maybe zipWith(MaybeSource other, BiFunction< * * @return the new TestObserver instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final TestObserver test() { TestObserver ts = new TestObserver(); @@ -3971,6 +3973,7 @@ public final TestObserver test() { * Maybe. * @return the new TestObserver instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final TestObserver test(boolean cancelled) { TestObserver ts = new TestObserver(); diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index 592bffc6c4..13138e6a35 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -10224,6 +10224,7 @@ public final void subscribe(Observer observer) { * @throws NullPointerException if {@code observer} is null * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > E subscribeWith(E observer) { subscribe(observer); @@ -12872,6 +12873,7 @@ public final Observable zipWith(ObservableSource other, * @return the new TestObserver instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final TestObserver test() { // NoPMD TestObserver ts = new TestObserver(); @@ -12891,6 +12893,7 @@ public final TestObserver test() { // NoPMD * @return the new TestObserver instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final TestObserver test(boolean dispose) { // NoPMD TestObserver ts = new TestObserver(); diff --git a/src/main/java/io/reactivex/Single.java b/src/main/java/io/reactivex/Single.java index 0d41a7d8f4..2083171cb1 100644 --- a/src/main/java/io/reactivex/Single.java +++ b/src/main/java/io/reactivex/Single.java @@ -2596,6 +2596,7 @@ public final void subscribe(SingleObserver subscriber) { * @throws NullPointerException if {@code observer} is null * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > E subscribeWith(E observer) { subscribe(observer); @@ -2946,6 +2947,7 @@ public final Single zipWith(SingleSource other, BiFunction test() { TestObserver ts = new TestObserver(); @@ -2964,6 +2966,7 @@ public final TestObserver test() { * @return the new TestObserver instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final TestObserver test(boolean cancelled) { TestObserver ts = new TestObserver(); diff --git a/src/main/java/io/reactivex/annotations/CheckReturnValue.java b/src/main/java/io/reactivex/annotations/CheckReturnValue.java new file mode 100644 index 0000000000..0af6b90a78 --- /dev/null +++ b/src/main/java/io/reactivex/annotations/CheckReturnValue.java @@ -0,0 +1,33 @@ +/** + * Copyright 2016 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is + * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See + * the License for the specific language governing permissions and limitations under the License. + */ + +package io.reactivex.annotations; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Marks methods whose return values should be checked. + * + * @since 2.0.2 - experimental + */ +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Target(ElementType.METHOD) +@Experimental +public @interface CheckReturnValue { + +} From ddc88e5e2d6a62e5d2e5071cac1bb86a2dc16264 Mon Sep 17 00:00:00 2001 From: Niklas Baudy Date: Thu, 24 Nov 2016 15:32:43 +0100 Subject: [PATCH 2/3] Add annotation to more methods --- src/main/java/io/reactivex/Completable.java | 90 ++++ src/main/java/io/reactivex/Flowable.java | 438 +++++++++++++++++- src/main/java/io/reactivex/Maybe.java | 153 +++++- src/main/java/io/reactivex/Observable.java | 423 ++++++++++++++++- src/main/java/io/reactivex/Single.java | 113 +++++ .../annotations/CheckReturnValue.java | 2 +- .../io/reactivex/BaseTypeAnnotations.java | 73 ++- 7 files changed, 1283 insertions(+), 9 deletions(-) diff --git a/src/main/java/io/reactivex/Completable.java b/src/main/java/io/reactivex/Completable.java index b58aa96b34..e028649a3d 100644 --- a/src/main/java/io/reactivex/Completable.java +++ b/src/main/java/io/reactivex/Completable.java @@ -50,6 +50,7 @@ public abstract class Completable implements CompletableSource { * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable ambArray(final CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -74,6 +75,7 @@ public static Completable ambArray(final CompletableSource... sources) { * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable amb(final Iterable sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -89,6 +91,7 @@ public static Completable amb(final Iterable source * * @return a Completable instance that completes immediately */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable complete() { return RxJavaPlugins.onAssembly(CompletableEmpty.INSTANCE); @@ -104,6 +107,7 @@ public static Completable complete() { * @return the Completable instance which completes only when all sources complete * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable concatArray(CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -126,6 +130,7 @@ public static Completable concatArray(CompletableSource... sources) { * @return the Completable instance which completes only when all sources complete * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable concat(Iterable sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -146,6 +151,7 @@ public static Completable concat(Iterable sources) * @return the Completable instance which completes only when all sources complete * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public static Completable concat(Publisher sources) { @@ -166,6 +172,7 @@ public static Completable concat(Publisher sources) * @return the Completable instance which completes only when all sources complete * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public static Completable concat(Publisher sources, int prefetch) { @@ -208,6 +215,7 @@ public static Completable concat(Publisher sources, * @see CompletableOnSubscribe * @see Cancellable */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable create(CompletableOnSubscribe source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -227,6 +235,7 @@ public static Completable create(CompletableOnSubscribe source) { * @return the created Completable instance * @throws NullPointerException if source is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable unsafeCreate(CompletableSource source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -245,6 +254,7 @@ public static Completable unsafeCreate(CompletableSource source) { * @param completableSupplier the supplier that returns the Completable that will be subscribed to. * @return the Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable defer(final Callable completableSupplier) { ObjectHelper.requireNonNull(completableSupplier, "completableSupplier"); @@ -265,6 +275,7 @@ public static Completable defer(final Callable comp * @return the new Completable instance * @throws NullPointerException if errorSupplier is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable error(final Callable errorSupplier) { ObjectHelper.requireNonNull(errorSupplier, "errorSupplier is null"); @@ -281,6 +292,7 @@ public static Completable error(final Callable errorSupplie * @return the new Completable instance * @throws NullPointerException if error is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable error(final Throwable error) { ObjectHelper.requireNonNull(error, "error is null"); @@ -299,6 +311,7 @@ public static Completable error(final Throwable error) { * @return the new Completable instance * @throws NullPointerException if run is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromAction(final Action run) { ObjectHelper.requireNonNull(run, "run is null"); @@ -315,6 +328,7 @@ public static Completable fromAction(final Action run) { * @param callable the callable instance to execute for each subscriber * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromCallable(final Callable callable) { ObjectHelper.requireNonNull(callable, "callable is null"); @@ -332,6 +346,7 @@ public static Completable fromCallable(final Callable callable) { * @param future the future to react to * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromFuture(final Future future) { ObjectHelper.requireNonNull(future, "future is null"); @@ -349,6 +364,7 @@ public static Completable fromFuture(final Future future) { * @return the new Completable instance * @throws NullPointerException if run is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromRunnable(final Runnable run) { ObjectHelper.requireNonNull(run, "run is null"); @@ -367,6 +383,7 @@ public static Completable fromRunnable(final Runnable run) { * @return the new Completable instance * @throws NullPointerException if flowable is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromObservable(final ObservableSource observable) { ObjectHelper.requireNonNull(observable, "observable is null"); @@ -388,6 +405,7 @@ public static Completable fromObservable(final ObservableSource observabl * @return the new Completable instance * @throws NullPointerException if publisher is null */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromPublisher(final Publisher publisher) { @@ -407,6 +425,7 @@ public static Completable fromPublisher(final Publisher publisher) { * @return the new Completable instance * @throws NullPointerException if single is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromSingle(final SingleSource single) { ObjectHelper.requireNonNull(single, "single is null"); @@ -424,6 +443,7 @@ public static Completable fromSingle(final SingleSource single) { * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable mergeArray(CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -447,6 +467,7 @@ public static Completable mergeArray(CompletableSource... sources) { * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable merge(Iterable sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -467,6 +488,7 @@ public static Completable merge(Iterable sources) { * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) public static Completable merge(Publisher sources) { @@ -489,6 +511,7 @@ public static Completable merge(Publisher sources) * @throws NullPointerException if sources is null * @throws IllegalArgumentException if maxConcurrency is less than 1 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public static Completable merge(Publisher sources, int maxConcurrency) { @@ -513,6 +536,7 @@ public static Completable merge(Publisher sources, * @throws NullPointerException if sources is null * @throws IllegalArgumentException if maxConcurrency is less than 1 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) private static Completable merge0(Publisher sources, int maxConcurrency, boolean delayErrors) { @@ -533,6 +557,7 @@ private static Completable merge0(Publisher sources * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable mergeArrayDelayError(CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -551,6 +576,7 @@ public static Completable mergeArrayDelayError(CompletableSource... sources) { * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable mergeDelayError(Iterable sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -573,6 +599,7 @@ public static Completable mergeDelayError(Iterable * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) public static Completable mergeDelayError(Publisher sources) { @@ -596,6 +623,7 @@ public static Completable mergeDelayError(Publisher * @return the new Completable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public static Completable mergeDelayError(Publisher sources, int maxConcurrency) { @@ -610,6 +638,7 @@ public static Completable mergeDelayError(Publisher * * @return the singleton instance that never calls onError or onComplete */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable never() { return RxJavaPlugins.onAssembly(CompletableNever.INSTANCE); @@ -625,6 +654,7 @@ public static Completable never() { * @param unit the delay unit * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Completable timer(long delay, TimeUnit unit) { return timer(delay, unit, Schedulers.computation()); @@ -642,6 +672,7 @@ public static Completable timer(long delay, TimeUnit unit) { * @param scheduler the scheduler where to emit the complete event * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Completable timer(final long delay, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -675,6 +706,7 @@ private static NullPointerException toNpe(Throwable ex) { * @param disposer the consumer that disposes the resource created by the resource supplier * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable using(Callable resourceSupplier, Function completableFunction, @@ -702,6 +734,7 @@ public static Completable using(Callable resourceSupplier, * resource is disposed after the terminal event has been emitted * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable using( final Callable resourceSupplier, @@ -726,6 +759,7 @@ public static Completable using( * @return the source or its wrapper Completable * @throws NullPointerException if source is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable wrap(CompletableSource source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -746,6 +780,7 @@ public static Completable wrap(CompletableSource source) { * @return the new Completable instance * @throws NullPointerException if other is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable ambWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -766,6 +801,7 @@ public final Completable ambWith(CompletableSource other) { * @return Observable that composes this Completable and next * @throws NullPointerException if next is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable andThen(ObservableSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -789,6 +825,7 @@ public final Observable andThen(ObservableSource next) { * @return Flowable that composes this Completable and next * @throws NullPointerException if next is null */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable andThen(Publisher next) { @@ -810,6 +847,7 @@ public final Flowable andThen(Publisher next) { * @param next the Single to subscribe after this Completable is completed, not null * @return Single that composes this Completable and next */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single andThen(SingleSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -830,6 +868,7 @@ public final Single andThen(SingleSource next) { * @param next the Maybe to subscribe after this Completable is completed, not null * @return Maybe that composes this Completable and next */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe andThen(MaybeSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -849,6 +888,7 @@ public final Maybe andThen(MaybeSource next) { * @return the new Completable instance * @throws NullPointerException if other is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable andThen(CompletableSource next) { return concatWith(next); @@ -883,6 +923,7 @@ public final void blockingAwait() { * false if the timeout elapsed before this Completable terminated. * @throws RuntimeException wrapping an InterruptedException if the current thread is interrupted */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final boolean blockingAwait(long timeout, TimeUnit unit) { BlockingMultiObserver observer = new BlockingMultiObserver(); @@ -900,6 +941,7 @@ public final boolean blockingAwait(long timeout, TimeUnit unit) { * @return the throwable if this terminated with an error, null otherwise * @throws RuntimeException that wraps an InterruptedException if the wait is interrupted */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Throwable blockingGet() { BlockingMultiObserver observer = new BlockingMultiObserver(); @@ -920,6 +962,7 @@ public final Throwable blockingGet() { * @throws RuntimeException that wraps an InterruptedException if the wait is interrupted or * TimeoutException if the specified timeout elapsed before it */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Throwable blockingGet(long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -939,6 +982,7 @@ public final Throwable blockingGet(long timeout, TimeUnit unit) { * @return the Completable returned by the function * @throws NullPointerException if transformer is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable compose(CompletableTransformer transformer) { return wrap(transformer.apply(this)); @@ -954,6 +998,7 @@ public final Completable compose(CompletableTransformer transformer) { * @return the new Completable which subscribes to this and then the other Completable * @throws NullPointerException if other is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable concatWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -971,6 +1016,7 @@ public final Completable concatWith(CompletableSource other) { * @return the new Completable instance * @throws NullPointerException if unit is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Completable delay(long delay, TimeUnit unit) { return delay(delay, unit, Schedulers.computation(), false); @@ -989,6 +1035,7 @@ public final Completable delay(long delay, TimeUnit unit) { * @return the new Completable instance * @throws NullPointerException if unit or scheduler is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable delay(long delay, TimeUnit unit, Scheduler scheduler) { return delay(delay, unit, scheduler, false); @@ -1008,6 +1055,7 @@ public final Completable delay(long delay, TimeUnit unit, Scheduler scheduler) { * @return the new Completable instance * @throws NullPointerException if unit or scheduler is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable delay(final long delay, final TimeUnit unit, final Scheduler scheduler, final boolean delayError) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -1025,6 +1073,7 @@ public final Completable delay(final long delay, final TimeUnit unit, final Sche * @return the new Completable instance * @throws NullPointerException if onComplete is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnComplete(Action onComplete) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), @@ -1043,6 +1092,7 @@ public final Completable doOnComplete(Action onComplete) { * @return the new Completable instance * @throws NullPointerException if onDispose is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnDispose(Action onDispose) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), @@ -1060,6 +1110,7 @@ public final Completable doOnDispose(Action onDispose) { * @return the new Completable instance * @throws NullPointerException if onError is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnError(Consumer onError) { return doOnLifecycle(Functions.emptyConsumer(), onError, @@ -1078,6 +1129,7 @@ public final Completable doOnError(Consumer onError) { * @return the new Completable instance * @throws NullPointerException if onEvent is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnEvent(final Consumer onEvent) { ObjectHelper.requireNonNull(onEvent, "onEvent is null"); @@ -1098,6 +1150,7 @@ public final Completable doOnEvent(final Consumer onEvent) { * @param onDispose the runnable called when the child disposes the subscription * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) private Completable doOnLifecycle( final Consumer onSubscribe, @@ -1126,6 +1179,7 @@ private Completable doOnLifecycle( * @return the new Completable instance * @throws NullPointerException if onSubscribe is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnSubscribe(Consumer onSubscribe) { return doOnLifecycle(onSubscribe, Functions.emptyConsumer(), @@ -1143,6 +1197,7 @@ public final Completable doOnSubscribe(Consumer onSubscribe) * @param onTerminate the callback to call just before this Completable terminates * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnTerminate(final Action onTerminate) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), @@ -1160,6 +1215,7 @@ public final Completable doOnTerminate(final Action onTerminate) { * @param onAfterTerminate the callback to call after this Completable terminates * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doAfterTerminate(final Action onAfterTerminate) { return doOnLifecycle( @@ -1185,6 +1241,7 @@ public final Completable doAfterTerminate(final Action onAfterTerminate) { * @return the new Completable instance * @since 2.0.1 - experimental */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @Experimental public final Completable doFinally(Action onFinally) { @@ -1203,6 +1260,7 @@ public final Completable doFinally(Action onFinally) { * @return the new Completable instance * @throws NullPointerException if onLift is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable lift(final CompletableOperator onLift) { ObjectHelper.requireNonNull(onLift, "onLift is null"); @@ -1220,6 +1278,7 @@ public final Completable lift(final CompletableOperator onLift) { * @return the new Completable instance * @throws NullPointerException if other is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable mergeWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -1236,6 +1295,7 @@ public final Completable mergeWith(CompletableSource other) { * @return the new Completable instance * @throws NullPointerException if scheduler is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -1251,6 +1311,7 @@ public final Completable observeOn(final Scheduler scheduler) { * * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable onErrorComplete() { return onErrorComplete(Functions.alwaysTrue()); @@ -1267,6 +1328,7 @@ public final Completable onErrorComplete() { * if the Throwable should be swallowed and replaced with an onComplete. * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable onErrorComplete(final Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -1286,6 +1348,7 @@ public final Completable onErrorComplete(final Predicate pred * continuation. * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable onErrorResumeNext(final Function errorMapper) { ObjectHelper.requireNonNull(errorMapper, "errorMapper is null"); @@ -1300,6 +1363,7 @@ public final Completable onErrorResumeNext(final Function * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable repeat() { return fromPublisher(toFlowable().repeat()); @@ -1315,6 +1379,7 @@ public final Completable repeat() { * @return the new Completable instance * @throws IllegalArgumentException if times is less than zero */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable repeat(long times) { return fromPublisher(toFlowable().repeat(times)); @@ -1331,6 +1396,7 @@ public final Completable repeat(long times) { * @return the new Completable instance * @throws NullPointerException if stop is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable repeatUntil(BooleanSupplier stop) { return fromPublisher(toFlowable().repeatUntil(stop)); @@ -1349,6 +1415,7 @@ public final Completable repeatUntil(BooleanSupplier stop) { * @return the new Completable instance * @throws NullPointerException if stop is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable repeatWhen(Function, ? extends Publisher> handler) { return fromPublisher(toFlowable().repeatWhen(handler)); @@ -1362,6 +1429,7 @@ public final Completable repeatWhen(Function, ? extends * * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable retry() { return fromPublisher(toFlowable().retry()); @@ -1378,6 +1446,7 @@ public final Completable retry() { * and should return true to retry. * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable retry(BiPredicate predicate) { return fromPublisher(toFlowable().retry(predicate)); @@ -1394,6 +1463,7 @@ public final Completable retry(BiPredicate p * @return the new Completable instance * @throws IllegalArgumentException if times is negative */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable retry(long times) { return fromPublisher(toFlowable().retry(times)); @@ -1411,6 +1481,7 @@ public final Completable retry(long times) { * @return the new Completable instance * @throws NullPointerException if predicate is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable retry(Predicate predicate) { return fromPublisher(toFlowable().retry(predicate)); @@ -1429,6 +1500,7 @@ public final Completable retry(Predicate predicate) { * @return the new Completable instance * @throws NullPointerException if handler is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable retryWhen(Function, ? extends Publisher> handler) { return fromPublisher(toFlowable().retryWhen(handler)); @@ -1445,6 +1517,7 @@ public final Completable retryWhen(Function, ? exten * @return the new Completable instance * @throws NullPointerException if other is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable startWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -1463,6 +1536,7 @@ public final Completable startWith(CompletableSource other) { * @return the new Observable instance * @throws NullPointerException if other is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable startWith(Observable other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -1483,6 +1557,7 @@ public final Observable startWith(Observable other) { * @return the new Flowable instance * @throws NullPointerException if other is null */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable startWith(Publisher other) { @@ -1573,6 +1648,7 @@ public final E subscribeWith(E observer) { * @return the Disposable that can be used for cancelling the subscription asynchronously * @throws NullPointerException if either callback is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(final Action onComplete, final Consumer onError) { ObjectHelper.requireNonNull(onError, "onError is null"); @@ -1595,6 +1671,7 @@ public final Disposable subscribe(final Action onComplete, final Consumer U to(Function converter) { try { @@ -1756,6 +1840,7 @@ public final U to(Function converter) { * @param the value type * @return the new Flowable instance */ + @CheckReturnValue @SuppressWarnings("unchecked") @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @@ -1778,6 +1863,7 @@ public final Flowable toFlowable() { * @param the value type * @return a {@link Maybe} that emits a single item T or an error. */ + @CheckReturnValue @SuppressWarnings("unchecked") @SchedulerSupport(SchedulerSupport.NONE) public final Maybe toMaybe() { @@ -1797,6 +1883,7 @@ public final Maybe toMaybe() { * @param the value type * @return the new Observable created */ + @CheckReturnValue @SuppressWarnings("unchecked") @SchedulerSupport(SchedulerSupport.NONE) public final Observable toObservable() { @@ -1818,6 +1905,7 @@ public final Observable toObservable() { * @return the new Single instance * @throws NullPointerException if completionValueSupplier is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single toSingle(final Callable completionValueSupplier) { ObjectHelper.requireNonNull(completionValueSupplier, "completionValueSupplier is null"); @@ -1836,6 +1924,7 @@ public final Single toSingle(final Callable completionValueS * @return the new Single instance * @throws NullPointerException if completionValue is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single toSingleDefault(final T completionValue) { ObjectHelper.requireNonNull(completionValue, "completionValue is null"); @@ -1853,6 +1942,7 @@ public final Single toSingleDefault(final T completionValue) { * @return the new Completable instance * @throws NullPointerException if scheduler is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable unsubscribeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index 1c70acc1ff..4c4cc601e3 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -82,6 +82,7 @@ public abstract class Flowable implements Publisher { * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable amb(Iterable> sources) { @@ -109,6 +110,7 @@ public static Flowable amb(Iterable> sou * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable ambArray(Publisher... sources) { @@ -164,6 +166,7 @@ public static int bufferSize() { * @see ReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatest(Publisher[] sources, Function combiner) { return combineLatest(sources, combiner, bufferSize()); @@ -200,6 +203,7 @@ public static Flowable combineLatest(Publisher[] sources, * @see ReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatest(Function combiner, Publisher... sources) { return combineLatest(sources, combiner, bufferSize()); @@ -238,6 +242,7 @@ public static Flowable combineLatest(FunctionReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatest(Publisher[] sources, Function combiner, int bufferSize) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -280,6 +285,7 @@ public static Flowable combineLatest(Publisher[] sources, * @see ReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatest(Iterable> sources, Function combiner) { @@ -319,6 +325,7 @@ public static Flowable combineLatest(IterableReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatest(Iterable> sources, Function combiner, int bufferSize) { @@ -359,6 +366,7 @@ public static Flowable combineLatest(IterableReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatestDelayError(Publisher[] sources, Function combiner) { @@ -397,6 +405,7 @@ public static Flowable combineLatestDelayError(Publisher[ * @see ReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatestDelayError(Function combiner, Publisher... sources) { @@ -437,6 +446,7 @@ public static Flowable combineLatestDelayError(FunctionReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatestDelayError(Function combiner, int bufferSize, Publisher... sources) { @@ -477,6 +487,7 @@ public static Flowable combineLatestDelayError(FunctionReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatestDelayError(Publisher[] sources, Function combiner, int bufferSize) { @@ -521,6 +532,7 @@ public static Flowable combineLatestDelayError(Publisher[ * @see ReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatestDelayError(Iterable> sources, Function combiner) { @@ -561,6 +573,7 @@ public static Flowable combineLatestDelayError(IterableReactiveX operators documentation: CombineLatest */ @SchedulerSupport(SchedulerSupport.NONE) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) public static Flowable combineLatestDelayError(Iterable> sources, Function combiner, int bufferSize) { @@ -599,6 +612,7 @@ public static Flowable combineLatestDelayError(IterableReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -642,6 +656,7 @@ public static Flowable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -689,6 +704,7 @@ public static Flowable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -740,6 +756,7 @@ public static Flowable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -796,6 +813,7 @@ public static Flowable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -856,6 +874,7 @@ public static Flowable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -921,6 +940,7 @@ public static Flowable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -990,6 +1010,7 @@ public static Flowable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -1030,6 +1051,7 @@ public static Flowable combineLatest( * @return the new Flowable instance */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Iterable> sources) { @@ -1060,6 +1082,7 @@ public static Flowable concat(Iterable> * {@code Publishers}, one after the other, without interleaving them * @see ReactiveX operators documentation: Concat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Publisher> sources) { @@ -1091,6 +1114,7 @@ public static Flowable concat(Publisher> * @see ReactiveX operators documentation: Concat */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Publisher> sources, int prefetch) { @@ -1122,6 +1146,7 @@ public static Flowable concat(Publisher> * @see ReactiveX operators documentation: Concat */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Publisher source1, Publisher source2) { @@ -1155,6 +1180,7 @@ public static Flowable concat(Publisher source1, PublisherReactiveX operators documentation: Concat */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat( @@ -1192,6 +1218,7 @@ public static Flowable concat( * @see ReactiveX operators documentation: Concat */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat( @@ -1220,6 +1247,7 @@ public static Flowable concat( * @return the new Publisher instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatArray(Publisher... sources) { @@ -1251,6 +1279,7 @@ public static Flowable concatArray(Publisher... sources) { * @return the new Flowable instance * @throws NullPointerException if sources is null */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatArrayDelayError(Publisher... sources) { @@ -1283,6 +1312,7 @@ public static Flowable concatArrayDelayError(Publisher... so * @return the new Publisher instance with the specified concatenation behavior * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatArrayEager(Publisher... sources) { @@ -1312,6 +1342,7 @@ public static Flowable concatArrayEager(Publisher... sources * @return the new Publisher instance with the specified concatenation behavior * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "rawtypes", "unchecked" }) @@ -1338,6 +1369,7 @@ public static Flowable concatArrayEager(int maxConcurrency, int prefetch, * @return the new Publisher with the concatenating behavior */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatDelayError(Iterable> sources) { @@ -1360,6 +1392,7 @@ public static Flowable concatDelayError(Iterable Flowable concatDelayError(Publisher> sources) { @@ -1385,6 +1418,7 @@ public static Flowable concatDelayError(Publisher Flowable concatDelayError(Publisher> sources, int prefetch, boolean tillTheEnd) { @@ -1410,6 +1444,7 @@ public static Flowable concatDelayError(Publisher Flowable concatEager(Publisher> sources) { @@ -1438,6 +1473,7 @@ public static Flowable concatEager(Publisher Flowable concatEager(Publisher Flowable concatEager(Iterable> sources) { @@ -1492,6 +1529,7 @@ public static Flowable concatEager(Iterable Flowable concatEager(Iterable Flowable create(FlowableOnSubscribe source, BackpressureStrategy mode) { @@ -1580,6 +1619,7 @@ public static Flowable create(FlowableOnSubscribe source, Backpressure * Publisher factory function * @see ReactiveX operators documentation: Defer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable defer(Callable> supplier) { @@ -1605,6 +1645,7 @@ public static Flowable defer(Callable> s * {@link Subscriber}'s {@link Subscriber#onComplete() onComplete} method * @see ReactiveX operators documentation: Empty */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -1632,6 +1673,7 @@ public static Flowable empty() { * the Subscriber subscribes to it * @see ReactiveX operators documentation: Throw */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable error(Callable supplier) { @@ -1659,6 +1701,7 @@ public static Flowable error(Callable supplier) { * the Subscriber subscribes to it * @see ReactiveX operators documentation: Throw */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable error(final Throwable throwable) { @@ -1685,6 +1728,7 @@ public static Flowable error(final Throwable throwable) { * @return a Flowable that emits each item in the source Array * @see ReactiveX operators documentation: From */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromArray(T... items) { @@ -1722,6 +1766,7 @@ public static Flowable fromArray(T... items) { * @see #defer(Callable) * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromCallable(Callable supplier) { @@ -1757,6 +1802,7 @@ public static Flowable fromCallable(Callable supplier) { * @return a Flowable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromFuture(Future future) { @@ -1796,6 +1842,7 @@ public static Flowable fromFuture(Future future) { * @return a Flowable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromFuture(Future future, long timeout, TimeUnit unit) { @@ -1839,6 +1886,7 @@ public static Flowable fromFuture(Future future, long timeou * @return a Flowable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable fromFuture(Future future, long timeout, TimeUnit unit, Scheduler scheduler) { @@ -1875,6 +1923,7 @@ public static Flowable fromFuture(Future future, long timeou * @return a Flowable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable fromFuture(Future future, Scheduler scheduler) { @@ -1902,6 +1951,7 @@ public static Flowable fromFuture(Future future, Scheduler s * @return a Flowable that emits each item in the source {@link Iterable} sequence * @see ReactiveX operators documentation: From */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromIterable(Iterable source) { @@ -1924,6 +1974,7 @@ public static Flowable fromIterable(Iterable source) { * @return the new Flowable instance * @throws NullPointerException if publisher is null */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -1953,6 +2004,7 @@ public static Flowable fromPublisher(final Publisher source) * in a call will make the operator signal {@code IllegalStateException}. * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable generate(final Consumer> generator) { @@ -1981,6 +2033,7 @@ public static Flowable generate(final Consumer> generator) { * in a call will make the operator signal {@code IllegalStateException}. * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable generate(Callable initialState, final BiConsumer> generator) { @@ -2010,6 +2063,7 @@ public static Flowable generate(Callable initialState, final BiCons * terminates the sequence or it gets cancelled * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable generate(Callable initialState, final BiConsumer> generator, @@ -2038,6 +2092,7 @@ public static Flowable generate(Callable initialState, final BiCons * in a call will make the operator signal {@code IllegalStateException}. * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable generate(Callable initialState, BiFunction, S> generator) { @@ -2066,6 +2121,7 @@ public static Flowable generate(Callable initialState, BiFunction Flowable generate(Callable initialState, BiFunction, S> generator, Consumer disposeState) { @@ -2100,6 +2156,7 @@ public static Flowable generate(Callable initialState, BiFunctionReactiveX operators documentation: Interval * @since 1.0.12 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Flowable interval(long initialDelay, long period, TimeUnit unit) { @@ -2133,6 +2190,7 @@ public static Flowable interval(long initialDelay, long period, TimeUnit u * @see ReactiveX operators documentation: Interval * @since 1.0.12 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable interval(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { @@ -2160,6 +2218,7 @@ public static Flowable interval(long initialDelay, long period, TimeUnit u * @return a Flowable that emits a sequential number each time interval * @see ReactiveX operators documentation: Interval */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Flowable interval(long period, TimeUnit unit) { @@ -2189,6 +2248,7 @@ public static Flowable interval(long period, TimeUnit unit) { * @return a Flowable that emits a sequential number each time interval * @see ReactiveX operators documentation: Interval */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable interval(long period, TimeUnit unit, Scheduler scheduler) { @@ -2212,6 +2272,7 @@ public static Flowable interval(long period, TimeUnit unit, Scheduler sche * @param unit the unit of measure of the initialDelay and period amounts * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Flowable intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit) { @@ -2236,6 +2297,7 @@ public static Flowable intervalRange(long start, long count, long initialD * @param scheduler the target scheduler where the values and terminal signals will be emitted * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { @@ -2282,6 +2344,7 @@ public static Flowable intervalRange(long start, long count, long initialD * @return a Flowable that emits {@code value} as a single item and then completes * @see ReactiveX operators documentation: Just */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item) { @@ -2310,6 +2373,7 @@ public static Flowable just(T item) { * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2) { @@ -2342,6 +2406,7 @@ public static Flowable just(T item1, T item2) { * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3) { @@ -2377,6 +2442,7 @@ public static Flowable just(T item1, T item2, T item3) { * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4) { @@ -2415,6 +2481,7 @@ public static Flowable just(T item1, T item2, T item3, T item4) { * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5) { @@ -2456,6 +2523,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5) * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6) { @@ -2500,6 +2568,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7) { @@ -2547,6 +2616,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8) { @@ -2597,6 +2667,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9) { @@ -2650,6 +2721,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9, T item10) { @@ -2697,6 +2769,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Iterable> sources, int maxConcurrency, int bufferSize) { @@ -2733,6 +2806,7 @@ public static Flowable merge(Iterable> s * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeArray(int maxConcurrency, int bufferSize, Publisher... sources) { @@ -2762,6 +2836,7 @@ public static Flowable mergeArray(int maxConcurrency, int bufferSize, Pub * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Iterable> sources) { @@ -2796,6 +2871,7 @@ public static Flowable merge(Iterable> s * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Iterable> sources, int maxConcurrency) { @@ -2826,6 +2902,7 @@ public static Flowable merge(Iterable> s * {@code source} Publisher * @see ReactiveX operators documentation: Merge */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Publisher> sources) { @@ -2862,6 +2939,7 @@ public static Flowable merge(Publisher> * @since 1.1.0 */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Publisher> sources, int maxConcurrency) { @@ -2890,6 +2968,7 @@ public static Flowable merge(Publisher> * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeArray(Publisher... sources) { @@ -2920,6 +2999,7 @@ public static Flowable mergeArray(Publisher... sources) { * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Publisher source1, Publisher source2) { @@ -2954,6 +3034,7 @@ public static Flowable merge(Publisher source1, PublisherReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Publisher source1, Publisher source2, Publisher source3) { @@ -2991,6 +3072,7 @@ public static Flowable merge(Publisher source1, PublisherReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge( @@ -3032,6 +3114,7 @@ public static Flowable merge( * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Iterable> sources) { @@ -3072,6 +3155,7 @@ public static Flowable mergeDelayError(IterableReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Iterable> sources, int maxConcurrency, int bufferSize) { @@ -3111,6 +3195,7 @@ public static Flowable mergeDelayError(IterableReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeArrayDelayError(int maxConcurrency, int bufferSize, Publisher... sources) { @@ -3148,6 +3233,7 @@ public static Flowable mergeArrayDelayError(int maxConcurrency, int buffe * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Iterable> sources, int maxConcurrency) { @@ -3183,6 +3269,7 @@ public static Flowable mergeDelayError(IterableReactiveX operators documentation: Merge */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Publisher> sources) { @@ -3222,6 +3309,7 @@ public static Flowable mergeDelayError(Publisher Flowable mergeDelayError(Publisher> sources, int maxConcurrency) { @@ -3257,6 +3345,7 @@ public static Flowable mergeDelayError(PublisherReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeArrayDelayError(Publisher... sources) { @@ -3293,6 +3382,7 @@ public static Flowable mergeArrayDelayError(Publisher... sou * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Publisher source1, Publisher source2) { @@ -3334,6 +3424,7 @@ public static Flowable mergeDelayError(Publisher source1, Pu * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Publisher source1, Publisher source2, Publisher source3) { @@ -3379,6 +3470,7 @@ public static Flowable mergeDelayError(Publisher source1, Pu * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError( @@ -3409,6 +3501,7 @@ public static Flowable mergeDelayError( * @return a Flowable that never emits any items or sends any notifications to a {@link Subscriber} * @see ReactiveX operators documentation: Never */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -3437,6 +3530,7 @@ public static Flowable never() { * {@code Integer.MAX_VALUE} * @see ReactiveX operators documentation: Range */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable range(int start, int count) { @@ -3476,6 +3570,7 @@ public static Flowable range(int start, int count) { * {@code Long.MAX_VALUE} * @see ReactiveX operators documentation: Range */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable rangeLong(long start, long count) { @@ -3521,6 +3616,7 @@ public static Flowable rangeLong(long start, long count) { * @return a Flowable that emits a Boolean value that indicates whether the two sequences are the same * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(Publisher source1, Publisher source2) { @@ -3553,6 +3649,7 @@ public static Single sequenceEqual(Publisher source1, * are the same according to the specified function * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(Publisher source1, Publisher source2, @@ -3588,6 +3685,7 @@ public static Single sequenceEqual(Publisher source1, * are the same according to the specified function * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(Publisher source1, Publisher source2, @@ -3623,6 +3721,7 @@ public static Single sequenceEqual(Publisher source1, * @return a Single that emits a Boolean value that indicates whether the two sequences are the same * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(Publisher source1, Publisher source2, int bufferSize) { @@ -3662,6 +3761,7 @@ public static Single sequenceEqual(Publisher source1, * @see ReactiveX operators documentation: Switch */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable switchOnNext(Publisher> sources, int bufferSize) { @@ -3699,6 +3799,7 @@ public static Flowable switchOnNext(PublisherReactiveX operators documentation: Switch */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable switchOnNext(Publisher> sources) { @@ -3737,6 +3838,7 @@ public static Flowable switchOnNext(PublisherReactiveX operators documentation: Switch * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable switchOnNextDelayError(Publisher> sources) { @@ -3777,6 +3879,7 @@ public static Flowable switchOnNextDelayError(PublisherReactiveX operators documentation: Switch * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable switchOnNextDelayError(Publisher> sources, int prefetch) { @@ -3802,6 +3905,7 @@ public static Flowable switchOnNextDelayError(PublisherReactiveX operators documentation: Timer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Flowable timer(long delay, TimeUnit unit) { @@ -3831,6 +3935,7 @@ public static Flowable timer(long delay, TimeUnit unit) { * completes * @see ReactiveX operators documentation: Timer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable timer(long delay, TimeUnit unit, Scheduler scheduler) { @@ -3858,6 +3963,7 @@ public static Flowable timer(long delay, TimeUnit unit, Scheduler schedule * instances don't need conversion and is possibly a port remnant from 1.x or one should use {@link #hide()} * instead. */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable unsafeCreate(Publisher onSubscribe) { @@ -3891,6 +3997,7 @@ public static Flowable unsafeCreate(Publisher onSubscribe) { * @return the Publisher whose lifetime controls the lifetime of the dependent resource object * @see ReactiveX operators documentation: Using */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable using(Callable resourceSupplier, @@ -3929,6 +4036,7 @@ public static Flowable using(Callable resourceSupplier, * @see ReactiveX operators documentation: Using * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable using(Callable resourceSupplier, @@ -3984,6 +4092,7 @@ public static Flowable using(Callable resourceSupplier, * @return a Flowable that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip(Iterable> sources, Function zipper) { @@ -4036,6 +4145,7 @@ public static Flowable zip(Iterable> * @return a Flowable that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip(Publisher> sources, @@ -4093,6 +4203,7 @@ public static Flowable zip(Publisher> * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4153,6 +4264,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4215,6 +4327,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4278,6 +4391,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4345,6 +4459,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4417,6 +4532,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4492,6 +4608,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4571,6 +4688,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4655,6 +4773,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4743,6 +4862,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4812,6 +4932,7 @@ public static Flowable zip( * @return a Flowable that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zipArray(Function zipper, @@ -4873,6 +4994,7 @@ public static Flowable zipArray(FunctionReactiveX operators documentation: Zip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zipIterable(Iterable> sources, @@ -4907,6 +5029,7 @@ public static Flowable zipIterable(IterableReactiveX operators documentation: All */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single all(Predicate predicate) { @@ -4934,6 +5057,7 @@ public final Single all(Predicate predicate) { * @see ReactiveX operators documentation: Amb */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable ambWith(Publisher other) { @@ -4964,6 +5088,7 @@ public final Flowable ambWith(Publisher other) { * Publisher satisfies the {@code predicate} * @see ReactiveX operators documentation: Contains */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single any(Predicate predicate) { @@ -4987,6 +5112,7 @@ public final Single any(Predicate predicate) { * if this {@code Flowable} emits no items * @see ReactiveX documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final T blockingFirst() { @@ -5016,6 +5142,7 @@ public final T blockingFirst() { * items * @see ReactiveX documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final T blockingFirst(T defaultItem) { @@ -5085,6 +5212,7 @@ public final void blockingForEach(Consumer onNext) { * @return an {@link Iterable} version of this {@code Flowable} * @see ReactiveX documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingIterable() { @@ -5108,6 +5236,7 @@ public final Iterable blockingIterable() { * @return an {@link Iterable} version of this {@code Flowable} * @see ReactiveX documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingIterable(int bufferSize) { @@ -5133,6 +5262,7 @@ public final Iterable blockingIterable(int bufferSize) { * if this {@code Flowable} emits no items * @see ReactiveX documentation: Last */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final T blockingLast() { @@ -5164,6 +5294,7 @@ public final T blockingLast() { * items * @see ReactiveX documentation: Last */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final T blockingLast(T defaultItem) { @@ -5193,6 +5324,7 @@ public final T blockingLast(T defaultItem) { * @return an Iterable that always returns the latest item emitted by this {@code Flowable} * @see ReactiveX documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingLatest() { @@ -5219,6 +5351,7 @@ public final Iterable blockingLatest() { * has most recently emitted * @see ReactiveX documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingMostRecent(T initialItem) { @@ -5242,6 +5375,7 @@ public final Iterable blockingMostRecent(T initialItem) { * a new item, whereupon the Iterable returns that item * @see ReactiveX documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingNext() { @@ -5264,6 +5398,7 @@ public final Iterable blockingNext() { * @return the single item emitted by this {@code Flowable} * @see ReactiveX documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final T blockingSingle() { @@ -5290,6 +5425,7 @@ public final T blockingSingle() { * items * @see ReactiveX documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final T blockingSingle(T defaultItem) { @@ -5317,6 +5453,7 @@ public final T blockingSingle(T defaultItem) { * @return a {@link Future} that expects a single item to be emitted by this {@code Flowable} * @see ReactiveX documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Future toFuture() { @@ -5439,6 +5576,7 @@ public final void blockingSubscribe(Subscriber subscriber) { * {@code count} items from the source Publisher * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> buffer(int count) { @@ -5471,6 +5609,7 @@ public final Flowable> buffer(int count) { * containing at most {@code count} items * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> buffer(int count, int skip) { @@ -5507,6 +5646,7 @@ public final Flowable> buffer(int count, int skip) { * containing at most {@code count} items * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final > Flowable buffer(int count, int skip, Callable bufferSupplier) { @@ -5542,6 +5682,7 @@ public final > Flowable buffer(int count, int * {@code count} items from the source Publisher * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final > Flowable buffer(int count, Callable bufferSupplier) { @@ -5574,6 +5715,7 @@ public final > Flowable buffer(int count, Cal * a fixed timespan has elapsed * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable> buffer(long timespan, long timeskip, TimeUnit unit) { @@ -5608,6 +5750,7 @@ public final Flowable> buffer(long timespan, long timeskip, TimeUnit uni * a fixed timespan has elapsed * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> buffer(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler) { @@ -5646,6 +5789,7 @@ public final Flowable> buffer(long timespan, long timeskip, TimeUnit uni * a fixed timespan has elapsed * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final > Flowable buffer(long timespan, long timeskip, TimeUnit unit, @@ -5680,6 +5824,7 @@ public final > Flowable buffer(long timespan, * Publisher within a fixed duration * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable> buffer(long timespan, TimeUnit unit) { @@ -5714,6 +5859,7 @@ public final Flowable> buffer(long timespan, TimeUnit unit) { * first) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable> buffer(long timespan, TimeUnit unit, int count) { @@ -5751,6 +5897,7 @@ public final Flowable> buffer(long timespan, TimeUnit unit, int count) { * first) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> buffer(long timespan, TimeUnit unit, Scheduler scheduler, int count) { @@ -5794,6 +5941,7 @@ public final Flowable> buffer(long timespan, TimeUnit unit, Scheduler sc * first) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final > Flowable buffer( @@ -5835,6 +5983,7 @@ public final > Flowable buffer( * Publisher within a fixed duration * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> buffer(long timespan, TimeUnit unit, Scheduler scheduler) { @@ -5866,6 +6015,7 @@ public final Flowable> buffer(long timespan, TimeUnit unit, Scheduler sc * and closed when the specified Publishers emit items * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> buffer( @@ -5903,6 +6053,7 @@ public final Flowable> buffer( * and closed when the specified Publishers emit items * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final > Flowable buffer( @@ -5941,6 +6092,7 @@ public final > Flowable b * @see #buffer(Publisher, int) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> buffer(Publisher boundaryIndicator) { @@ -5975,6 +6127,7 @@ public final Flowable> buffer(Publisher boundaryIndicator) { * @see ReactiveX operators documentation: Buffer * @see #buffer(Publisher) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> buffer(Publisher boundaryIndicator, final int initialCapacity) { @@ -6011,6 +6164,7 @@ public final Flowable> buffer(Publisher boundaryIndicator, final * @see #buffer(Publisher, int) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final > Flowable buffer(Publisher boundaryIndicator, Callable bufferSupplier) { @@ -6042,6 +6196,7 @@ public final > Flowable buffer(PublisherReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> buffer(Callable> boundaryIndicatorSupplier) { @@ -6076,6 +6231,7 @@ public final Flowable> buffer(Callable> bound * each time the Publisher created with the {@code closingIndicator} argument emits an item * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final > Flowable buffer(Callable> boundaryIndicatorSupplier, @@ -6136,6 +6292,7 @@ public final > Flowable buffer(CallableReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable cache() { @@ -6197,6 +6354,7 @@ public final Flowable cache() { * benefit of subsequent subscribers * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable cacheWithInitialCapacity(int initialCapacity) { @@ -6225,6 +6383,7 @@ public final Flowable cacheWithInitialCapacity(int initialCapacity) { * specified type * @see ReactiveX operators documentation: Map */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable cast(final Class clazz) { @@ -6257,6 +6416,7 @@ public final Flowable cast(final Class clazz) { * into a single mutable data structure * @see ReactiveX operators documentation: Reduce */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single collect(Callable initialItemSupplier, BiConsumer collector) { @@ -6290,6 +6450,7 @@ public final Single collect(Callable initialItemSupplier, Bi * into a single mutable data structure * @see ReactiveX operators documentation: Reduce */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single collectInto(final U initialItem, BiConsumer collector) { @@ -6319,6 +6480,7 @@ public final Single collectInto(final U initialItem, BiConsumerRxJava wiki: Implementing Your Own Operators */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable compose(FlowableTransformer composer) { @@ -6350,6 +6512,7 @@ public final Flowable compose(FlowableTransformer composer) { * by the source Publisher and concatenating the Publishers obtained from this transformation * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatMap(Function> mapper) { @@ -6383,6 +6546,7 @@ public final Flowable concatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatMap(Function> mapper, int prefetch) { @@ -6420,6 +6584,7 @@ public final Flowable concatMap(Function Flowable concatMapDelayError(Function> mapper) { @@ -6452,6 +6617,7 @@ public final Flowable concatMapDelayError(Function Flowable concatMapDelayError(Function> mapper, @@ -6490,6 +6656,7 @@ public final Flowable concatMapDelayError(Function Flowable concatMapEager(Function> mapper) { @@ -6518,6 +6685,7 @@ public final Flowable concatMapEager(Function Flowable concatMapEager(Function> mapper, @@ -6550,6 +6718,7 @@ public final Flowable concatMapEager(Function Flowable concatMapEagerDelayError(Function> mapper, @@ -6584,6 +6753,7 @@ public final Flowable concatMapEagerDelayError(Function Flowable concatMapEagerDelayError(Function> mapper, @@ -6614,6 +6784,7 @@ public final Flowable concatMapEagerDelayError(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatMapIterable(Function> mapper) { @@ -6645,6 +6816,7 @@ public final Flowable concatMapIterable(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatMapIterable(final Function> mapper, int prefetch) { @@ -6673,6 +6845,7 @@ public final Flowable concatMapIterable(final FunctionReactiveX operators documentation: Concat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatWith(Publisher other) { @@ -6699,6 +6872,7 @@ public final Flowable concatWith(Publisher other) { * or {@code false} if the source Publisher completes without emitting that item * @see ReactiveX operators documentation: Contains */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single contains(final Object item) { @@ -6724,6 +6898,7 @@ public final Single contains(final Object item) { * @see ReactiveX operators documentation: Count * @see #count() */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single count() { @@ -6752,6 +6927,7 @@ public final Single count() { * @see ReactiveX operators documentation: Debounce * @see RxJava wiki: Backpressure */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable debounce(Function> debounceIndicator) { @@ -6794,6 +6970,7 @@ public final Flowable debounce(Function * @see RxJava wiki: Backpressure * @see #throttleWithTimeout(long, TimeUnit) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable debounce(long timeout, TimeUnit unit) { @@ -6838,6 +7015,7 @@ public final Flowable debounce(long timeout, TimeUnit unit) { * @see RxJava wiki: Backpressure * @see #throttleWithTimeout(long, TimeUnit, Scheduler) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable debounce(long timeout, TimeUnit unit, Scheduler scheduler) { @@ -6867,6 +7045,7 @@ public final Flowable debounce(long timeout, TimeUnit unit, Scheduler schedul * items, or the items emitted by the source Publisher * @see ReactiveX operators documentation: DefaultIfEmpty */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable defaultIfEmpty(T defaultItem) { @@ -6901,6 +7080,7 @@ public final Flowable defaultIfEmpty(T defaultItem) { * per-item basis * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable delay(final Function> itemDelayIndicator) { @@ -6927,6 +7107,7 @@ public final Flowable delay(final FunctionReactiveX operators documentation: Delay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable delay(long delay, TimeUnit unit) { @@ -6955,6 +7136,7 @@ public final Flowable delay(long delay, TimeUnit unit) { * @return the source Publisher shifted in time by the specified delay * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable delay(long delay, TimeUnit unit, boolean delayError) { @@ -6982,6 +7164,7 @@ public final Flowable delay(long delay, TimeUnit unit, boolean delayError) { * @return the source Publisher shifted in time by the specified delay * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable delay(long delay, TimeUnit unit, Scheduler scheduler) { @@ -7012,6 +7195,7 @@ public final Flowable delay(long delay, TimeUnit unit, Scheduler scheduler) { * @return the source Publisher shifted in time by the specified delay * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable delay(long delay, TimeUnit unit, Scheduler scheduler, boolean delayError) { @@ -7053,6 +7237,7 @@ public final Flowable delay(long delay, TimeUnit unit, Scheduler scheduler, b * Publisher on a per-item basis * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable delay(Publisher subscriptionIndicator, @@ -7079,6 +7264,7 @@ public final Flowable delay(Publisher subscriptionIndicator, * until the other Publisher emits an element or completes normally. * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable delaySubscription(Publisher subscriptionIndicator) { @@ -7104,6 +7290,7 @@ public final Flowable delaySubscription(Publisher subscriptionIndicato * @return a Flowable that delays the subscription to the source Publisher by the given amount * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable delaySubscription(long delay, TimeUnit unit) { @@ -7132,6 +7319,7 @@ public final Flowable delaySubscription(long delay, TimeUnit unit) { * amount, waiting and subscribing on the given Scheduler * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable delaySubscription(long delay, TimeUnit unit, Scheduler scheduler) { @@ -7157,6 +7345,7 @@ public final Flowable delaySubscription(long delay, TimeUnit unit, Scheduler * emitted by the source Publisher * @see ReactiveX operators documentation: Dematerialize */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable dematerialize() { @@ -7182,6 +7371,7 @@ public final Flowable dematerialize() { * @see ReactiveX operators documentation: Distinct */ @SuppressWarnings({ "rawtypes", "unchecked" }) + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable distinct() { @@ -7208,6 +7398,7 @@ public final Flowable distinct() { * @return a Flowable that emits those items emitted by the source Publisher that have distinct keys * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable distinct(Function keySelector) { @@ -7237,6 +7428,7 @@ public final Flowable distinct(Function keySelector) { * @return a Flowable that emits those items emitted by the source Publisher that have distinct keys * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable distinct(Function keySelector, @@ -7263,6 +7455,7 @@ public final Flowable distinct(Function keySelector, * immediate predecessors * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable distinctUntilChanged() { @@ -7290,6 +7483,7 @@ public final Flowable distinctUntilChanged() { * those of their immediate predecessors * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable distinctUntilChanged(Function keySelector) { @@ -7317,6 +7511,7 @@ public final Flowable distinctUntilChanged(Function keySele * @see ReactiveX operators documentation: Distinct * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable distinctUntilChanged(BiPredicate comparer) { @@ -7345,6 +7540,7 @@ public final Flowable distinctUntilChanged(BiPredicate * @return the new Flowable instance * @since 2.0.1 - experimental */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) @Experimental @@ -7371,6 +7567,7 @@ public final Flowable doFinally(Action onFinally) { * @return the new Flowable instance * @since 2.0.1 - experimental */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) @Experimental @@ -7399,6 +7596,7 @@ public final Flowable doAfterNext(Consumer onAfterNext) { * @see ReactiveX operators documentation: Do * @see #doOnTerminate(Action) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doAfterTerminate(Action onAfterTerminate) { @@ -7431,6 +7629,7 @@ public final Flowable doAfterTerminate(Action onAfterTerminate) { * @return the source {@code Publisher} modified so as to call this Action when appropriate * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnCancel(Action onCancel) { @@ -7454,6 +7653,7 @@ public final Flowable doOnCancel(Action onCancel) { * @return the source Publisher with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnComplete(Action onComplete) { @@ -7477,6 +7677,7 @@ public final Flowable doOnComplete(Action onComplete) { * @return the source Publisher with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) private Flowable doOnEach(Consumer onNext, Consumer onError, @@ -7505,6 +7706,7 @@ private Flowable doOnEach(Consumer onNext, ConsumerReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnEach(final Consumer> onNotification) { @@ -7540,6 +7742,7 @@ public final Flowable doOnEach(final Consumer> onNoti * @return the source Publisher with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnEach(final Subscriber subscriber) { @@ -7571,6 +7774,7 @@ public final Flowable doOnEach(final Subscriber subscriber) { * @return the source Publisher with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnError(Consumer onError) { @@ -7600,6 +7804,7 @@ public final Flowable doOnError(Consumer onError) { * @return the source Publisher with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnLifecycle(final Consumer onSubscribe, @@ -7627,6 +7832,7 @@ public final Flowable doOnLifecycle(final Consumer onSu * @return the source Publisher with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnNext(Consumer onNext) { @@ -7656,6 +7862,7 @@ public final Flowable doOnNext(Consumer onNext) { * documentation: Do * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnRequest(LongConsumer onRequest) { @@ -7682,6 +7889,7 @@ public final Flowable doOnRequest(LongConsumer onRequest) { * @return the source {@code Publisher} modified so as to call this Consumer when appropriate * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnSubscribe(Consumer onSubscribe) { @@ -7710,6 +7918,7 @@ public final Flowable doOnSubscribe(Consumer onSubscrib * @see ReactiveX operators documentation: Do * @see #doAfterTerminate(Action) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnTerminate(final Action onTerminate) { @@ -7736,6 +7945,7 @@ public final Flowable doOnTerminate(final Action onTerminate) { * those emitted by the source Publisher * @see ReactiveX operators documentation: ElementAt */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Maybe elementAt(long index) { @@ -7768,6 +7978,7 @@ public final Maybe elementAt(long index) { * if {@code index} is less than 0 * @see ReactiveX operators documentation: ElementAt */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single elementAt(long index, T defaultItem) { @@ -7799,6 +8010,7 @@ public final Single elementAt(long index, T defaultItem) { * if {@code index} is less than 0 * @see ReactiveX operators documentation: ElementAt */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single elementAtOrError(long index) { @@ -7827,6 +8039,7 @@ public final Single elementAtOrError(long index) { * evaluates as {@code true} * @see ReactiveX operators documentation: Filter */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable filter(Predicate predicate) { @@ -7850,6 +8063,7 @@ public final Flowable filter(Predicate predicate) { * @return the new Maybe instance * @see ReactiveX operators documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) // take may trigger UNBOUNDED_IN @SchedulerSupport(SchedulerSupport.NONE) public final Maybe firstElement() { @@ -7875,6 +8089,7 @@ public final Maybe firstElement() { * source Publisher completes without emitting any items * @see ReactiveX operators documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) // take may trigger UNBOUNDED_IN @SchedulerSupport(SchedulerSupport.NONE) public final Single first(T defaultItem) { @@ -7897,6 +8112,7 @@ public final Single first(T defaultItem) { * @return the new Single instance * @see ReactiveX operators documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) // take may trigger UNBOUNDED_IN @SchedulerSupport(SchedulerSupport.NONE) public final Single firstOrError() { @@ -7927,6 +8143,7 @@ public final Single firstOrError() { * transformation * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper) { @@ -7960,6 +8177,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper, boolean delayErrors) { @@ -7993,6 +8211,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper, int maxConcurrency) { @@ -8029,6 +8248,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper, boolean delayErrors, int maxConcurrency) { @@ -8067,6 +8287,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper, @@ -8113,6 +8334,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap( @@ -8156,6 +8378,7 @@ public final Flowable flatMap( * @see ReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap( @@ -8197,6 +8420,7 @@ public final Flowable flatMap( * source Publisher and the collection Publisher * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper, @@ -8234,6 +8458,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper, @@ -8274,6 +8499,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper, @@ -8316,6 +8542,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(final Function> mapper, @@ -8355,6 +8582,7 @@ public final Flowable flatMap(final FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap(Function> mapper, @@ -8374,6 +8602,7 @@ public final Flowable flatMap(Function mapper) { @@ -8397,6 +8626,7 @@ public final Completable flatMapCompletable(Function mapper, boolean delayErrors, int maxConcurrency) { @@ -8428,6 +8658,7 @@ public final Completable flatMapCompletable(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMapIterable(final Function> mapper) { @@ -8459,6 +8690,7 @@ public final Flowable flatMapIterable(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMapIterable(final Function> mapper, int bufferSize) { @@ -8494,6 +8726,7 @@ public final Flowable flatMapIterable(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMapIterable(final Function> mapper, @@ -8535,6 +8768,7 @@ public final Flowable flatMapIterable(final FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMapIterable(final Function> mapper, @@ -8557,6 +8791,7 @@ public final Flowable flatMapIterable(final Function Flowable flatMapMaybe(Function> mapper) { @@ -8581,6 +8816,7 @@ public final Flowable flatMapMaybe(Function Flowable flatMapMaybe(Function> mapper, boolean delayErrors, int maxConcurrency) { @@ -8602,6 +8838,7 @@ public final Flowable flatMapMaybe(Function Flowable flatMapSingle(Function> mapper) { @@ -8626,6 +8863,7 @@ public final Flowable flatMapSingle(Function Flowable flatMapSingle(Function> mapper, boolean delayErrors, int maxConcurrency) { @@ -8654,6 +8892,7 @@ public final Flowable flatMapSingle(FunctionReactiveX operators documentation: Subscribe */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEach(Consumer onNext) { @@ -8679,6 +8918,7 @@ public final Disposable forEach(Consumer onNext) { * if {@code onNext} is null * @see ReactiveX operators documentation: Subscribe */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(Predicate onNext) { @@ -8707,6 +8947,7 @@ public final Disposable forEachWhile(Predicate onNext) { * if {@code onError} is null * @see ReactiveX operators documentation: Subscribe */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(Predicate onNext, Consumer onError) { @@ -8738,6 +8979,7 @@ public final Disposable forEachWhile(Predicate onNext, ConsumerReactiveX operators documentation: Subscribe */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(final Predicate onNext, final Consumer onError, @@ -8784,6 +9026,7 @@ public final Disposable forEachWhile(final Predicate onNext, final Co * key value * @see ReactiveX operators documentation: GroupBy */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> groupBy(Function keySelector) { @@ -8826,6 +9069,7 @@ public final Flowable> groupBy(FunctionReactiveX operators documentation: GroupBy */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> groupBy(Function keySelector, boolean delayError) { @@ -8869,6 +9113,7 @@ public final Flowable> groupBy(FunctionReactiveX operators documentation: GroupBy */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> groupBy(Function keySelector, @@ -8916,6 +9161,7 @@ public final Flowable> groupBy(FunctionReactiveX operators documentation: GroupBy */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> groupBy(Function keySelector, @@ -8965,6 +9211,7 @@ public final Flowable> groupBy(FunctionReactiveX operators documentation: GroupBy */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> groupBy(Function keySelector, @@ -9011,6 +9258,7 @@ public final Flowable> groupBy(FunctionReactiveX operators documentation: Join */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable groupJoin( @@ -9038,6 +9286,7 @@ public final Flowable groupJoin( * * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable hide() { @@ -9060,6 +9309,7 @@ public final Flowable hide() { * called by the source Publisher * @see ReactiveX operators documentation: IgnoreElements */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Completable ignoreElements() { @@ -9084,6 +9334,7 @@ public final Completable ignoreElements() { * @return a Flowable that emits a Boolean * @see ReactiveX operators documentation: Contains */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single isEmpty() { @@ -9124,6 +9375,7 @@ public final Single isEmpty() { * overlapping durations * @see ReactiveX operators documentation: Join */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable join( @@ -9152,6 +9404,7 @@ public final Flowable join( * @return a new Maybe instance * @see ReactiveX operators documentation: Last */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Maybe lastElement() { @@ -9176,6 +9429,7 @@ public final Maybe lastElement() { * @return the new Single instance * @see ReactiveX operators documentation: Last */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single last(T defaultItem) { @@ -9199,6 +9453,7 @@ public final Single last(T defaultItem) { * @return the new Single instance * @see ReactiveX operators documentation: Last */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single lastOrError() { @@ -9235,6 +9490,7 @@ public final Single lastOrError() { * @return a Flowable that is the result of applying the lifted Operator to the source Publisher * @see RxJava wiki: Implementing Your Own Operators */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable lift(FlowableOperator lifter) { @@ -9262,6 +9518,7 @@ public final Flowable lift(FlowableOperator lifte * function * @see ReactiveX operators documentation: Map */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable map(Function mapper) { @@ -9286,6 +9543,7 @@ public final Flowable map(Function mapper) { * of the source Publisher * @see ReactiveX operators documentation: Materialize */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> materialize() { @@ -9312,6 +9570,7 @@ public final Flowable> materialize() { * @return a Flowable that emits all of the items emitted by the source Publishers * @see ReactiveX operators documentation: Merge */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable mergeWith(Publisher other) { @@ -9348,6 +9607,7 @@ public final Flowable mergeWith(Publisher other) { * @see #observeOn(Scheduler, boolean) * @see #observeOn(Scheduler, boolean, int) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable observeOn(Scheduler scheduler) { @@ -9384,6 +9644,7 @@ public final Flowable observeOn(Scheduler scheduler) { * @see #observeOn(Scheduler) * @see #observeOn(Scheduler, boolean, int) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable observeOn(Scheduler scheduler, boolean delayError) { @@ -9421,6 +9682,7 @@ public final Flowable observeOn(Scheduler scheduler, boolean delayError) { * @see #observeOn(Scheduler) * @see #observeOn(Scheduler, boolean) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable observeOn(Scheduler scheduler, boolean delayError, int bufferSize) { @@ -9447,6 +9709,7 @@ public final Flowable observeOn(Scheduler scheduler, boolean delayError, int * @return a Flowable that emits items from the source Publisher of type {@code clazz} * @see ReactiveX operators documentation: Filter */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable ofType(final Class clazz) { @@ -9470,6 +9733,7 @@ public final Flowable ofType(final Class clazz) { * @return the source Publisher modified to buffer items to the extent system resources allow * @see ReactiveX operators documentation: backpressure operators */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer() { @@ -9495,6 +9759,7 @@ public final Flowable onBackpressureBuffer() { * @return the source Publisher modified to buffer items to the extent system resources allow * @see ReactiveX operators documentation: backpressure operators */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(boolean delayError) { @@ -9521,6 +9786,7 @@ public final Flowable onBackpressureBuffer(boolean delayError) { * @see ReactiveX operators documentation: backpressure operators * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(int capacity) { @@ -9551,6 +9817,7 @@ public final Flowable onBackpressureBuffer(int capacity) { * @see ReactiveX operators documentation: backpressure operators * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(int capacity, boolean delayError) { @@ -9583,6 +9850,7 @@ public final Flowable onBackpressureBuffer(int capacity, boolean delayError) * @see ReactiveX operators documentation: backpressure operators * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded) { @@ -9617,6 +9885,7 @@ public final Flowable onBackpressureBuffer(int capacity, boolean delayError, * @see ReactiveX operators documentation: backpressure operators * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded, @@ -9646,6 +9915,7 @@ public final Flowable onBackpressureBuffer(int capacity, boolean delayError, * @see ReactiveX operators documentation: backpressure operators * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(int capacity, Action onOverflow) { @@ -9685,6 +9955,7 @@ public final Flowable onBackpressureBuffer(int capacity, Action onOverflow) { * @see ReactiveX operators documentation: backpressure operators * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(long capacity, Action onOverflow, BackpressureOverflowStrategy overflowStrategy) { @@ -9712,6 +9983,7 @@ public final Flowable onBackpressureBuffer(long capacity, Action onOverflow, * @return the source Publisher modified to drop {@code onNext} notifications on overflow * @see ReactiveX operators documentation: backpressure operators */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureDrop() { @@ -9739,6 +10011,7 @@ public final Flowable onBackpressureDrop() { * @see ReactiveX operators documentation: backpressure operators * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureDrop(Consumer onDrop) { @@ -9772,6 +10045,7 @@ public final Flowable onBackpressureDrop(Consumer onDrop) { * @return the source Publisher modified so that it emits the most recently-received item upon request * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureLatest() { @@ -9813,6 +10087,7 @@ public final Flowable onBackpressureLatest() { * @return the original Publisher, with appropriately modified behavior * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onErrorResumeNext(Function> resumeFunction) { @@ -9855,6 +10130,7 @@ public final Flowable onErrorResumeNext(FunctionReactiveX operators documentation: Catch */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onErrorResumeNext(final Publisher next) { @@ -9893,6 +10169,7 @@ public final Flowable onErrorResumeNext(final Publisher next) { * @return the original Publisher with appropriately modified behavior * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onErrorReturn(Function valueSupplier) { @@ -9931,6 +10208,7 @@ public final Flowable onErrorReturn(Function * @return the original Publisher with appropriately modified behavior * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onErrorReturnItem(final T item) { @@ -9976,6 +10254,7 @@ public final Flowable onErrorReturnItem(final T item) { * @return the original Publisher, with appropriately modified behavior * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onExceptionResumeNext(final Publisher next) { @@ -9997,6 +10276,7 @@ public final Flowable onExceptionResumeNext(final Publisher next * the sequence is terminated or downstream cancels * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onTerminateDetach() { @@ -10022,6 +10302,7 @@ public final Flowable onTerminateDetach() { * to its {@link Subscriber}s * @see ReactiveX operators documentation: Publish */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final ConnectableFlowable publish() { @@ -10053,6 +10334,7 @@ public final ConnectableFlowable publish() { * @return a Flowable that emits the results of invoking the selector on the items emitted by a {@link ConnectableFlowable} that shares a single subscription to the underlying sequence * @see ReactiveX operators documentation: Publish */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable publish(Function, ? extends Publisher> selector) { @@ -10086,6 +10368,7 @@ public final Flowable publish(Function, ? extends Pub * @return a Flowable that emits the results of invoking the selector on the items emitted by a {@link ConnectableFlowable} that shares a single subscription to the underlying sequence * @see ReactiveX operators documentation: Publish */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable publish(Function, ? extends Publisher> selector, int prefetch) { @@ -10115,6 +10398,7 @@ public final Flowable publish(Function, ? extends Pub * to its {@link Subscriber}s * @see ReactiveX operators documentation: Publish */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final ConnectableFlowable publish(int bufferSize) { @@ -10140,6 +10424,7 @@ public final ConnectableFlowable publish(int bufferSize) { * @return the Publisher that rebatches request amounts from downstream * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable rebatchRequests(int n) { @@ -10175,6 +10460,7 @@ public final Flowable rebatchRequests(int n) { * @see ReactiveX operators documentation: Reduce * @see Wikipedia: Fold (higher-order function) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Maybe reduce(BiFunction reducer) { @@ -10226,6 +10512,7 @@ public final Maybe reduce(BiFunction reducer) { * @see ReactiveX operators documentation: Reduce * @see Wikipedia: Fold (higher-order function) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single reduce(R seed, BiFunction reducer) { @@ -10276,6 +10563,7 @@ public final Single reduce(R seed, BiFunction reducer) { * @see ReactiveX operators documentation: Reduce * @see Wikipedia: Fold (higher-order function) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single reduceWith(Callable seedSupplier, BiFunction reducer) { @@ -10297,6 +10585,7 @@ public final Single reduceWith(Callable seedSupplier, BiFunctionReactiveX operators documentation: Repeat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeat() { @@ -10325,6 +10614,7 @@ public final Flowable repeat() { * if {@code count} is less than zero * @see ReactiveX operators documentation: Repeat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeat(long times) { @@ -10358,6 +10648,7 @@ public final Flowable repeat(long times) { * if {@code stop} is null * @see ReactiveX operators documentation: Repeat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeatUntil(BooleanSupplier stop) { @@ -10387,6 +10678,7 @@ public final Flowable repeatUntil(BooleanSupplier stop) { * @return the source Publisher modified with repeat logic * @see ReactiveX operators documentation: Repeat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeatWhen(final Function, ? extends Publisher> handler) { @@ -10414,6 +10706,7 @@ public final Flowable repeatWhen(final Function, ? e * items to its {@link Subscriber}s * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final ConnectableFlowable replay() { @@ -10443,6 +10736,7 @@ public final ConnectableFlowable replay() { * {@link ConnectableFlowable} that shares a single subscription to the source Publisher * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable replay(Function, ? extends Publisher> selector) { @@ -10477,6 +10771,7 @@ public final Flowable replay(Function, ? extends Publ * replaying no more than {@code bufferSize} items * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable replay(Function, ? extends Publisher> selector, final int bufferSize) { @@ -10516,6 +10811,7 @@ public final Flowable replay(Function, ? extends Publ * {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable replay(Function, ? extends Publisher> selector, int bufferSize, long time, TimeUnit unit) { @@ -10558,6 +10854,7 @@ public final Flowable replay(Function, ? extends Publ * if {@code bufferSize} is less than zero * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable replay(Function, ? extends Publisher> selector, final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler) { @@ -10596,6 +10893,7 @@ public final Flowable replay(Function, ? extends Publ * replaying no more than {@code bufferSize} notifications * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable replay(final Function, ? extends Publisher> selector, final int bufferSize, final Scheduler scheduler) { @@ -10633,6 +10931,7 @@ public final Flowable replay(final Function, ? extend * replaying all items that were emitted within the window defined by {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable replay(Function, ? extends Publisher> selector, long time, TimeUnit unit) { @@ -10670,6 +10969,7 @@ public final Flowable replay(Function, ? extends Publ * replaying all items that were emitted within the window defined by {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable replay(Function, ? extends Publisher> selector, final long time, final TimeUnit unit, final Scheduler scheduler) { @@ -10705,6 +11005,7 @@ public final Flowable replay(Function, ? extends Publ * replaying all items * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable replay(final Function, ? extends Publisher> selector, final Scheduler scheduler) { @@ -10736,6 +11037,7 @@ public final Flowable replay(final Function, ? extend * replays at most {@code bufferSize} items emitted by that Publisher * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final ConnectableFlowable replay(final int bufferSize) { @@ -10769,6 +11071,7 @@ public final ConnectableFlowable replay(final int bufferSize) { * {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final ConnectableFlowable replay(int bufferSize, long time, TimeUnit unit) { @@ -10806,6 +11109,7 @@ public final ConnectableFlowable replay(int bufferSize, long time, TimeUnit u * if {@code bufferSize} is less than zero * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final ConnectableFlowable replay(final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler) { @@ -10839,6 +11143,7 @@ public final ConnectableFlowable replay(final int bufferSize, final long time * replays at most {@code bufferSize} items that were emitted by the Publisher * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final ConnectableFlowable replay(final int bufferSize, final Scheduler scheduler) { @@ -10870,6 +11175,7 @@ public final ConnectableFlowable replay(final int bufferSize, final Scheduler * replays the items that were emitted during the window defined by {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final ConnectableFlowable replay(long time, TimeUnit unit) { @@ -10902,6 +11208,7 @@ public final ConnectableFlowable replay(long time, TimeUnit unit) { * replays the items that were emitted during the window defined by {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final ConnectableFlowable replay(final long time, final TimeUnit unit, final Scheduler scheduler) { @@ -10933,6 +11240,7 @@ public final ConnectableFlowable replay(final long time, final TimeUnit unit, * {@link Scheduler} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final ConnectableFlowable replay(final Scheduler scheduler) { @@ -10964,6 +11272,7 @@ public final ConnectableFlowable replay(final Scheduler scheduler) { * @return the source Publisher modified with retry logic * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retry() { @@ -10990,6 +11299,7 @@ public final Flowable retry() { * @see #retry() * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retry(BiPredicate predicate) { @@ -11025,6 +11335,7 @@ public final Flowable retry(BiPredicate p * @return the source Publisher modified with retry logic * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retry(long count) { @@ -11045,6 +11356,7 @@ public final Flowable retry(long count) { * @param predicate the predicate called with the failure Throwable and should return true to trigger a retry. * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retry(long times, Predicate predicate) { @@ -11069,6 +11381,7 @@ public final Flowable retry(long times, Predicate predicat * @param predicate the predicate that receives the failure Throwable and should return true to trigger a retry. * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retry(Predicate predicate) { @@ -11087,6 +11400,7 @@ public final Flowable retry(Predicate predicate) { * @param stop the function that should return true to stop retrying * @return the new Flowable instance */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retryUntil(final BooleanSupplier stop) { @@ -11145,6 +11459,7 @@ public final Flowable retryUntil(final BooleanSupplier stop) { * @return the source Publisher modified with retry logic * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retryWhen( @@ -11201,6 +11516,7 @@ public final void safeSubscribe(Subscriber s) { * @see RxJava wiki: Backpressure * @see #throttleLast(long, TimeUnit) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable sample(long period, TimeUnit unit) { @@ -11231,6 +11547,7 @@ public final Flowable sample(long period, TimeUnit unit) { * @see RxJava wiki: Backpressure * @see #throttleLast(long, TimeUnit, Scheduler) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable sample(long period, TimeUnit unit, Scheduler scheduler) { @@ -11261,6 +11578,7 @@ public final Flowable sample(long period, TimeUnit unit, Scheduler scheduler) * @see ReactiveX operators documentation: Sample * @see RxJava wiki: Backpressure */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable sample(Publisher sampler) { @@ -11292,6 +11610,7 @@ public final Flowable sample(Publisher sampler) { * @return a Flowable that emits the results of each call to the accumulator function * @see ReactiveX operators documentation: Scan */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable scan(BiFunction accumulator) { @@ -11344,6 +11663,7 @@ public final Flowable scan(BiFunction accumulator) { * accumulator function * @see ReactiveX operators documentation: Scan */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable scan(final R initialValue, BiFunction accumulator) { @@ -11398,6 +11718,7 @@ public final Flowable scan(final R initialValue, BiFunctionReactiveX operators documentation: Scan */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable scanWith(Callable seedSupplier, BiFunction accumulator) { @@ -11429,6 +11750,7 @@ public final Flowable scanWith(Callable seedSupplier, BiFunctionReactiveX operators documentation: Serialize */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable serialize() { @@ -11456,6 +11778,7 @@ public final Flowable serialize() { * to its {@link Subscriber}s * @see ReactiveX operators documentation: RefCount */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable share() { @@ -11479,6 +11802,7 @@ public final Flowable share() { * @return a Maybe that emits the single item emitted by the source Publisher * @see ReactiveX operators documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Maybe singleElement() { @@ -11505,6 +11829,7 @@ public final Maybe singleElement() { * the source Publisher is empty * @see ReactiveX operators documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single single(T defaultItem) { @@ -11530,6 +11855,7 @@ public final Single single(T defaultItem) { * @return the new Single instance * @see ReactiveX operators documentation: First */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single singleOrError() { @@ -11555,6 +11881,7 @@ public final Single singleOrError() { * {@code count} items that the source Publisher emits * @see ReactiveX operators documentation: Skip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skip(long count) { @@ -11586,6 +11913,7 @@ public final Flowable skip(long count) { * by {@code time} elapses and the emits the remainder * @see ReactiveX operators documentation: Skip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skip(long time, TimeUnit unit) { @@ -11615,6 +11943,7 @@ public final Flowable skip(long time, TimeUnit unit) { * by {@code time} and {@code scheduler} elapses, and then emits the remainder * @see ReactiveX operators documentation: Skip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable skip(long time, TimeUnit unit, Scheduler scheduler) { @@ -11646,6 +11975,7 @@ public final Flowable skip(long time, TimeUnit unit, Scheduler scheduler) { * if {@code count} is less than zero * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skipLast(int count) { @@ -11682,6 +12012,7 @@ public final Flowable skipLast(int count) { * source completes defined by {@code time} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skipLast(long time, TimeUnit unit) { @@ -11715,6 +12046,7 @@ public final Flowable skipLast(long time, TimeUnit unit) { * source completes defined by {@code time} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skipLast(long time, TimeUnit unit, boolean delayError) { @@ -11746,6 +12078,7 @@ public final Flowable skipLast(long time, TimeUnit unit, boolean delayError) * source completes defined by {@code time} and {@code scheduler} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler) { @@ -11780,6 +12113,7 @@ public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler) * source completes defined by {@code time} and {@code scheduler} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError) { @@ -11816,6 +12150,7 @@ public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler, * source completes defined by {@code time} and {@code scheduler} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { @@ -11848,6 +12183,7 @@ public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler, * item, then emits the remaining items * @see ReactiveX operators documentation: SkipUntil */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skipUntil(Publisher other) { @@ -11874,6 +12210,7 @@ public final Flowable skipUntil(Publisher other) { * predicate becomes false * @see ReactiveX operators documentation: SkipWhile */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skipWhile(Predicate predicate) { @@ -11901,6 +12238,7 @@ public final Flowable skipWhile(Predicate predicate) { * * @return a Flowable that emits the items emitted by the source Publisher in sorted order */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable sorted() { @@ -11927,6 +12265,7 @@ public final Flowable sorted() { * that indicates their sort order * @return a Flowable that emits the items emitted by the source Publisher in sorted order */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable sorted(Comparator sortFunction) { @@ -11954,6 +12293,7 @@ public final Flowable sorted(Comparator sortFunction) { * @see ReactiveX operators documentation: StartWith */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable startWith(Iterable items) { @@ -11981,6 +12321,7 @@ public final Flowable startWith(Iterable items) { * @see ReactiveX operators documentation: StartWith */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable startWith(Publisher other) { @@ -12009,6 +12350,7 @@ public final Flowable startWith(Publisher other) { * @see ReactiveX operators documentation: StartWith */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable startWith(T value) { @@ -12037,6 +12379,7 @@ public final Flowable startWith(T value) { * @see ReactiveX operators documentation: StartWith */ @SuppressWarnings("unchecked") + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable startWithArray(T... items) { @@ -12090,6 +12433,7 @@ public final Disposable subscribe() { * if {@code onNext} is null * @see ReactiveX operators documentation: Subscribe */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext) { @@ -12120,6 +12464,7 @@ public final Disposable subscribe(Consumer onNext) { * if {@code onNext} is null, or * if {@code onError} is null */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext, Consumer onError) { @@ -12153,6 +12498,7 @@ public final Disposable subscribe(Consumer onNext, ConsumerReactiveX operators documentation: Subscribe */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext, Consumer onError, @@ -12189,6 +12535,7 @@ public final Disposable subscribe(Consumer onNext, ConsumerReactiveX operators documentation: Subscribe */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext, Consumer onError, @@ -12253,7 +12600,7 @@ public final void subscribe(Subscriber s) { * * composite.add(source.subscribeWith(rs)); * - * + * *
*
Backpressure:
*
The backpressure behavior/expectation is determined by the supplied {@code Subscriber}.
@@ -12294,6 +12641,7 @@ public final > E subscribeWith(E subscriber) { * @see RxJava Threading Examples * @see #observeOn */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable subscribeOn(Scheduler scheduler) { @@ -12322,6 +12670,7 @@ public final Flowable subscribeOn(Scheduler scheduler) { * alternate Publisher if the source Publisher is empty. * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable switchIfEmpty(Publisher other) { @@ -12355,6 +12704,7 @@ public final Flowable switchIfEmpty(Publisher other) { * @return a Flowable that emits the items emitted by the Publisher returned from applying {@code func} to the most recently emitted item emitted by the source Publisher * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable switchMap(Function> mapper) { @@ -12389,6 +12739,7 @@ public final Flowable switchMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable switchMap(Function> mapper, int bufferSize) { @@ -12423,6 +12774,7 @@ public final Flowable switchMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable switchMapDelayError(Function> mapper) { @@ -12459,6 +12811,7 @@ public final Flowable switchMapDelayError(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable switchMapDelayError(Function> mapper, int bufferSize) { @@ -12503,6 +12856,7 @@ Flowable switchMap0(Function> * all of the items from the source Publisher if that Publisher emits fewer than {@code count} items * @see ReactiveX operators documentation: Take */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) // may trigger UNBOUNDED_IN @SchedulerSupport(SchedulerSupport.NONE) public final Flowable take(long count) { @@ -12532,6 +12886,7 @@ public final Flowable take(long count) { * @return a Flowable that emits those items emitted by the source Publisher before the time runs out * @see ReactiveX operators documentation: Take */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable take(long time, TimeUnit unit) { @@ -12561,6 +12916,7 @@ public final Flowable take(long time, TimeUnit unit) { * according to the specified Scheduler * @see ReactiveX operators documentation: Take */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable take(long time, TimeUnit unit, Scheduler scheduler) { @@ -12588,6 +12944,7 @@ public final Flowable take(long time, TimeUnit unit, Scheduler scheduler) { * if {@code count} is less than zero * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable takeLast(int count) { @@ -12627,6 +12984,7 @@ public final Flowable takeLast(int count) { * in a specified window of time before the Publisher completed * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable takeLast(long count, long time, TimeUnit unit) { @@ -12662,6 +13020,7 @@ public final Flowable takeLast(long count, long time, TimeUnit unit) { * if {@code count} is less than zero * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable takeLast(long count, long time, TimeUnit unit, Scheduler scheduler) { @@ -12702,6 +13061,7 @@ public final Flowable takeLast(long count, long time, TimeUnit unit, Schedule * if {@code count} is less than zero * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable takeLast(long count, long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { @@ -12738,6 +13098,7 @@ public final Flowable takeLast(long count, long time, TimeUnit unit, Schedule * time before the Publisher completed specified by {@code time} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable takeLast(long time, TimeUnit unit) { @@ -12771,6 +13132,7 @@ public final Flowable takeLast(long time, TimeUnit unit) { * time before the Publisher completed specified by {@code time} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable takeLast(long time, TimeUnit unit, boolean delayError) { @@ -12804,6 +13166,7 @@ public final Flowable takeLast(long time, TimeUnit unit, boolean delayError) * provided by {@code scheduler} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable takeLast(long time, TimeUnit unit, Scheduler scheduler) { @@ -12840,6 +13203,7 @@ public final Flowable takeLast(long time, TimeUnit unit, Scheduler scheduler) * provided by {@code scheduler} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable takeLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError) { @@ -12878,6 +13242,7 @@ public final Flowable takeLast(long time, TimeUnit unit, Scheduler scheduler, * provided by {@code scheduler} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable takeLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { @@ -12909,6 +13274,7 @@ public final Flowable takeLast(long time, TimeUnit unit, Scheduler scheduler, * @see Flowable#takeWhile(Predicate) * @since 1.1.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable takeUntil(Predicate stopPredicate) { @@ -12937,6 +13303,7 @@ public final Flowable takeUntil(Predicate stopPredicate) { * @return a Flowable that emits the items emitted by the source Publisher until such time as {@code other} emits its first item * @see ReactiveX operators documentation: TakeUntil */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable takeUntil(Publisher other) { @@ -12964,6 +13331,7 @@ public final Flowable takeUntil(Publisher other) { * @see ReactiveX operators documentation: TakeWhile * @see Flowable#takeUntil(Predicate) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable takeWhile(Predicate predicate) { @@ -12994,6 +13362,7 @@ public final Flowable takeWhile(Predicate predicate) { * @see ReactiveX operators documentation: Sample * @see RxJava wiki: Backpressure */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable throttleFirst(long windowDuration, TimeUnit unit) { @@ -13026,6 +13395,7 @@ public final Flowable throttleFirst(long windowDuration, TimeUnit unit) { * @see ReactiveX operators documentation: Sample * @see RxJava wiki: Backpressure */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable throttleFirst(long skipDuration, TimeUnit unit, Scheduler scheduler) { @@ -13059,6 +13429,7 @@ public final Flowable throttleFirst(long skipDuration, TimeUnit unit, Schedul * @see RxJava wiki: Backpressure * @see #sample(long, TimeUnit) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable throttleLast(long intervalDuration, TimeUnit unit) { @@ -13093,6 +13464,7 @@ public final Flowable throttleLast(long intervalDuration, TimeUnit unit) { * @see RxJava wiki: Backpressure * @see #sample(long, TimeUnit, Scheduler) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable throttleLast(long intervalDuration, TimeUnit unit, Scheduler scheduler) { @@ -13133,6 +13505,7 @@ public final Flowable throttleLast(long intervalDuration, TimeUnit unit, Sche * @see RxJava wiki: Backpressure * @see #debounce(long, TimeUnit) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable throttleWithTimeout(long timeout, TimeUnit unit) { @@ -13177,6 +13550,7 @@ public final Flowable throttleWithTimeout(long timeout, TimeUnit unit) { * @see RxJava wiki: Backpressure * @see #debounce(long, TimeUnit, Scheduler) */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable throttleWithTimeout(long timeout, TimeUnit unit, Scheduler scheduler) { @@ -13200,6 +13574,7 @@ public final Flowable throttleWithTimeout(long timeout, TimeUnit unit, Schedu * @return a Flowable that emits time interval information items * @see ReactiveX operators documentation: TimeInterval */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> timeInterval() { @@ -13225,6 +13600,7 @@ public final Flowable> timeInterval() { * @return a Flowable that emits time interval information items * @see ReactiveX operators documentation: TimeInterval */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Flowable> timeInterval(Scheduler scheduler) { @@ -13249,6 +13625,7 @@ public final Flowable> timeInterval(Scheduler scheduler) { * @return a Flowable that emits time interval information items * @see ReactiveX operators documentation: TimeInterval */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> timeInterval(TimeUnit unit) { @@ -13275,6 +13652,7 @@ public final Flowable> timeInterval(TimeUnit unit) { * @return a Flowable that emits time interval information items * @see ReactiveX operators documentation: TimeInterval */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Flowable> timeInterval(TimeUnit unit, Scheduler scheduler) { @@ -13312,6 +13690,7 @@ public final Flowable> timeInterval(TimeUnit unit, Scheduler scheduler) * the time window defined by the selector for the previously emitted item * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable timeout(Function> itemTimeoutIndicator) { @@ -13349,6 +13728,7 @@ public final Flowable timeout(Function> * by the selector for the previously emitted item * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable timeout(Function> itemTimeoutIndicator, Flowable other) { @@ -13378,6 +13758,7 @@ public final Flowable timeout(Function> * timeout * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable timeout(long timeout, TimeUnit timeUnit) { @@ -13409,6 +13790,7 @@ public final Flowable timeout(long timeout, TimeUnit timeUnit) { * @return the source Publisher modified to switch to the fallback Publisher in case of a timeout * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable timeout(long timeout, TimeUnit timeUnit, Flowable other) { @@ -13444,6 +13826,7 @@ public final Flowable timeout(long timeout, TimeUnit timeUnit, FlowableReactiveX operators documentation: Timeout */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler, Flowable other) { @@ -13476,6 +13859,7 @@ public final Flowable timeout(long timeout, TimeUnit timeUnit, Scheduler sche * timeout * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler) { @@ -13513,6 +13897,7 @@ public final Flowable timeout(long timeout, TimeUnit timeUnit, Scheduler sche * the time windows specified by the timeout selectors * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable timeout(Publisher firstTimeoutIndicator, @@ -13557,6 +13942,7 @@ public final Flowable timeout(Publisher firstTimeoutIndicator, * if {@code itemTimeoutIndicator} is null * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable timeout( @@ -13600,6 +13986,7 @@ private Flowable timeout0( * @return a Flowable that emits timestamped items from the source Publisher * @see ReactiveX operators documentation: Timestamp */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> timestamp() { @@ -13626,6 +14013,7 @@ public final Flowable> timestamp() { * the {@code scheduler} * @see ReactiveX operators documentation: Timestamp */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Flowable> timestamp(Scheduler scheduler) { @@ -13650,6 +14038,7 @@ public final Flowable> timestamp(Scheduler scheduler) { * @return a Flowable that emits timestamped items from the source Publisher * @see ReactiveX operators documentation: Timestamp */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> timestamp(TimeUnit unit) { @@ -13677,6 +14066,7 @@ public final Flowable> timestamp(TimeUnit unit) { * the {@code scheduler} * @see ReactiveX operators documentation: Timestamp */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Flowable> timestamp(final TimeUnit unit, final Scheduler scheduler) { @@ -13699,6 +14089,7 @@ public final Flowable> timestamp(final TimeUnit unit, final Scheduler s * @param converter the function that receives the current Flowable instance and returns a value * @return the value returned by the function */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final R to(Function, R> converter) { @@ -13736,6 +14127,7 @@ public final R to(Function, R> converter) { * Publisher * @see ReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toList() { @@ -13770,6 +14162,7 @@ public final Single> toList() { * Publisher * @see ReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toList(final int capacityHint) { @@ -13806,6 +14199,7 @@ public final Single> toList(final int capacityHint) { * Publisher * @see ReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final > Single toList(Callable collectionSupplier) { @@ -13835,6 +14229,7 @@ public final > Single toList(Callable coll * Publisher * @see ReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap(final Function keySelector) { @@ -13868,6 +14263,7 @@ public final Single> toMap(final Function * Publisher * @see ReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap(final Function keySelector, final Function valueSelector) { @@ -13901,6 +14297,7 @@ public final Single> toMap(final FunctionReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap(final Function keySelector, @@ -13930,6 +14327,7 @@ public final Single> toMap(final FunctionReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap(Function keySelector) { @@ -13963,6 +14361,7 @@ public final Single>> toMultimap(FunctionReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap(Function keySelector, Function valueSelector) { @@ -13999,6 +14398,7 @@ public final Single>> toMultimap(FunctionReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap( @@ -14039,6 +14439,7 @@ public final Single>> toMultimap( * Publisher * @see ReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap( @@ -14061,6 +14462,7 @@ public final Single>> toMultimap( * @return the new Publisher instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Observable toObservable() { @@ -14088,6 +14490,7 @@ public final Observable toObservable() { * sorted order * @see ReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList() { @@ -14114,6 +14517,7 @@ public final Single> toSortedList() { * sorted order * @see ReactiveX operators documentation: To */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList(final Comparator comparator) { @@ -14144,6 +14548,7 @@ public final Single> toSortedList(final Comparator comparator * @see ReactiveX operators documentation: To * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList(final Comparator comparator, int capacityHint) { @@ -14176,6 +14581,7 @@ public final Single> toSortedList(final Comparator comparator * @see ReactiveX operators documentation: To * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList(int capacityHint) { @@ -14199,6 +14605,7 @@ public final Single> toSortedList(int capacityHint) { * {@link Scheduler} * @see ReactiveX operators documentation: SubscribeOn */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable unsubscribeOn(Scheduler scheduler) { @@ -14228,6 +14635,7 @@ public final Flowable unsubscribeOn(Scheduler scheduler) { * @throws IllegalArgumentException if either count is non-positive * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(long count) { @@ -14259,6 +14667,7 @@ public final Flowable> window(long count) { * @throws IllegalArgumentException if either count or skip is non-positive * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(long count, long skip) { @@ -14292,6 +14701,7 @@ public final Flowable> window(long count, long skip) { * @throws IllegalArgumentException if either count or skip is non-positive * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(long count, long skip, int bufferSize) { @@ -14329,6 +14739,7 @@ public final Flowable> window(long count, long skip, int bufferSize) * @return a Flowable that emits new windows periodically as a fixed timespan elapses * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable> window(long timespan, long timeskip, TimeUnit unit) { @@ -14365,6 +14776,7 @@ public final Flowable> window(long timespan, long timeskip, TimeUnit * @return a Flowable that emits new windows periodically as a fixed timespan elapses * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler) { @@ -14403,6 +14815,7 @@ public final Flowable> window(long timespan, long timeskip, TimeUnit * @return a Flowable that emits new windows periodically as a fixed timespan elapses * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler, int bufferSize) { @@ -14440,6 +14853,7 @@ public final Flowable> window(long timespan, long timeskip, TimeUnit * source Publisher during fixed, consecutive durations * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable> window(long timespan, TimeUnit unit) { @@ -14476,6 +14890,7 @@ public final Flowable> window(long timespan, TimeUnit unit) { * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable> window(long timespan, TimeUnit unit, @@ -14515,6 +14930,7 @@ public final Flowable> window(long timespan, TimeUnit unit, * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable> window(long timespan, TimeUnit unit, @@ -14551,6 +14967,7 @@ public final Flowable> window(long timespan, TimeUnit unit, * source Publisher within a fixed duration * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> window(long timespan, TimeUnit unit, @@ -14590,6 +15007,7 @@ public final Flowable> window(long timespan, TimeUnit unit, * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> window(long timespan, TimeUnit unit, @@ -14631,6 +15049,7 @@ public final Flowable> window(long timespan, TimeUnit unit, * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> window(long timespan, TimeUnit unit, @@ -14674,6 +15093,7 @@ public final Flowable> window(long timespan, TimeUnit unit, * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> window( @@ -14709,6 +15129,7 @@ public final Flowable> window( * Publisher * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(Publisher boundaryIndicator) { @@ -14740,6 +15161,7 @@ public final Flowable> window(Publisher boundaryIndicator) { * Publisher * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(Publisher boundaryIndicator, int bufferSize) { @@ -14775,6 +15197,7 @@ public final Flowable> window(Publisher boundaryIndicator, in * the specified window-governing Publishers * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window( @@ -14813,6 +15236,7 @@ public final Flowable> window( * the specified window-governing Publishers * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window( @@ -14849,6 +15273,7 @@ public final Flowable> window( * whenever {@code closingSelector} emits an item * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(Callable> boundaryIndicatorSupplier) { @@ -14883,6 +15308,7 @@ public final Flowable> window(Callable> b * whenever {@code closingSelector} emits an item * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(Callable> boundaryIndicatorSupplier, int bufferSize) { @@ -14918,6 +15344,7 @@ public final Flowable> window(Callable> b * @since 2.0 * @see ReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom(Publisher other, @@ -14954,6 +15381,7 @@ public final Flowable withLatestFrom(Publisher other, * @return the new Publisher instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom(Publisher source1, Publisher source2, @@ -14990,6 +15418,7 @@ public final Flowable withLatestFrom(Publisher source1, Publi * @return the new Publisher instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom( @@ -15030,6 +15459,7 @@ public final Flowable withLatestFrom( * @return the new Publisher instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom( @@ -15063,6 +15493,7 @@ public final Flowable withLatestFrom( * @return the new Publisher instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom(Publisher[] others, Function combiner) { @@ -15094,6 +15525,7 @@ public final Flowable withLatestFrom(Publisher[] others, Function Flowable withLatestFrom(Iterable> others, Function combiner) { @@ -15132,6 +15564,7 @@ public final Flowable withLatestFrom(Iterable> oth * sequence and emits the results of {@code zipFunction} applied to these pairs * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable zipWith(Iterable other, BiFunction zipper) { @@ -15180,6 +15613,7 @@ public final Flowable zipWith(Iterable other, BiFunctionReactiveX operators documentation: Zip */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable zipWith(Publisher other, BiFunction zipper) { @@ -15230,6 +15664,7 @@ public final Flowable zipWith(Publisher other, BiFunction * @see ReactiveX operators documentation: Zip * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable zipWith(Publisher other, @@ -15282,6 +15717,7 @@ public final Flowable zipWith(Publisher other, * @see ReactiveX operators documentation: Zip * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable zipWith(Publisher other, diff --git a/src/main/java/io/reactivex/Maybe.java b/src/main/java/io/reactivex/Maybe.java index 99852baff6..70a0bfca8b 100644 --- a/src/main/java/io/reactivex/Maybe.java +++ b/src/main/java/io/reactivex/Maybe.java @@ -55,6 +55,7 @@ public abstract class Maybe implements MaybeSource { * @param sources the Iterable sequence of sources * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe amb(final Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -72,6 +73,7 @@ public static Maybe amb(final Iterable * @param sources the array of sources * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Maybe ambArray(final MaybeSource... sources) { @@ -98,6 +100,7 @@ public static Maybe ambArray(final MaybeSource... sources) { * @return the new Flowable instance */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -124,6 +127,7 @@ public static Flowable concat(Iterable * @see ReactiveX operators documentation: Concat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable concat(MaybeSource source1, MaybeSource source2) { @@ -154,6 +158,7 @@ public static Flowable concat(MaybeSource source1, MaybeSour * @see ReactiveX operators documentation: Concat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable concat( @@ -188,6 +193,7 @@ public static Flowable concat( * @see ReactiveX operators documentation: Concat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable concat( @@ -215,6 +221,7 @@ public static Flowable concat( * @return the new Flowable instance */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Publisher> sources) { return concat(sources, 2); @@ -237,6 +244,7 @@ public static Flowable concat(Publisher Flowable concat(Publisher> sources, int prefetch) { @@ -258,6 +266,7 @@ public static Flowable concat(Publisher Flowable concatArray(MaybeSource... sources) { @@ -289,6 +298,7 @@ public static Flowable concatArray(MaybeSource... sources) { */ @SuppressWarnings("unchecked") @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatArrayDelayError(MaybeSource... sources) { if (sources.length == 0) { @@ -318,6 +328,7 @@ public static Flowable concatArrayDelayError(MaybeSource... */ @SuppressWarnings({ "rawtypes", "unchecked" }) @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatArrayEager(MaybeSource... sources) { return Flowable.fromArray(sources).concatMapEager((Function)MaybeToPublisher.instance()); @@ -340,6 +351,7 @@ public static Flowable concatArrayEager(MaybeSource... sourc */ @SuppressWarnings({ "unchecked", "rawtypes" }) @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatDelayError(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -363,6 +375,7 @@ public static Flowable concatDelayError(Iterable Flowable concatDelayError(Publisher> sources) { return Flowable.fromPublisher(sources).concatMapDelayError((Function)MaybeToPublisher.instance()); @@ -386,6 +399,7 @@ public static Flowable concatDelayError(Publisher Flowable concatEager(Iterable> sources) { return Flowable.fromIterable(sources).concatMapEager((Function)MaybeToPublisher.instance()); @@ -411,6 +425,7 @@ public static Flowable concatEager(Iterable Flowable concatEager(Publisher> sources) { return Flowable.fromPublisher(sources).concatMapEager((Function)MaybeToPublisher.instance()); @@ -455,6 +470,7 @@ public static Flowable concatEager(Publisher Maybe create(MaybeOnSubscribe onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); @@ -473,6 +489,7 @@ public static Maybe create(MaybeOnSubscribe onSubscribe) { * returns a MaybeSource instance to subscribe to * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe defer(final Callable> maybeSupplier) { ObjectHelper.requireNonNull(maybeSupplier, "maybeSupplier is null"); @@ -491,6 +508,7 @@ public static Maybe defer(final Callable the value type * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Maybe empty() { @@ -515,6 +533,7 @@ public static Maybe empty() { * the subscriber subscribes to it * @see ReactiveX operators documentation: Throw */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe error(Throwable exception) { ObjectHelper.requireNonNull(exception, "exception is null"); @@ -539,6 +558,7 @@ public static Maybe error(Throwable exception) { * the MaybeObserver subscribes to it * @see ReactiveX operators documentation: Throw */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe error(Callable supplier) { ObjectHelper.requireNonNull(supplier, "errorSupplier is null"); @@ -557,6 +577,7 @@ public static Maybe error(Callable supplier) { * @return the new Maybe instance * @throws NullPointerException if run is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromAction(final Action run) { ObjectHelper.requireNonNull(run, "run is null"); @@ -575,6 +596,7 @@ public static Maybe fromAction(final Action run) { * @return the new Maybe instance * @throws NullPointerException if completable is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromCompletable(CompletableSource completableSource) { ObjectHelper.requireNonNull(completableSource, "completableSource is null"); @@ -593,6 +615,7 @@ public static Maybe fromCompletable(CompletableSource completableSource) * @return the new Maybe instance * @throws NullPointerException if single is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromSingle(SingleSource singleSource) { ObjectHelper.requireNonNull(singleSource, "singleSource is null"); @@ -617,6 +640,7 @@ public static Maybe fromSingle(SingleSource singleSource) { * the type of the item emitted by the {@link Maybe}. * @return a {@link Maybe} whose {@link MaybeObserver}s' subscriptions trigger an invocation of the given function. */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromCallable(final Callable callable) { ObjectHelper.requireNonNull(callable, "callable is null"); @@ -649,6 +673,7 @@ public static Maybe fromCallable(final Callable callable) { * @return a Maybe that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromFuture(Future future) { ObjectHelper.requireNonNull(future, "future is null"); @@ -685,6 +710,7 @@ public static Maybe fromFuture(Future future) { * @return a Maybe that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromFuture(Future future, long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(future, "future is null"); @@ -704,6 +730,7 @@ public static Maybe fromFuture(Future future, long timeout, * @return the new Maybe instance * @throws NullPointerException if run is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromRunnable(final Runnable run) { ObjectHelper.requireNonNull(run, "run is null"); @@ -730,6 +757,7 @@ public static Maybe fromRunnable(final Runnable run) { * @return a {@code Maybe} that emits {@code item} * @see ReactiveX operators documentation: Just */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe just(T item) { ObjectHelper.requireNonNull(item, "item is null"); @@ -750,6 +778,7 @@ public static Maybe just(T item) { * @return the new Flowable instance */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Iterable> sources) { return merge(Flowable.fromIterable(sources)); @@ -769,6 +798,7 @@ public static Flowable merge(Iterable> * @return the new Flowable instance */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Publisher> sources) { return merge(sources, Integer.MAX_VALUE); @@ -789,6 +819,7 @@ public static Flowable merge(Publisher * @return the new Flowable instance */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) public static Flowable merge(Publisher> sources, int maxConcurrency) { @@ -813,6 +844,7 @@ public static Flowable merge(Publisher * by {@code source} * @see ReactiveX operators documentation: Merge */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) public static Maybe merge(MaybeSource> source) { @@ -842,6 +874,7 @@ public static Maybe merge(MaybeSource> * @see ReactiveX operators documentation: Merge */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable merge( @@ -877,6 +910,7 @@ public static Flowable merge( * @see ReactiveX operators documentation: Merge */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable merge( @@ -916,6 +950,7 @@ public static Flowable merge( * @see ReactiveX operators documentation: Merge */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable merge( @@ -943,6 +978,7 @@ public static Flowable merge( * @return the new Flowable instance */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable mergeArray(MaybeSource... sources) { @@ -985,6 +1021,7 @@ public static Flowable mergeArray(MaybeSource... sources) { */ @SuppressWarnings({ "unchecked", "rawtypes" }) @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeArrayDelayError(MaybeSource... sources) { return Flowable.fromArray(sources).flatMap((Function)MaybeToPublisher.instance(), true, sources.length); @@ -1020,6 +1057,7 @@ public static Flowable mergeArrayDelayError(MaybeSource... s */ @SuppressWarnings({ "unchecked", "rawtypes" }) @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Iterable> sources) { return Flowable.fromIterable(sources).flatMap((Function)MaybeToPublisher.instance(), true); @@ -1056,6 +1094,7 @@ public static Flowable mergeDelayError(Iterable Flowable mergeDelayError(Publisher> sources) { return Flowable.fromPublisher(sources).flatMap((Function)MaybeToPublisher.instance(), true); @@ -1091,6 +1130,7 @@ public static Flowable mergeDelayError(Publisher Flowable mergeDelayError(MaybeSource source1, MaybeSource source2) { ObjectHelper.requireNonNull(source1, "source1 is null"); @@ -1131,6 +1171,7 @@ public static Flowable mergeDelayError(MaybeSource source1, */ @SuppressWarnings({ "unchecked" }) @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(MaybeSource source1, MaybeSource source2, MaybeSource source3) { @@ -1176,6 +1217,7 @@ public static Flowable mergeDelayError(MaybeSource source1, */ @SuppressWarnings({ "unchecked" }) @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError( MaybeSource source1, MaybeSource source2, @@ -1203,6 +1245,7 @@ public static Flowable mergeDelayError( * @return a Maybe that never emits any items or sends any notifications to a {@link MaybeObserver} * @see ReactiveX operators documentation: Never */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Maybe never() { @@ -1229,6 +1272,7 @@ public static Maybe never() { * @return a Single that emits a Boolean value that indicates whether the two sequences are the same * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(MaybeSource source1, MaybeSource source2) { return sequenceEqual(source1, source2, ObjectHelper.equalsPredicate()); @@ -1257,6 +1301,7 @@ public static Single sequenceEqual(MaybeSource source1 * are the same according to the specified function * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(MaybeSource source1, MaybeSource source2, BiPredicate isEqual) { @@ -1279,6 +1324,7 @@ public static Single sequenceEqual(MaybeSource source1 * @return a Maybe that emits {@code 0L} after a specified delay * @see ReactiveX operators documentation: Timer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Maybe timer(long delay, TimeUnit unit) { return timer(delay, unit, Schedulers.computation()); @@ -1302,6 +1348,7 @@ public static Maybe timer(long delay, TimeUnit unit) { * @return a Maybe that emits {@code 0L} after a specified delay, on a specified Scheduler * @see ReactiveX operators documentation: Timer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Maybe timer(long delay, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -1321,6 +1368,7 @@ public static Maybe timer(long delay, TimeUnit unit, Scheduler scheduler) * @param onSubscribe the function that is called with the subscribing MaybeObserver * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe unsafeCreate(MaybeSource onSubscribe) { if (onSubscribe instanceof Maybe) { @@ -1351,6 +1399,7 @@ public static Maybe unsafeCreate(MaybeSource onSubscribe) { * @return the Maybe whose lifetime controls the lifetime of the dependent resource object * @see ReactiveX operators documentation: Using */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe using(Callable resourceSupplier, Function> sourceSupplier, @@ -1385,6 +1434,7 @@ public static Maybe using(Callable resourceSupplier, * @return the Maybe whose lifetime controls the lifetime of the dependent resource object * @see ReactiveX operators documentation: Using */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe using(Callable resourceSupplier, Function> sourceSupplier, @@ -1406,6 +1456,7 @@ public static Maybe using(Callable resourceSupplier, * @param source the source to wrap * @return the Maybe wrapper or the source cast to Maybe (if possible) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe wrap(MaybeSource source) { if (source instanceof Maybe) { @@ -1442,6 +1493,7 @@ public static Maybe wrap(MaybeSource source) { * @return a Maybe that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip(Iterable> sources, Function zipper) { ObjectHelper.requireNonNull(zipper, "zipper is null"); @@ -1475,6 +1527,7 @@ public static Maybe zip(Iterable> s * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, @@ -1513,6 +1566,7 @@ public static Maybe zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1555,6 +1609,7 @@ public static Maybe zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1602,6 +1657,7 @@ public static Maybe zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1653,6 +1709,7 @@ public static Maybe zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1708,6 +1765,7 @@ public static Maybe zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1768,6 +1826,7 @@ public static Maybe zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1832,6 +1891,7 @@ public static Maybe zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1878,6 +1938,7 @@ public static Maybe zip( * @return a Maybe that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zipArray(Function zipper, MaybeSource... sources) { @@ -1909,6 +1970,7 @@ public static Maybe zipArray(Function z * @see ReactiveX operators documentation: Amb */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe ambWith(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -1924,6 +1986,7 @@ public final Maybe ambWith(MaybeSource other) { *
* @return the success value */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingGet() { BlockingMultiObserver observer = new BlockingMultiObserver(); @@ -1941,6 +2004,7 @@ public final T blockingGet() { * @param defaultValue the default item to return if this Maybe is empty * @return the success value */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingGet(T defaultValue) { ObjectHelper.requireNonNull(defaultValue, "defaultValue is null"); @@ -1968,6 +2032,7 @@ public final T blockingGet(T defaultValue) { * benefit of subsequent subscribers * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe cache() { return RxJavaPlugins.onAssembly(new MaybeCache(this)); @@ -1984,6 +2049,7 @@ public final Maybe cache() { * @param clazz the type token to use for casting the success result from the current Maybe * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe cast(final Class clazz) { ObjectHelper.requireNonNull(clazz, "clazz is null"); @@ -2008,6 +2074,7 @@ public final Maybe cast(final Class clazz) { * @return a Maybe, transformed by the transformer function * @see RxJava wiki: Implementing Your Own Operators */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe compose(MaybeTransformer transformer) { return wrap(transformer.apply(this)); @@ -2029,6 +2096,7 @@ public final Maybe compose(MaybeTransformer transformer) { * @return the Maybe returned from {@code func} when applied to the item emitted by the source Maybe * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe concatMap(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2055,6 +2123,7 @@ public final Maybe concatMap(FunctionReactiveX operators documentation: Concat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatWith(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2077,6 +2146,7 @@ public final Flowable concatWith(MaybeSource other) { * or {@code false} if the source Maybe completes without emitting that item * @see ReactiveX operators documentation: Contains */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single contains(final Object item) { ObjectHelper.requireNonNull(item, "item is null"); @@ -2098,6 +2168,7 @@ public final Single contains(final Object item) { * @see ReactiveX operators documentation: Count * @see #count() */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single count() { return RxJavaPlugins.onAssembly(new MaybeCount(this)); @@ -2119,6 +2190,7 @@ public final Single count() { * items, or the items emitted by the source Maybe * @see ReactiveX operators documentation: DefaultIfEmpty */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe defaultIfEmpty(T defaultItem) { ObjectHelper.requireNonNull(defaultItem, "item is null"); @@ -2143,6 +2215,7 @@ public final Maybe defaultIfEmpty(T defaultItem) { * @return the new Maybe instance * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Maybe delay(long delay, TimeUnit unit) { return delay(delay, unit, Schedulers.computation()); @@ -2167,6 +2240,7 @@ public final Maybe delay(long delay, TimeUnit unit) { * @return the new Maybe instance * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe delay(long delay, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -2197,6 +2271,7 @@ public final Maybe delay(long delay, TimeUnit unit, Scheduler scheduler) { * @return the new Maybe instance * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) public final Maybe delay(Publisher delayIndicator) { @@ -2221,6 +2296,7 @@ public final Maybe delay(Publisher delayIndicator) { * until the other Publisher emits an element or completes normally. */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe delaySubscription(Publisher subscriptionIndicator) { ObjectHelper.requireNonNull(subscriptionIndicator, "subscriptionIndicator is null"); @@ -2243,6 +2319,7 @@ public final Maybe delaySubscription(Publisher subscriptionIndicator) * @return a Maybe that delays the subscription to the source Maybe by the given amount * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Maybe delaySubscription(long delay, TimeUnit unit) { return delaySubscription(delay, unit, Schedulers.computation()); @@ -2268,6 +2345,7 @@ public final Maybe delaySubscription(long delay, TimeUnit unit) { * amount, waiting and subscribing on the given Scheduler * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe delaySubscription(long delay, TimeUnit unit, Scheduler scheduler) { return delaySubscription(Flowable.timer(delay, unit, scheduler)); @@ -2285,6 +2363,7 @@ public final Maybe delaySubscription(long delay, TimeUnit unit, Scheduler sch * @return the new Maybe instance * @since 2.0.1 - experimental */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @Experimental public final Maybe doAfterSuccess(Consumer onAfterSuccess) { @@ -2309,6 +2388,7 @@ public final Maybe doAfterSuccess(Consumer onAfterSuccess) { * {@link Action} * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doAfterTerminate(Action onAfterTerminate) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2336,6 +2416,7 @@ public final Maybe doAfterTerminate(Action onAfterTerminate) { * @return the new Maybe instance * @since 2.0.1 - experimental */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @Experimental public final Maybe doFinally(Action onFinally) { @@ -2353,6 +2434,7 @@ public final Maybe doFinally(Action onFinally) { * @param onDispose the runnable called when the subscription is cancelled (disposed) * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnDispose(Action onDispose) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2379,6 +2461,7 @@ public final Maybe doOnDispose(Action onDispose) { * @return the new Maybe with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnComplete(Action onComplete) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2401,6 +2484,7 @@ public final Maybe doOnComplete(Action onComplete) { * @param onError the consumer called with the success value of onError * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnError(Consumer onError) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2427,6 +2511,7 @@ public final Maybe doOnError(Consumer onError) { * @param onEvent the callback to call with the terminal event tuple * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnEvent(BiConsumer onEvent) { ObjectHelper.requireNonNull(onEvent, "onEvent is null"); @@ -2443,6 +2528,7 @@ public final Maybe doOnEvent(BiConsumer onEvent * @param onSubscribe the consumer called with the Disposable sent via onSubscribe * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnSubscribe(Consumer onSubscribe) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2465,6 +2551,7 @@ public final Maybe doOnSubscribe(Consumer onSubscribe) { * @param onSuccess the consumer called with the success value of onSuccess * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnSuccess(Consumer onSuccess) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2494,6 +2581,7 @@ public final Maybe doOnSuccess(Consumer onSuccess) { * evaluates as {@code true} * @see ReactiveX operators documentation: Filter */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe filter(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -2517,6 +2605,7 @@ public final Maybe filter(Predicate predicate) { * @return the Maybe returned from {@code func} when applied to the item emitted by the source Maybe * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe flatMap(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2544,6 +2633,7 @@ public final Maybe flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe flatMap( Function> onSuccessMapper, @@ -2577,6 +2667,7 @@ public final Maybe flatMap( * @return the new Maybe instance * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe flatMap(Function> mapper, BiFunction resultSelector) { @@ -2604,6 +2695,7 @@ public final Maybe flatMap(FunctionReactiveX operators documentation: FlatMap */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flattenAsFlowable(final Function> mapper) { return RxJavaPlugins.onAssembly(new MaybeFlatMapIterableFlowable(this, mapper)); @@ -2626,6 +2718,7 @@ public final Flowable flattenAsFlowable(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flattenAsObservable(final Function> mapper) { return RxJavaPlugins.onAssembly(new MaybeFlatMapIterableObservable(this, mapper)); @@ -2647,6 +2740,7 @@ public final Observable flattenAsObservable(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMapObservable(Function> mapper) { return toObservable().flatMap(mapper); @@ -2672,6 +2766,7 @@ public final Observable flatMapObservable(FunctionReactiveX operators documentation: FlatMap */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMapPublisher(Function> mapper) { return toFlowable().flatMap(mapper); @@ -2695,6 +2790,7 @@ public final Flowable flatMapPublisher(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single flatMapSingle(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2720,6 +2816,7 @@ public final Single flatMapSingle(final FunctionReactiveX operators documentation: FlatMap * @since 2.0.2 - experimental */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @Experimental public final Maybe flatMapSingleElement(final Function> mapper) { @@ -2743,6 +2840,7 @@ public final Maybe flatMapSingleElement(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable flatMapCompletable(final Function mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2759,6 +2857,7 @@ public final Completable flatMapCompletable(final Function * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe hide() { return RxJavaPlugins.onAssembly(new MaybeHide(this)); @@ -2777,6 +2876,7 @@ public final Maybe hide() { * called by the source Maybe * @see ReactiveX operators documentation: IgnoreElements */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable ignoreElement() { return RxJavaPlugins.onAssembly(new MaybeIgnoreElementCompletable(this)); @@ -2794,6 +2894,7 @@ public final Completable ignoreElement() { * @return a Single that emits a Boolean * @see ReactiveX operators documentation: Contains */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single isEmpty() { return RxJavaPlugins.onAssembly(new MaybeIsEmptySingle(this)); @@ -2822,6 +2923,7 @@ public final Single isEmpty() { * @return a Maybe that is the result of applying the lifted Operator to the source Maybe * @see RxJava wiki: Implementing Your Own Operators */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe lift(final MaybeOperator lift) { ObjectHelper.requireNonNull(lift, "onLift is null"); @@ -2844,6 +2946,7 @@ public final Maybe lift(final MaybeOperator lift) * @return a Maybe that emits the item from the source Maybe, transformed by the specified function * @see ReactiveX operators documentation: Map */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe map(Function mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2870,6 +2973,7 @@ public final Maybe map(Function mapper) { * @see ReactiveX operators documentation: Merge */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable mergeWith(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2894,6 +2998,7 @@ public final Flowable mergeWith(MaybeSource other) { * @see RxJava Threading Examples * @see #subscribeOn */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -2916,6 +3021,7 @@ public final Maybe observeOn(final Scheduler scheduler) { * @return the new Maybe instance * @see ReactiveX operators documentation: Filter */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe ofType(final Class clazz) { ObjectHelper.requireNonNull(clazz, "clazz is null"); @@ -2935,6 +3041,7 @@ public final Maybe ofType(final Class clazz) { * * @return the value returned by the convert function */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final R to(Function, R> convert) { try { @@ -2958,6 +3065,7 @@ public final R to(Function, R> convert) { */ @SuppressWarnings("unchecked") @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable toFlowable() { if (this instanceof FuseToFlowable) { @@ -2976,6 +3084,7 @@ public final Flowable toFlowable() { * @return the new Observable instance */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable toObservable() { if (this instanceof FuseToObservable) { @@ -2994,6 +3103,7 @@ public final Observable toObservable() { * @param defaultValue the default item to signal in Single if this Maybe is empty * @return the new Single instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single toSingle(T defaultValue) { ObjectHelper.requireNonNull(defaultValue, "defaultValue is null"); @@ -3009,6 +3119,7 @@ public final Single toSingle(T defaultValue) { * * @return the new Single instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single toSingle() { return RxJavaPlugins.onAssembly(new MaybeToSingle(this, null)); @@ -3023,6 +3134,7 @@ public final Single toSingle() { * * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorComplete() { return onErrorComplete(Functions.alwaysTrue()); @@ -3039,6 +3151,7 @@ public final Maybe onErrorComplete() { * if the Throwable should be swallowed and replaced with an onComplete. * @return the new Completable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorComplete(final Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -3065,6 +3178,7 @@ public final Maybe onErrorComplete(final Predicate predica * @return the new Maybe instance * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorResumeNext(final MaybeSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -3090,6 +3204,7 @@ public final Maybe onErrorResumeNext(final MaybeSource next) { * @return the new Maybe instance * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorResumeNext(Function> resumeFunction) { ObjectHelper.requireNonNull(resumeFunction, "resumeFunction is null"); @@ -3115,6 +3230,7 @@ public final Maybe onErrorResumeNext(FunctionReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorReturn(Function valueSupplier) { ObjectHelper.requireNonNull(valueSupplier, "valueSupplier is null"); @@ -3139,6 +3255,7 @@ public final Maybe onErrorReturn(Function val * @return the new Maybe instance * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorReturnItem(final T item) { ObjectHelper.requireNonNull(item, "item is null"); @@ -3167,6 +3284,7 @@ public final Maybe onErrorReturnItem(final T item) { * @return the new Maybe instance * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onExceptionResumeNext(final MaybeSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -3182,6 +3300,7 @@ public final Maybe onExceptionResumeNext(final MaybeSource next) * @return a Maybe which out references to the upstream producer and downstream MaybeObserver if * the sequence is terminated or downstream calls dispose() */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onTerminateDetach() { return RxJavaPlugins.onAssembly(new MaybeDetach(this)); @@ -3202,6 +3321,7 @@ public final Maybe onTerminateDetach() { * @see ReactiveX operators documentation: Repeat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeat() { return repeat(Long.MAX_VALUE); @@ -3229,6 +3349,7 @@ public final Flowable repeat() { * @see ReactiveX operators documentation: Repeat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeat(long times) { return toFlowable().repeat(times); @@ -3255,6 +3376,7 @@ public final Flowable repeat(long times) { * @see ReactiveX operators documentation: Repeat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeatUntil(BooleanSupplier stop) { return toFlowable().repeatUntil(stop); @@ -3283,6 +3405,7 @@ public final Flowable repeatUntil(BooleanSupplier stop) { * @see ReactiveX operators documentation: Repeat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeatWhen(final Function, ? extends Publisher> handler) { return toFlowable().repeatWhen(handler); @@ -3305,6 +3428,7 @@ public final Flowable repeatWhen(final Function, ? e * @return the nww Maybe instance * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe retry() { return retry(Long.MAX_VALUE, Functions.alwaysTrue()); @@ -3327,6 +3451,7 @@ public final Maybe retry() { * @see #retry() * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe retry(BiPredicate predicate) { return toFlowable().retry(predicate).singleElement(); @@ -3351,6 +3476,7 @@ public final Maybe retry(BiPredicate pred * @return the new Maybe instance * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe retry(long count) { return retry(count, Functions.alwaysTrue()); @@ -3367,6 +3493,7 @@ public final Maybe retry(long count) { * @param predicate the predicate called with the failure Throwable and should return true to trigger a retry. * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe retry(long times, Predicate predicate) { return toFlowable().retry(times, predicate).singleElement(); @@ -3382,6 +3509,7 @@ public final Maybe retry(long times, Predicate predicate) * @param predicate the predicate that receives the failure Throwable and should return true to trigger a retry. * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe retry(Predicate predicate) { return retry(Long.MAX_VALUE, predicate); @@ -3396,6 +3524,7 @@ public final Maybe retry(Predicate predicate) { * @param stop the function that should return true to stop retrying * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe retryUntil(final BooleanSupplier stop) { ObjectHelper.requireNonNull(stop, "stop is null"); @@ -3450,6 +3579,7 @@ public final Maybe retryUntil(final BooleanSupplier stop) { * @return the new Maybe instance * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe retryWhen( final Function, ? extends Publisher> handler) { @@ -3491,6 +3621,7 @@ public final Disposable subscribe() { * if {@code onSuccess} is null * @see ReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onSuccess) { return subscribe(onSuccess, Functions.ERROR_CONSUMER, Functions.EMPTY_ACTION); @@ -3516,6 +3647,7 @@ public final Disposable subscribe(Consumer onSuccess) { * if {@code onSuccess} is null, or * if {@code onError} is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onSuccess, Consumer onError) { return subscribe(onSuccess, onError, Functions.EMPTY_ACTION); @@ -3545,14 +3677,13 @@ public final Disposable subscribe(Consumer onSuccess, ConsumerReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onSuccess, Consumer onError, Action onComplete) { return subscribeWith(new MaybeCallbackObserver(onSuccess, onError, onComplete)); } - - @SchedulerSupport(SchedulerSupport.NONE) @Override public final void subscribe(MaybeObserver observer) { @@ -3596,6 +3727,7 @@ public final void subscribe(MaybeObserver observer) { * @see RxJava Threading Examples * @see #observeOn */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe subscribeOn(Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -3646,6 +3778,7 @@ public final > E subscribeWith(E observer) { * @return a Maybe that emits the items emitted by the source Maybe or the items of an * alternate MaybeSource if the source Maybe is empty. */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe switchIfEmpty(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3670,6 +3803,7 @@ public final Maybe switchIfEmpty(MaybeSource other) { * @return a Maybe that emits the items emitted by the source Maybe until such time as {@code other} emits its first item * @see ReactiveX operators documentation: TakeUntil */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe takeUntil(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3698,6 +3832,7 @@ public final Maybe takeUntil(MaybeSource other) { * @see ReactiveX operators documentation: TakeUntil */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe takeUntil(Publisher other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3722,6 +3857,7 @@ public final Maybe takeUntil(Publisher other) { * @return the new Maybe instance * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Maybe timeout(long timeout, TimeUnit timeUnit) { return timeout(timeout, timeUnit, Schedulers.computation()); @@ -3747,6 +3883,7 @@ public final Maybe timeout(long timeout, TimeUnit timeUnit) { * @return the new Maybe instance * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Maybe timeout(long timeout, TimeUnit timeUnit, MaybeSource fallback) { ObjectHelper.requireNonNull(fallback, "other is null"); @@ -3775,6 +3912,7 @@ public final Maybe timeout(long timeout, TimeUnit timeUnit, MaybeSourceReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler, MaybeSource fallback) { ObjectHelper.requireNonNull(fallback, "fallback is null"); @@ -3802,6 +3940,7 @@ public final Maybe timeout(long timeout, TimeUnit timeUnit, Scheduler schedul * @return the new Maybe instance * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler) { return timeout(timer(timeout, timeUnit, scheduler)); @@ -3819,6 +3958,7 @@ public final Maybe timeout(long timeout, TimeUnit timeUnit, Scheduler schedul * or onComplete. * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe timeout(MaybeSource timeoutIndicator) { ObjectHelper.requireNonNull(timeoutIndicator, "timeoutIndicator is null"); @@ -3839,6 +3979,7 @@ public final Maybe timeout(MaybeSource timeoutIndicator) { * @param fallback the MaybeSource that is subscribed to if the current Maybe times out * @return the new Maybe instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe timeout(MaybeSource timeoutIndicator, MaybeSource fallback) { ObjectHelper.requireNonNull(timeoutIndicator, "timeoutIndicator is null"); @@ -3862,6 +4003,7 @@ public final Maybe timeout(MaybeSource timeoutIndicator, MaybeSource Maybe timeout(Publisher timeoutIndicator) { ObjectHelper.requireNonNull(timeoutIndicator, "timeoutIndicator is null"); @@ -3886,6 +4028,7 @@ public final Maybe timeout(Publisher timeoutIndicator) { * @return the new Maybe instance */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe timeout(Publisher timeoutIndicator, MaybeSource fallback) { ObjectHelper.requireNonNull(timeoutIndicator, "timeoutIndicator is null"); @@ -3904,6 +4047,7 @@ public final Maybe timeout(Publisher timeoutIndicator, MaybeSource unsubscribeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -3915,10 +4059,10 @@ public final Maybe unsubscribeOn(final Scheduler scheduler) { * to those values and emits the BiFunction's resulting value to downstream. * * - * + * *

If either this or the other MaybeSource is empty or signals an error, the resulting Maybe will * terminate immediately and dispose the other source. - * + * *

*
Scheduler:
*
{@code zipWith} does not operate by default on a particular {@link Scheduler}.
@@ -3936,6 +4080,7 @@ public final Maybe unsubscribeOn(final Scheduler scheduler) { * @return the new Maybe instance * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe zipWith(MaybeSource other, BiFunction zipper) { ObjectHelper.requireNonNull(other, "other is null"); diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index 13138e6a35..08b9e40e61 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -74,6 +74,7 @@ public abstract class Observable implements ObservableSource { * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable amb(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -98,6 +99,7 @@ public static Observable amb(IterableReactiveX operators documentation: Amb */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable ambArray(ObservableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -151,6 +153,7 @@ public static int bufferSize() { * ObservableSources by means of the given aggregation function * @see ReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest(Function combiner, int bufferSize, ObservableSource... sources) { return combineLatest(sources, combiner, bufferSize); @@ -183,6 +186,7 @@ public static Observable combineLatest(FunctionReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest(Iterable> sources, Function combiner) { @@ -219,6 +223,7 @@ public static Observable combineLatest(IterableReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest(Iterable> sources, Function combiner, int bufferSize) { @@ -258,6 +263,7 @@ public static Observable combineLatest(IterableReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest(ObservableSource[] sources, Function combiner) { @@ -293,6 +299,7 @@ public static Observable combineLatest(ObservableSource[] * ObservableSources by means of the given aggregation function * @see ReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest(ObservableSource[] sources, Function combiner, int bufferSize) { @@ -333,6 +340,7 @@ public static Observable combineLatest(ObservableSource[] * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -368,6 +376,7 @@ public static Observable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -407,6 +416,7 @@ public static Observable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -449,6 +459,7 @@ public static Observable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -495,6 +506,7 @@ public static Observable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -544,6 +556,7 @@ public static Observable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -597,6 +610,7 @@ public static Observable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -653,6 +667,7 @@ public static Observable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -690,6 +705,7 @@ public static Observable combineLates * ObservableSources by means of the given aggregation function * @see ReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatestDelayError(ObservableSource[] sources, Function combiner) { @@ -725,6 +741,7 @@ public static Observable combineLatestDelayError(ObservableSourceReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatestDelayError(Function combiner, int bufferSize, ObservableSource... sources) { @@ -761,6 +778,7 @@ public static Observable combineLatestDelayError(FunctionReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatestDelayError(ObservableSource[] sources, Function combiner, int bufferSize) { @@ -802,6 +820,7 @@ public static Observable combineLatestDelayError(ObservableSourceReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatestDelayError(Iterable> sources, Function combiner) { @@ -838,6 +857,7 @@ public static Observable combineLatestDelayError(IterableReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatestDelayError(Iterable> sources, Function combiner, int bufferSize) { @@ -864,6 +884,7 @@ public static Observable combineLatestDelayError(Iterable Observable concat(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -887,6 +908,7 @@ public static Observable concat(IterableReactiveX operators documentation: Concat */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concat(ObservableSource> sources) { return concat(sources, bufferSize()); @@ -912,6 +934,7 @@ public static Observable concat(ObservableSourceReactiveX operators documentation: Concat */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concat(ObservableSource> sources, int prefetch) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -938,6 +961,7 @@ public static Observable concat(ObservableSourceReactiveX operators documentation: Concat */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concat(ObservableSource source1, ObservableSource source2) { return concatArray(source1, source2); @@ -965,6 +989,7 @@ public static Observable concat(ObservableSource source1, Ob * @see ReactiveX operators documentation: Concat */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concat( ObservableSource source1, ObservableSource source2, @@ -996,6 +1021,7 @@ public static Observable concat( * @see ReactiveX operators documentation: Concat */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concat( ObservableSource source1, ObservableSource source2, @@ -1019,6 +1045,7 @@ public static Observable concat( * @throws NullPointerException if sources is null */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concatArray(ObservableSource... sources) { if (sources.length == 0) { @@ -1045,6 +1072,7 @@ public static Observable concatArray(ObservableSource... sou * @throws NullPointerException if sources is null */ @SuppressWarnings({ "unchecked" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concatArrayDelayError(ObservableSource... sources) { if (sources.length == 0) { @@ -1073,6 +1101,7 @@ public static Observable concatArrayDelayError(ObservableSource Observable concatArrayEager(ObservableSource... sources) { return concatArrayEager(bufferSize(), bufferSize(), sources); @@ -1097,6 +1126,7 @@ public static Observable concatArrayEager(ObservableSource.. * @since 2.0 */ @SuppressWarnings({ "rawtypes", "unchecked" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concatArrayEager(int maxConcurrency, int prefetch, ObservableSource... sources) { return fromArray(sources).concatMapEagerDelayError((Function)Functions.identity(), maxConcurrency, prefetch, false); @@ -1116,6 +1146,7 @@ public static Observable concatArrayEager(int maxConcurrency, int prefetc * @param sources the Iterable sequence of ObservableSources * @return the new ObservableSource with the concatenating behavior */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable concatDelayError(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -1136,6 +1167,7 @@ public static Observable concatDelayError(Iterable Observable concatDelayError(ObservableSource> sources) { return concatDelayError(sources, bufferSize(), true); @@ -1159,6 +1191,7 @@ public static Observable concatDelayError(ObservableSource Observable concatDelayError(ObservableSource> sources, int prefetch, boolean tillTheEnd) { return RxJavaPlugins.onAssembly(new ObservableConcatMap(sources, Functions.identity(), prefetch, tillTheEnd ? ErrorMode.END : ErrorMode.BOUNDARY)); @@ -1181,6 +1214,7 @@ public static Observable concatDelayError(ObservableSource Observable concatEager(ObservableSource> sources) { return concatEager(sources, bufferSize(), bufferSize()); @@ -1207,6 +1241,7 @@ public static Observable concatEager(ObservableSource Observable concatEager(ObservableSource> sources, int maxConcurrency, int prefetch) { return wrap(sources).concatMapEager((Function)Functions.identity(), maxConcurrency, prefetch); @@ -1229,6 +1264,7 @@ public static Observable concatEager(ObservableSource Observable concatEager(Iterable> sources) { return concatEager(sources, bufferSize(), bufferSize()); @@ -1255,6 +1291,7 @@ public static Observable concatEager(Iterable Observable concatEager(Iterable> sources, int maxConcurrency, int prefetch) { return fromIterable(sources).concatMapEagerDelayError((Function)Functions.identity(), maxConcurrency, prefetch, false); @@ -1304,6 +1341,7 @@ public static Observable concatEager(Iterable Observable create(ObservableOnSubscribe source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -1334,6 +1372,7 @@ public static Observable create(ObservableOnSubscribe source) { * ObservableSource factory function * @see ReactiveX operators documentation: Defer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable defer(Callable> supplier) { ObjectHelper.requireNonNull(supplier, "supplier is null"); @@ -1356,6 +1395,7 @@ public static Observable defer(CallableReactiveX operators documentation: Empty */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Observable empty() { @@ -1380,6 +1420,7 @@ public static Observable empty() { * the Observer subscribes to it * @see ReactiveX operators documentation: Throw */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable error(Callable errorSupplier) { ObjectHelper.requireNonNull(errorSupplier, "errorSupplier is null"); @@ -1404,6 +1445,7 @@ public static Observable error(Callable errorSupplie * the Observer subscribes to it * @see ReactiveX operators documentation: Throw */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable error(final Throwable exception) { ObjectHelper.requireNonNull(exception, "e is null"); @@ -1426,6 +1468,7 @@ public static Observable error(final Throwable exception) { * @return an Observable that emits each item in the source Array * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromArray(T... items) { ObjectHelper.requireNonNull(items, "items is null"); @@ -1460,6 +1503,7 @@ public static Observable fromArray(T... items) { * @see #defer(Callable) * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromCallable(Callable supplier) { ObjectHelper.requireNonNull(supplier, "supplier is null"); @@ -1492,6 +1536,7 @@ public static Observable fromCallable(Callable supplier) { * @return an Observable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromFuture(Future future) { ObjectHelper.requireNonNull(future, "future is null"); @@ -1528,6 +1573,7 @@ public static Observable fromFuture(Future future) { * @return an Observable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromFuture(Future future, long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(future, "future is null"); @@ -1568,6 +1614,7 @@ public static Observable fromFuture(Future future, long time * @return an Observable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable fromFuture(Future future, long timeout, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -1602,6 +1649,7 @@ public static Observable fromFuture(Future future, long time * @return an Observable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable fromFuture(Future future, Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -1626,6 +1674,7 @@ public static Observable fromFuture(Future future, Scheduler * @return an Observable that emits each item in the source {@link Iterable} sequence * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromIterable(Iterable source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -1647,6 +1696,7 @@ public static Observable fromIterable(Iterable source) { * @throws NullPointerException if publisher is null */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromPublisher(Publisher publisher) { ObjectHelper.requireNonNull(publisher, "publisher is null"); @@ -1669,6 +1719,7 @@ public static Observable fromPublisher(Publisher publisher) * in a call will make the operator signal {@code IllegalStateException}. * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate(final Consumer> generator) { ObjectHelper.requireNonNull(generator, "generator is null"); @@ -1694,6 +1745,7 @@ public static Observable generate(final Consumer> generator) { * in a call will make the operator signal {@code IllegalStateException}. * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate(Callable initialState, final BiConsumer> generator) { ObjectHelper.requireNonNull(generator, "generator is null"); @@ -1720,6 +1772,7 @@ public static Observable generate(Callable initialState, final BiCo * terminates the sequence or it gets cancelled * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate( final Callable initialState, @@ -1748,6 +1801,7 @@ public static Observable generate( * in a call will make the operator signal {@code IllegalStateException}. * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate(Callable initialState, BiFunction, S> generator) { return generate(initialState, generator, Functions.emptyConsumer()); @@ -1774,6 +1828,7 @@ public static Observable generate(Callable initialState, BiFunction * terminates the sequence or it gets cancelled * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate(Callable initialState, BiFunction, S> generator, Consumer disposeState) { @@ -1804,6 +1859,7 @@ public static Observable generate(Callable initialState, BiFunction * @see ReactiveX operators documentation: Interval * @since 1.0.12 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Observable interval(long initialDelay, long period, TimeUnit unit) { return interval(initialDelay, period, unit, Schedulers.computation()); @@ -1832,6 +1888,7 @@ public static Observable interval(long initialDelay, long period, TimeUnit * @see ReactiveX operators documentation: Interval * @since 1.0.12 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable interval(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -1856,6 +1913,7 @@ public static Observable interval(long initialDelay, long period, TimeUnit * @return an Observable that emits a sequential number each time interval * @see ReactiveX operators documentation: Interval */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Observable interval(long period, TimeUnit unit) { return interval(period, period, unit, Schedulers.computation()); @@ -1880,6 +1938,7 @@ public static Observable interval(long period, TimeUnit unit) { * @return an Observable that emits a sequential number each time interval * @see ReactiveX operators documentation: Interval */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable interval(long period, TimeUnit unit, Scheduler scheduler) { return interval(period, period, unit, scheduler); @@ -1902,6 +1961,7 @@ public static Observable interval(long period, TimeUnit unit, Scheduler sc * @param unit the unit of measure of the initialDelay and period amounts * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Observable intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit) { return intervalRange(start, count, initialDelay, period, unit, Schedulers.computation()); @@ -1924,6 +1984,7 @@ public static Observable intervalRange(long start, long count, long initia * @param scheduler the target scheduler where the values and terminal signals will be emitted * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { if (count < 0) { @@ -1968,6 +2029,7 @@ public static Observable intervalRange(long start, long count, long initia * @return an Observable that emits {@code value} as a single item and then completes * @see ReactiveX operators documentation: Just */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item) { ObjectHelper.requireNonNull(item, "The item is null"); @@ -1993,6 +2055,7 @@ public static Observable just(T item) { * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2022,6 +2085,7 @@ public static Observable just(T item1, T item2) { * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2054,6 +2118,7 @@ public static Observable just(T item1, T item2, T item3) { * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2089,6 +2154,7 @@ public static Observable just(T item1, T item2, T item3, T item4) { * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2127,6 +2193,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2168,6 +2235,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2212,6 +2280,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2259,6 +2328,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2309,6 +2379,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 * @see ReactiveX operators documentation: Just */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9, T item10) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2352,6 +2423,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable merge(Iterable> sources, int maxConcurrency, int bufferSize) { return fromIterable(sources).flatMap((Function)Functions.identity(), false, maxConcurrency, bufferSize); @@ -2384,6 +2456,7 @@ public static Observable merge(IterableReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeArray(int maxConcurrency, int bufferSize, ObservableSource... sources) { return fromArray(sources).flatMap((Function)Functions.identity(), false, maxConcurrency, bufferSize); @@ -2409,6 +2482,7 @@ public static Observable mergeArray(int maxConcurrency, int bufferSize, O * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable merge(Iterable> sources) { return fromIterable(sources).flatMap((Function)Functions.identity()); @@ -2439,6 +2513,7 @@ public static Observable merge(IterableReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable merge(Iterable> sources, int maxConcurrency) { return fromIterable(sources).flatMap((Function)Functions.identity(), maxConcurrency); @@ -2464,6 +2539,7 @@ public static Observable merge(IterableReactiveX operators documentation: Merge */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) public static Observable merge(ObservableSource> sources) { @@ -2497,6 +2573,7 @@ public static Observable merge(ObservableSource Observable merge(ObservableSource> sources, int maxConcurrency) { return RxJavaPlugins.onAssembly(new ObservableFlatMap(sources, Functions.identity(), false, maxConcurrency, bufferSize())); @@ -2523,6 +2600,7 @@ public static Observable merge(ObservableSourceReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable merge(ObservableSource source1, ObservableSource source2) { ObjectHelper.requireNonNull(source1, "source1 is null"); @@ -2553,6 +2631,7 @@ public static Observable merge(ObservableSource source1, Obs * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable merge(ObservableSource source1, ObservableSource source2, ObservableSource source3) { ObjectHelper.requireNonNull(source1, "source1 is null"); @@ -2586,6 +2665,7 @@ public static Observable merge(ObservableSource source1, Obs * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable merge( ObservableSource source1, ObservableSource source2, @@ -2616,6 +2696,7 @@ public static Observable merge( * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeArray(ObservableSource... sources) { return fromArray(sources).flatMap((Function)Functions.identity(), sources.length); @@ -2647,6 +2728,7 @@ public static Observable mergeArray(ObservableSource... sour * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeDelayError(Iterable> sources) { return fromIterable(sources).flatMap((Function)Functions.identity(), true); @@ -2682,6 +2764,7 @@ public static Observable mergeDelayError(IterableReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeDelayError(Iterable> sources, int maxConcurrency, int bufferSize) { return fromIterable(sources).flatMap((Function)Functions.identity(), true, maxConcurrency, bufferSize); @@ -2717,6 +2800,7 @@ public static Observable mergeDelayError(IterableReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeArrayDelayError(int maxConcurrency, int bufferSize, ObservableSource... sources) { return fromArray(sources).flatMap((Function)Functions.identity(), true, maxConcurrency, bufferSize); @@ -2750,6 +2834,7 @@ public static Observable mergeArrayDelayError(int maxConcurrency, int buf * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeDelayError(Iterable> sources, int maxConcurrency) { return fromIterable(sources).flatMap((Function)Functions.identity(), true, maxConcurrency); @@ -2780,6 +2865,7 @@ public static Observable mergeDelayError(IterableReactiveX operators documentation: Merge */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) public static Observable mergeDelayError(ObservableSource> sources) { @@ -2816,6 +2902,7 @@ public static Observable mergeDelayError(ObservableSource Observable mergeDelayError(ObservableSource> sources, int maxConcurrency) { return RxJavaPlugins.onAssembly(new ObservableFlatMap(sources, Functions.identity(), true, maxConcurrency, bufferSize())); @@ -2848,6 +2935,7 @@ public static Observable mergeDelayError(ObservableSourceReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeDelayError(ObservableSource source1, ObservableSource source2) { ObjectHelper.requireNonNull(source1, "source1 is null"); @@ -2885,6 +2973,7 @@ public static Observable mergeDelayError(ObservableSource so * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeDelayError(ObservableSource source1, ObservableSource source2, ObservableSource source3) { ObjectHelper.requireNonNull(source1, "source1 is null"); @@ -2925,6 +3014,7 @@ public static Observable mergeDelayError(ObservableSource so * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeDelayError( ObservableSource source1, ObservableSource source2, @@ -2962,6 +3052,7 @@ public static Observable mergeDelayError( * @see ReactiveX operators documentation: Merge */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable mergeArrayDelayError(ObservableSource... sources) { return fromArray(sources).flatMap((Function)Functions.identity(), true, sources.length); @@ -2983,6 +3074,7 @@ public static Observable mergeArrayDelayError(ObservableSourceReactiveX operators documentation: Never */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Observable never() { @@ -3008,6 +3100,7 @@ public static Observable never() { * {@code Integer.MAX_VALUE} * @see ReactiveX operators documentation: Range */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable range(final int start, final int count) { if (count < 0) { @@ -3044,6 +3137,7 @@ public static Observable range(final int start, final int count) { * {@code Long.MAX_VALUE} * @see ReactiveX operators documentation: Range */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable rangeLong(long start, long count) { if (count < 0) { @@ -3085,6 +3179,7 @@ public static Observable rangeLong(long start, long count) { * @return a Single that emits a Boolean value that indicates whether the two sequences are the same * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(ObservableSource source1, ObservableSource source2) { return sequenceEqual(source1, source2, ObjectHelper.equalsPredicate(), bufferSize()); @@ -3113,6 +3208,7 @@ public static Single sequenceEqual(ObservableSource so * are the same according to the specified function * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(ObservableSource source1, ObservableSource source2, BiPredicate isEqual) { @@ -3144,6 +3240,7 @@ public static Single sequenceEqual(ObservableSource so * are the same according to the specified function * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(ObservableSource source1, ObservableSource source2, BiPredicate isEqual, int bufferSize) { @@ -3175,6 +3272,7 @@ public static Single sequenceEqual(ObservableSource so * @return a Single that emits a Boolean value that indicates whether the two sequences are the same * @see ReactiveX operators documentation: SequenceEqual */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(ObservableSource source1, ObservableSource source2, int bufferSize) { @@ -3209,6 +3307,7 @@ public static Single sequenceEqual(ObservableSource so * @see ReactiveX operators documentation: Switch */ @SuppressWarnings({ "rawtypes", "unchecked" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable switchOnNext(ObservableSource> sources, int bufferSize) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -3240,6 +3339,7 @@ public static Observable switchOnNext(ObservableSourceReactiveX operators documentation: Switch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable switchOnNext(ObservableSource> sources) { return switchOnNext(sources, bufferSize()); @@ -3272,6 +3372,7 @@ public static Observable switchOnNext(ObservableSourceReactiveX operators documentation: Switch * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable switchOnNextDelayError(ObservableSource> sources) { return switchOnNextDelayError(sources, bufferSize()); @@ -3307,6 +3408,7 @@ public static Observable switchOnNextDelayError(ObservableSource Observable switchOnNextDelayError(ObservableSource> sources, int prefetch) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -3330,6 +3432,7 @@ public static Observable switchOnNextDelayError(ObservableSourceReactiveX operators documentation: Timer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Observable timer(long delay, TimeUnit unit) { return timer(delay, unit, Schedulers.computation()); @@ -3355,6 +3458,7 @@ public static Observable timer(long delay, TimeUnit unit) { * completes * @see ReactiveX operators documentation: Timer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable timer(long delay, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -3375,6 +3479,7 @@ public static Observable timer(long delay, TimeUnit unit, Scheduler schedu * @param onSubscribe the ObservableSource instance to wrap * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable unsafeCreate(ObservableSource onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "source is null"); @@ -3406,6 +3511,7 @@ public static Observable unsafeCreate(ObservableSource onSubscribe) { * @return the ObservableSource whose lifetime controls the lifetime of the dependent resource object * @see ReactiveX operators documentation: Using */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable using(Callable resourceSupplier, Function> sourceSupplier, Consumer disposer) { return using(resourceSupplier, sourceSupplier, disposer, true); @@ -3439,6 +3545,7 @@ public static Observable using(Callable resourceSupplier, * @see ReactiveX operators documentation: Using * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable using(Callable resourceSupplier, Function> sourceSupplier, Consumer disposer, boolean eager) { ObjectHelper.requireNonNull(resourceSupplier, "resourceSupplier is null"); @@ -3460,6 +3567,7 @@ public static Observable using(Callable resourceSupplier, * @return the new Observable instance or the same as the source * @throws NullPointerException if source is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable wrap(ObservableSource source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -3514,6 +3622,7 @@ public static Observable wrap(ObservableSource source) { * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip(Iterable> sources, Function zipper) { ObjectHelper.requireNonNull(zipper, "zipper is null"); @@ -3567,6 +3676,7 @@ public static Observable zip(IterableReactiveX operators documentation: Zip */ @SuppressWarnings({ "rawtypes", "unchecked" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip(ObservableSource> sources, final Function zipper) { ObjectHelper.requireNonNull(zipper, "zipper is null"); @@ -3620,6 +3730,7 @@ public static Observable zip(ObservableSourceReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, @@ -3673,6 +3784,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, @@ -3727,6 +3839,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, @@ -3783,6 +3896,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, ObservableSource source3, @@ -3842,6 +3956,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, ObservableSource source3, @@ -3905,6 +4020,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, ObservableSource source3, @@ -3970,6 +4086,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, ObservableSource source3, @@ -4038,6 +4155,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, ObservableSource source3, @@ -4110,6 +4228,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, ObservableSource source3, @@ -4185,6 +4304,7 @@ public static Observable zip( * @see ReactiveX operators documentation: Zip */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zip( ObservableSource source1, ObservableSource source2, ObservableSource source3, @@ -4244,6 +4364,7 @@ public static Observable zip( * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zipArray(Function zipper, boolean delayError, int bufferSize, ObservableSource... sources) { @@ -4305,6 +4426,7 @@ public static Observable zipArray(FunctionReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Observable zipIterable(Iterable> sources, Function zipper, boolean delayError, @@ -4335,6 +4457,7 @@ public static Observable zipIterable(IterableReactiveX operators documentation: All */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single all(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -4358,6 +4481,7 @@ public final Single all(Predicate predicate) { * @see ReactiveX operators documentation: Amb */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable ambWith(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -4384,6 +4508,7 @@ public final Observable ambWith(ObservableSource other) { * ObservableSource satisfies the {@code predicate} * @see ReactiveX operators documentation: Contains */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single any(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -4403,6 +4528,7 @@ public final Single any(Predicate predicate) { * if this {@code Observable} emits no items * @see ReactiveX documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingFirst() { BlockingFirstObserver s = new BlockingFirstObserver(); @@ -4428,6 +4554,7 @@ public final T blockingFirst() { * items * @see ReactiveX documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingFirst(T defaultItem) { BlockingFirstObserver s = new BlockingFirstObserver(); @@ -4489,6 +4616,7 @@ public final void blockingForEach(Consumer onNext) { * @return an {@link Iterable} version of this {@code Observable} * @see ReactiveX documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingIterable() { return blockingIterable(bufferSize()); @@ -4507,6 +4635,7 @@ public final Iterable blockingIterable() { * @return an {@link Iterable} version of this {@code Observable} * @see ReactiveX documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingIterable(int bufferSize) { ObjectHelper.verifyPositive(bufferSize, "bufferSize"); @@ -4528,6 +4657,7 @@ public final Iterable blockingIterable(int bufferSize) { * if this {@code Observable} emits no items * @see ReactiveX documentation: Last */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingLast() { BlockingLastObserver s = new BlockingLastObserver(); @@ -4555,6 +4685,7 @@ public final T blockingLast() { * items * @see ReactiveX documentation: Last */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingLast(T defaultItem) { BlockingLastObserver s = new BlockingLastObserver(); @@ -4580,6 +4711,7 @@ public final T blockingLast(T defaultItem) { * @return an Iterable that always returns the latest item emitted by this {@code Observable} * @see ReactiveX documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingLatest() { return new BlockingObservableLatest(this); @@ -4602,6 +4734,7 @@ public final Iterable blockingLatest() { * has most recently emitted * @see ReactiveX documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingMostRecent(T initialValue) { return new BlockingObservableMostRecent(this, initialValue); @@ -4621,6 +4754,7 @@ public final Iterable blockingMostRecent(T initialValue) { * a new item, whereupon the Iterable returns that item * @see ReactiveX documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Iterable blockingNext() { return new BlockingObservableNext(this); @@ -4639,6 +4773,7 @@ public final Iterable blockingNext() { * @return the single item emitted by this {@code Observable} * @see ReactiveX documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingSingle() { T v = singleElement().blockingGet(); @@ -4665,6 +4800,7 @@ public final T blockingSingle() { * items * @see ReactiveX documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingSingle(T defaultItem) { return single(defaultItem).blockingGet(); @@ -4688,6 +4824,7 @@ public final T blockingSingle(T defaultItem) { * @return a {@link Future} that expects a single item to be emitted by this {@code Observable} * @see ReactiveX documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Future toFuture() { return subscribeWith(new FutureObserver()); @@ -4786,6 +4923,7 @@ public final void blockingSubscribe(Observer subscriber) { * {@code count} items from the source ObservableSource * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> buffer(int count) { return buffer(count, count); @@ -4813,6 +4951,7 @@ public final Observable> buffer(int count) { * containing at most {@code count} items * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> buffer(int count, int skip) { return buffer(count, skip, ArrayListSupplier.asCallable()); @@ -4844,6 +4983,7 @@ public final Observable> buffer(int count, int skip) { * containing at most {@code count} items * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > Observable buffer(int count, int skip, Callable bufferSupplier) { ObjectHelper.verifyPositive(count, "count"); @@ -4874,6 +5014,7 @@ public final > Observable buffer(int count, i * {@code count} items from the source ObservableSource * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > Observable buffer(int count, Callable bufferSupplier) { return buffer(count, count, bufferSupplier); @@ -4902,6 +5043,7 @@ public final > Observable buffer(int count, C * a fixed timespan has elapsed * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable> buffer(long timespan, long timeskip, TimeUnit unit) { return buffer(timespan, timeskip, unit, Schedulers.computation(), ArrayListSupplier.asCallable()); @@ -4932,6 +5074,7 @@ public final Observable> buffer(long timespan, long timeskip, TimeUnit u * a fixed timespan has elapsed * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> buffer(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler) { return buffer(timespan, timeskip, unit, scheduler, ArrayListSupplier.asCallable()); @@ -4966,6 +5109,7 @@ public final Observable> buffer(long timespan, long timeskip, TimeUnit u * a fixed timespan has elapsed * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final > Observable buffer(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler, Callable bufferSupplier) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -4995,6 +5139,7 @@ public final > Observable buffer(long timespa * ObservableSource within a fixed duration * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable> buffer(long timespan, TimeUnit unit) { return buffer(timespan, unit, Schedulers.computation(), Integer.MAX_VALUE); @@ -5025,6 +5170,7 @@ public final Observable> buffer(long timespan, TimeUnit unit) { * first) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable> buffer(long timespan, TimeUnit unit, int count) { return buffer(timespan, unit, Schedulers.computation(), count); @@ -5058,6 +5204,7 @@ public final Observable> buffer(long timespan, TimeUnit unit, int count) * first) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> buffer(long timespan, TimeUnit unit, Scheduler scheduler, int count) { return buffer(timespan, unit, scheduler, count, ArrayListSupplier.asCallable(), false); @@ -5097,6 +5244,7 @@ public final Observable> buffer(long timespan, TimeUnit unit, Scheduler * first) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final > Observable buffer( long timespan, TimeUnit unit, @@ -5134,6 +5282,7 @@ public final > Observable buffer( * ObservableSource within a fixed duration * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> buffer(long timespan, TimeUnit unit, Scheduler scheduler) { return buffer(timespan, unit, scheduler, Integer.MAX_VALUE, ArrayListSupplier.asCallable(), false); @@ -5161,6 +5310,7 @@ public final Observable> buffer(long timespan, TimeUnit unit, Scheduler * and closed when the specified ObservableSources emit items * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> buffer( ObservableSource openingIndicator, @@ -5194,6 +5344,7 @@ public final Observable> buffer( * and closed when the specified ObservableSources emit items * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > Observable buffer( ObservableSource openingIndicator, @@ -5227,6 +5378,7 @@ public final > Observable * @see #buffer(ObservableSource, int) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> buffer(ObservableSource boundary) { return buffer(boundary, ArrayListSupplier.asCallable()); @@ -5256,6 +5408,7 @@ public final Observable> buffer(ObservableSource boundary) { * @see ReactiveX operators documentation: Buffer * @see #buffer(ObservableSource) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> buffer(ObservableSource boundary, final int initialCapacity) { return buffer(boundary, Functions.createArrayList(initialCapacity)); @@ -5287,6 +5440,7 @@ public final Observable> buffer(ObservableSource boundary, final * @see #buffer(ObservableSource, int) * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > Observable buffer(ObservableSource boundary, Callable bufferSupplier) { ObjectHelper.requireNonNull(boundary, "boundary is null"); @@ -5314,6 +5468,7 @@ public final > Observable buffer(Observabl * each time the ObservableSource created with the {@code closingIndicator} argument emits an item * @see ReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> buffer(Callable> boundarySupplier) { return buffer(boundarySupplier, ArrayListSupplier.asCallable()); @@ -5344,6 +5499,7 @@ public final Observable> buffer(CallableReactiveX operators documentation: Buffer */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > Observable buffer(Callable> boundarySupplier, Callable bufferSupplier) { ObjectHelper.requireNonNull(boundarySupplier, "boundarySupplier is null"); @@ -5399,6 +5555,7 @@ public final > Observable buffer(Callable< * benefit of subsequent subscribers * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable cache() { return ObservableCache.from(this); @@ -5456,6 +5613,7 @@ public final Observable cache() { * benefit of subsequent subscribers * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable cacheWithInitialCapacity(int initialCapacity) { return ObservableCache.from(this, initialCapacity); @@ -5479,6 +5637,7 @@ public final Observable cacheWithInitialCapacity(int initialCapacity) { * specified type * @see ReactiveX operators documentation: Map */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable cast(final Class clazz) { ObjectHelper.requireNonNull(clazz, "clazz is null"); @@ -5507,6 +5666,7 @@ public final Observable cast(final Class clazz) { * into a single mutable data structure * @see ReactiveX operators documentation: Reduce */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single collect(Callable initialValueSupplier, BiConsumer collector) { ObjectHelper.requireNonNull(initialValueSupplier, "initialValueSupplier is null"); @@ -5536,6 +5696,7 @@ public final Single collect(Callable initialValueSupplier, B * into a single mutable data structure * @see ReactiveX operators documentation: Reduce */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single collectInto(final U initialValue, BiConsumer collector) { ObjectHelper.requireNonNull(initialValue, "initialValue is null"); @@ -5561,6 +5722,7 @@ public final Single collectInto(final U initialValue, BiConsumerRxJava wiki: Implementing Your Own Operators */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable compose(ObservableTransformer composer) { return wrap(composer.apply(this)); @@ -5585,6 +5747,7 @@ public final Observable compose(ObservableTransformer composer) { * by the source ObservableSource and concatenating the ObservableSources obtained from this transformation * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable concatMap(Function> mapper) { return concatMap(mapper, 2); @@ -5611,6 +5774,7 @@ public final Observable concatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable concatMap(Function> mapper, int prefetch) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -5641,6 +5805,7 @@ public final Observable concatMap(Function Observable concatMapDelayError(Function> mapper) { return concatMapDelayError(mapper, bufferSize(), true); @@ -5666,6 +5831,7 @@ public final Observable concatMapDelayError(Function Observable concatMapDelayError(Function> mapper, int prefetch, boolean tillTheEnd) { @@ -5698,6 +5864,7 @@ public final Observable concatMapDelayError(Function Observable concatMapEager(Function> mapper) { return concatMapEager(mapper, Integer.MAX_VALUE, bufferSize()); @@ -5722,6 +5889,7 @@ public final Observable concatMapEager(Function Observable concatMapEager(Function> mapper, int maxConcurrency, int prefetch) { @@ -5751,6 +5919,7 @@ public final Observable concatMapEager(Function Observable concatMapEagerDelayError(Function> mapper, boolean tillTheEnd) { @@ -5781,6 +5950,7 @@ public final Observable concatMapEagerDelayError(Function Observable concatMapEagerDelayError(Function> mapper, int maxConcurrency, int prefetch, boolean tillTheEnd) { @@ -5806,6 +5976,7 @@ public final Observable concatMapEagerDelayError(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable concatMapIterable(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -5833,6 +6004,7 @@ public final Observable concatMapIterable(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable concatMapIterable(final Function> mapper, int prefetch) { return concatMap(ObservableInternalHelper.flatMapIntoIterable(mapper), prefetch); @@ -5854,6 +6026,7 @@ public final Observable concatMapIterable(final FunctionReactiveX operators documentation: Concat */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable concatWith(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -5876,6 +6049,7 @@ public final Observable concatWith(ObservableSource other) { * or {@code false} if the source ObservableSource completes without emitting that item * @see ReactiveX operators documentation: Contains */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single contains(final Object element) { ObjectHelper.requireNonNull(element, "element is null"); @@ -5897,6 +6071,7 @@ public final Single contains(final Object element) { * @see ReactiveX operators documentation: Count * @see #count() */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single count() { return RxJavaPlugins.onAssembly(new ObservableCountSingle(this)); @@ -5920,6 +6095,7 @@ public final Single count() { * within a computed debounce duration * @see ReactiveX operators documentation: Debounce */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable debounce(Function> debounceSelector) { ObjectHelper.requireNonNull(debounceSelector, "debounceSelector is null"); @@ -5958,6 +6134,7 @@ public final Observable debounce(FunctionReactiveX operators documentation: Debounce * @see #throttleWithTimeout(long, TimeUnit) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable debounce(long timeout, TimeUnit unit) { return debounce(timeout, unit, Schedulers.computation()); @@ -5998,6 +6175,7 @@ public final Observable debounce(long timeout, TimeUnit unit) { * @see ReactiveX operators documentation: Debounce * @see #throttleWithTimeout(long, TimeUnit, Scheduler) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable debounce(long timeout, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -6021,6 +6199,7 @@ public final Observable debounce(long timeout, TimeUnit unit, Scheduler sched * items, or the items emitted by the source ObservableSource * @see ReactiveX operators documentation: DefaultIfEmpty */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable defaultIfEmpty(T defaultItem) { ObjectHelper.requireNonNull(defaultItem, "defaultItem is null"); @@ -6050,6 +6229,7 @@ public final Observable defaultIfEmpty(T defaultItem) { * per-item basis * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable delay(final Function> itemDelay) { ObjectHelper.requireNonNull(itemDelay, "itemDelay is null"); @@ -6073,6 +6253,7 @@ public final Observable delay(final FunctionReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable delay(long delay, TimeUnit unit) { return delay(delay, unit, Schedulers.computation(), false); @@ -6098,6 +6279,7 @@ public final Observable delay(long delay, TimeUnit unit) { * @return the source ObservableSource shifted in time by the specified delay * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable delay(long delay, TimeUnit unit, boolean delayError) { return delay(delay, unit, Schedulers.computation(), delayError); @@ -6122,6 +6304,7 @@ public final Observable delay(long delay, TimeUnit unit, boolean delayError) * @return the source ObservableSource shifted in time by the specified delay * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable delay(long delay, TimeUnit unit, Scheduler scheduler) { return delay(delay, unit, scheduler, false); @@ -6149,6 +6332,7 @@ public final Observable delay(long delay, TimeUnit unit, Scheduler scheduler) * @return the source ObservableSource shifted in time by the specified delay * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable delay(long delay, TimeUnit unit, Scheduler scheduler, boolean delayError) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -6185,6 +6369,7 @@ public final Observable delay(long delay, TimeUnit unit, Scheduler scheduler, * ObservableSource on a per-item basis * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable delay(ObservableSource subscriptionDelay, Function> itemDelay) { @@ -6208,6 +6393,7 @@ public final Observable delay(ObservableSource subscriptionDelay, * until the other Observable emits an element or completes normally. * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable delaySubscription(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -6230,6 +6416,7 @@ public final Observable delaySubscription(ObservableSource other) { * @return an Observable that delays the subscription to the source ObservableSource by the given amount * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable delaySubscription(long delay, TimeUnit unit) { return delaySubscription(delay, unit, Schedulers.computation()); @@ -6255,6 +6442,7 @@ public final Observable delaySubscription(long delay, TimeUnit unit) { * amount, waiting and subscribing on the given Scheduler * @see ReactiveX operators documentation: Delay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable delaySubscription(long delay, TimeUnit unit, Scheduler scheduler) { return delaySubscription(timer(delay, unit, scheduler)); @@ -6276,6 +6464,7 @@ public final Observable delaySubscription(long delay, TimeUnit unit, Schedule * emitted by the source ObservableSource * @see ReactiveX operators documentation: Dematerialize */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable dematerialize() { @SuppressWarnings("unchecked") @@ -6296,6 +6485,7 @@ public final Observable dematerialize() { * each other * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable distinct() { return distinct(Functions.identity(), Functions.createHashSet()); @@ -6318,6 +6508,7 @@ public final Observable distinct() { * @return an Observable that emits those items emitted by the source ObservableSource that have distinct keys * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable distinct(Function keySelector) { return distinct(keySelector, Functions.createHashSet()); @@ -6343,6 +6534,7 @@ public final Observable distinct(Function keySelector) { * @return an Observable that emits those items emitted by the source ObservableSource that have distinct keys * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable distinct(Function keySelector, Callable> collectionSupplier) { ObjectHelper.requireNonNull(keySelector, "keySelector is null"); @@ -6364,6 +6556,7 @@ public final Observable distinct(Function keySelector, Call * immediate predecessors * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable distinctUntilChanged() { return distinctUntilChanged(Functions.identity()); @@ -6387,6 +6580,7 @@ public final Observable distinctUntilChanged() { * those of their immediate predecessors * @see ReactiveX operators documentation: Distinct */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable distinctUntilChanged(Function keySelector) { ObjectHelper.requireNonNull(keySelector, "keySelector is null"); @@ -6410,6 +6604,7 @@ public final Observable distinctUntilChanged(Function keySe * @see ReactiveX operators documentation: Distinct * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable distinctUntilChanged(BiPredicate comparer) { ObjectHelper.requireNonNull(comparer, "comparer is null"); @@ -6430,6 +6625,7 @@ public final Observable distinctUntilChanged(BiPredicate doAfterNext(Consumer onAfterNext) { @@ -6454,6 +6650,7 @@ public final Observable doAfterNext(Consumer onAfterNext) { * @see ReactiveX operators documentation: Do * @see #doOnTerminate(Action) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doAfterTerminate(Action onFinally) { ObjectHelper.requireNonNull(onFinally, "onFinally is null"); @@ -6477,6 +6674,7 @@ public final Observable doAfterTerminate(Action onFinally) { * @return the new Observable instance * @since 2.0.1 - experimental */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @Experimental public final Observable doFinally(Action onFinally) { @@ -6506,6 +6704,7 @@ public final Observable doFinally(Action onFinally) { * @return the source {@code ObservableSource} modified so as to call this Action when appropriate * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnDispose(Action onDispose) { return doOnLifecycle(Functions.emptyConsumer(), onDispose); @@ -6525,6 +6724,7 @@ public final Observable doOnDispose(Action onDispose) { * @return the source ObservableSource with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnComplete(Action onComplete) { return doOnEach(Functions.emptyConsumer(), Functions.emptyConsumer(), onComplete, Functions.EMPTY_ACTION); @@ -6543,6 +6743,7 @@ public final Observable doOnComplete(Action onComplete) { * @return the source ObservableSource with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) private Observable doOnEach(Consumer onNext, Consumer onError, Action onComplete, Action onAfterTerminate) { ObjectHelper.requireNonNull(onNext, "onNext is null"); @@ -6566,6 +6767,7 @@ private Observable doOnEach(Consumer onNext, ConsumerReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnEach(final Consumer> onNotification) { ObjectHelper.requireNonNull(onNotification, "consumer is null"); @@ -6597,6 +6799,7 @@ public final Observable doOnEach(final Consumer> onNo * @return the source ObservableSource with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnEach(final Observer observer) { ObjectHelper.requireNonNull(observer, "observer is null"); @@ -6624,6 +6827,7 @@ public final Observable doOnEach(final Observer observer) { * @return the source ObservableSource with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnError(Consumer onError) { return doOnEach(Functions.emptyConsumer(), onError, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); @@ -6646,6 +6850,7 @@ public final Observable doOnError(Consumer onError) { * @return the source ObservableSource with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnLifecycle(final Consumer onSubscribe, final Action onDispose) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); @@ -6667,6 +6872,7 @@ public final Observable doOnLifecycle(final Consumer onSu * @return the source ObservableSource with the side-effecting behavior applied * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnNext(Consumer onNext) { return doOnEach(onNext, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); @@ -6689,6 +6895,7 @@ public final Observable doOnNext(Consumer onNext) { * @return the source {@code ObservableSource} modified so as to call this Consumer when appropriate * @see ReactiveX operators documentation: Do */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnSubscribe(Consumer onSubscribe) { return doOnLifecycle(onSubscribe, Functions.EMPTY_ACTION); @@ -6713,6 +6920,7 @@ public final Observable doOnSubscribe(Consumer onSubscrib * @see ReactiveX operators documentation: Do * @see #doAfterTerminate(Action) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable doOnTerminate(final Action onTerminate) { ObjectHelper.requireNonNull(onTerminate, "onTerminate is null"); @@ -6739,6 +6947,7 @@ public final Observable doOnTerminate(final Action onTerminate) { * if {@code index} is less than 0 * @see ReactiveX operators documentation: ElementAt */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe elementAt(long index) { if (index < 0) { @@ -6767,6 +6976,7 @@ public final Maybe elementAt(long index) { * if {@code index} is less than 0 * @see ReactiveX operators documentation: ElementAt */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single elementAt(long index, T defaultItem) { if (index < 0) { @@ -6794,6 +7004,7 @@ public final Single elementAt(long index, T defaultItem) { * if {@code index} is less than 0 * @see ReactiveX operators documentation: ElementAt */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single elementAtOrError(long index) { if (index < 0) { @@ -6818,6 +7029,7 @@ public final Single elementAtOrError(long index) { * evaluates as {@code true} * @see ReactiveX operators documentation: Filter */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable filter(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -6837,6 +7049,7 @@ public final Observable filter(Predicate predicate) { * @return the new Maybe instance * @see ReactiveX operators documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe firstElement() { return elementAt(0L); @@ -6857,6 +7070,7 @@ public final Maybe firstElement() { * @return the new Single instance * @see ReactiveX operators documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single first(T defaultItem) { return elementAt(0L, defaultItem); @@ -6875,6 +7089,7 @@ public final Single first(T defaultItem) { * @return the new Single instance * @see ReactiveX operators documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single firstOrError() { return elementAtOrError(0L); @@ -6900,6 +7115,7 @@ public final Single firstOrError() { * transformation * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper) { return flatMap(mapper, false); @@ -6928,6 +7144,7 @@ public final Observable flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper, boolean delayErrors) { return flatMap(mapper, delayErrors, Integer.MAX_VALUE); @@ -6960,6 +7177,7 @@ public final Observable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper, boolean delayErrors, int maxConcurrency) { return flatMap(mapper, delayErrors, maxConcurrency, bufferSize()); @@ -6994,6 +7212,7 @@ public final Observable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper, boolean delayErrors, int maxConcurrency, int bufferSize) { @@ -7035,6 +7254,7 @@ public final Observable flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap( Function> onNextMapper, @@ -7074,6 +7294,7 @@ public final Observable flatMap( * @see ReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap( Function> onNextMapper, @@ -7110,6 +7331,7 @@ public final Observable flatMap( * @see ReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper, int maxConcurrency) { return flatMap(mapper, false, maxConcurrency, bufferSize()); @@ -7138,6 +7360,7 @@ public final Observable flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper, BiFunction resultSelector) { @@ -7170,6 +7393,7 @@ public final Observable flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper, BiFunction combiner, boolean delayErrors) { @@ -7206,6 +7430,7 @@ public final Observable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper, BiFunction combiner, boolean delayErrors, int maxConcurrency) { @@ -7244,6 +7469,7 @@ public final Observable flatMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(final Function> mapper, final BiFunction combiner, boolean delayErrors, int maxConcurrency, int bufferSize) { @@ -7279,6 +7505,7 @@ public final Observable flatMap(final FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMap(Function> mapper, BiFunction combiner, int maxConcurrency) { @@ -7295,6 +7522,7 @@ public final Observable flatMap(Function mapper) { return flatMapCompletable(mapper, false); @@ -7312,6 +7540,7 @@ public final Completable flatMapCompletable(Function mapper, boolean delayErrors) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -7337,6 +7566,7 @@ public final Completable flatMapCompletable(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMapIterable(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -7367,6 +7597,7 @@ public final Observable flatMapIterable(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMapIterable(final Function> mapper, BiFunction resultSelector) { @@ -7386,6 +7617,7 @@ public final Observable flatMapIterable(final Function Observable flatMapMaybe(Function> mapper) { return flatMapMaybe(mapper, false); @@ -7406,6 +7638,7 @@ public final Observable flatMapMaybe(Function Observable flatMapMaybe(Function> mapper, boolean delayErrors) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -7425,6 +7658,7 @@ public final Observable flatMapMaybe(Function Observable flatMapSingle(Function> mapper) { return flatMapSingle(mapper, false); @@ -7445,6 +7679,7 @@ public final Observable flatMapSingle(Function Observable flatMapSingle(Function> mapper, boolean delayErrors) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -7468,6 +7703,7 @@ public final Observable flatMapSingle(FunctionReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEach(Consumer onNext) { return subscribe(onNext); @@ -7489,6 +7725,7 @@ public final Disposable forEach(Consumer onNext) { * if {@code onNext} is null * @see ReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(Predicate onNext) { return forEachWhile(onNext, Functions.ERROR_CONSUMER, Functions.EMPTY_ACTION); @@ -7513,6 +7750,7 @@ public final Disposable forEachWhile(Predicate onNext) { * if {@code onError} is null * @see ReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(Predicate onNext, Consumer onError) { return forEachWhile(onNext, onError, Functions.EMPTY_ACTION); @@ -7540,6 +7778,7 @@ public final Disposable forEachWhile(Predicate onNext, ConsumerReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(final Predicate onNext, Consumer onError, final Action onComplete) { @@ -7580,6 +7819,7 @@ public final Disposable forEachWhile(final Predicate onNext, Consumer * @see ReactiveX operators documentation: GroupBy */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> groupBy(Function keySelector) { return groupBy(keySelector, (Function)Functions.identity(), false, bufferSize()); @@ -7616,6 +7856,7 @@ public final Observable> groupBy(FunctionReactiveX operators documentation: GroupBy */ @SuppressWarnings({ "unchecked", "rawtypes" }) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> groupBy(Function keySelector, boolean delayError) { return groupBy(keySelector, (Function)Functions.identity(), delayError, bufferSize()); @@ -7652,6 +7893,7 @@ public final Observable> groupBy(FunctionReactiveX operators documentation: GroupBy */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> groupBy(Function keySelector, Function valueSelector) { @@ -7692,6 +7934,7 @@ public final Observable> groupBy(FunctionReactiveX operators documentation: GroupBy */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> groupBy(Function keySelector, Function valueSelector, boolean delayError) { @@ -7734,6 +7977,7 @@ public final Observable> groupBy(FunctionReactiveX operators documentation: GroupBy */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> groupBy(Function keySelector, Function valueSelector, @@ -7776,6 +8020,7 @@ public final Observable> groupBy(FunctionReactiveX operators documentation: Join */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable groupJoin( ObservableSource other, @@ -7800,6 +8045,7 @@ public final Observable groupJoin( * * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable hide() { return RxJavaPlugins.onAssembly(new ObservableHide(this)); @@ -7817,6 +8063,7 @@ public final Observable hide() { * @return the new Completable instance * @see ReactiveX operators documentation: IgnoreElements */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable ignoreElements() { return RxJavaPlugins.onAssembly(new ObservableIgnoreElementsCompletable(this)); @@ -7837,6 +8084,7 @@ public final Completable ignoreElements() { * @return a Single that emits a Boolean * @see ReactiveX operators documentation: Contains */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single isEmpty() { return all(Functions.alwaysFalse()); @@ -7873,6 +8121,7 @@ public final Single isEmpty() { * overlapping durations * @see ReactiveX operators documentation: Join */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable join( ObservableSource other, @@ -7898,6 +8147,7 @@ public final Observable join( * error * @see ReactiveX operators documentation: Last */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe lastElement() { return RxJavaPlugins.onAssembly(new ObservableLastMaybe(this)); @@ -7919,6 +8169,7 @@ public final Maybe lastElement() { * if the source ObservableSource is empty * @see ReactiveX operators documentation: Last */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single last(T defaultItem) { ObjectHelper.requireNonNull(defaultItem, "defaultItem is null"); @@ -7939,6 +8190,7 @@ public final Single last(T defaultItem) { * If the source ObservableSource completes without emitting any items a {@link NoSuchElementException} will be thrown. * @see ReactiveX operators documentation: Last */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single lastOrError() { return RxJavaPlugins.onAssembly(new ObservableLastSingle(this, null)); @@ -7970,6 +8222,7 @@ public final Single lastOrError() { * @return an Observable that is the result of applying the lifted Operator to the source ObservableSource * @see RxJava wiki: Implementing Your Own Operators */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable lift(ObservableOperator lifter) { ObjectHelper.requireNonNull(lifter, "onLift is null"); @@ -7993,6 +8246,7 @@ public final Observable lift(ObservableOperator l * function * @see ReactiveX operators documentation: Map */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable map(Function mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -8013,6 +8267,7 @@ public final Observable map(Function mapper) { * of the source ObservableSource * @see ReactiveX operators documentation: Materialize */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> materialize() { return RxJavaPlugins.onAssembly(new ObservableMaterialize(this)); @@ -8035,6 +8290,7 @@ public final Observable> materialize() { * @return an Observable that emits all of the items emitted by the source ObservableSources * @see ReactiveX operators documentation: Merge */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable mergeWith(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -8055,7 +8311,7 @@ public final Observable mergeWith(ObservableSource other) { *
*

"Island size" indicates how large chunks the unbounded buffer allocates to store the excess elements waiting to be consumed * on the other side of the asynchronous boundary. - * + * * @param scheduler * the {@link Scheduler} to notify {@link Observer}s on * @return the source ObservableSource modified so that its {@link Observer}s are notified on the specified @@ -8066,6 +8322,7 @@ public final Observable mergeWith(ObservableSource other) { * @see #observeOn(Scheduler, boolean) * @see #observeOn(Scheduler, boolean, int) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable observeOn(Scheduler scheduler) { return observeOn(scheduler, false, bufferSize()); @@ -8097,6 +8354,7 @@ public final Observable observeOn(Scheduler scheduler) { * @see #observeOn(Scheduler) * @see #observeOn(Scheduler, boolean, int) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable observeOn(Scheduler scheduler, boolean delayError) { return observeOn(scheduler, delayError, bufferSize()); @@ -8129,6 +8387,7 @@ public final Observable observeOn(Scheduler scheduler, boolean delayError) { * @see #observeOn(Scheduler) * @see #observeOn(Scheduler, boolean) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable observeOn(Scheduler scheduler, boolean delayError, int bufferSize) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -8151,6 +8410,7 @@ public final Observable observeOn(Scheduler scheduler, boolean delayError, in * @return an Observable that emits items from the source ObservableSource of type {@code clazz} * @see ReactiveX operators documentation: Filter */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable ofType(final Class clazz) { ObjectHelper.requireNonNull(clazz, "clazz is null"); @@ -8186,6 +8446,7 @@ public final Observable ofType(final Class clazz) { * @return the original ObservableSource, with appropriately modified behavior * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable onErrorResumeNext(Function> resumeFunction) { ObjectHelper.requireNonNull(resumeFunction, "resumeFunction is null"); @@ -8221,6 +8482,7 @@ public final Observable onErrorResumeNext(FunctionReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable onErrorResumeNext(final ObservableSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -8253,6 +8515,7 @@ public final Observable onErrorResumeNext(final ObservableSource * @return the original ObservableSource with appropriately modified behavior * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable onErrorReturn(Function valueSupplier) { ObjectHelper.requireNonNull(valueSupplier, "valueSupplier is null"); @@ -8285,6 +8548,7 @@ public final Observable onErrorReturn(FunctionReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable onErrorReturnItem(final T item) { ObjectHelper.requireNonNull(item, "item is null"); @@ -8323,6 +8587,7 @@ public final Observable onErrorReturnItem(final T item) { * @return the original ObservableSource, with appropriately modified behavior * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable onExceptionResumeNext(final ObservableSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -8340,6 +8605,7 @@ public final Observable onExceptionResumeNext(final ObservableSource onTerminateDetach() { return RxJavaPlugins.onAssembly(new ObservableDetach(this)); @@ -8360,6 +8626,7 @@ public final Observable onTerminateDetach() { * to its {@link Observer}s * @see ReactiveX operators documentation: Publish */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final ConnectableObservable publish() { return ObservablePublish.create(this); @@ -8384,6 +8651,7 @@ public final ConnectableObservable publish() { * @return an Observable that emits the results of invoking the selector on the items emitted by a {@link ConnectableObservable} that shares a single subscription to the underlying sequence * @see ReactiveX operators documentation: Publish */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable publish(Function, ? extends ObservableSource> selector) { ObjectHelper.requireNonNull(selector, "selector is null"); @@ -8414,6 +8682,7 @@ public final Observable publish(Function, ? extends * @see ReactiveX operators documentation: Reduce * @see Wikipedia: Fold (higher-order function) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe reduce(BiFunction reducer) { return scan(reducer).takeLast(1).singleElement(); @@ -8460,6 +8729,7 @@ public final Maybe reduce(BiFunction reducer) { * @see ReactiveX operators documentation: Reduce * @see Wikipedia: Fold (higher-order function) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single reduce(R seed, BiFunction reducer) { return RxJavaPlugins.onAssembly(new ObservableSingleSingle(scan(seed, reducer).takeLast(1), null)); @@ -8506,6 +8776,7 @@ public final Single reduce(R seed, BiFunction reducer) { * @see ReactiveX operators documentation: Reduce * @see Wikipedia: Fold (higher-order function) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single reduceWith(Callable seedSupplier, BiFunction reducer) { return RxJavaPlugins.onAssembly(new ObservableSingleSingle(scanWith(seedSupplier, reducer).takeLast(1), null)); @@ -8523,6 +8794,7 @@ public final Single reduceWith(Callable seedSupplier, BiFunctionReactiveX operators documentation: Repeat */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable repeat() { return repeat(Long.MAX_VALUE); @@ -8547,6 +8819,7 @@ public final Observable repeat() { * if {@code count} is less than zero * @see ReactiveX operators documentation: Repeat */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable repeat(long times) { if (times < 0) { @@ -8576,6 +8849,7 @@ public final Observable repeat(long times) { * if {@code stop} is null * @see ReactiveX operators documentation: Repeat */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable repeatUntil(BooleanSupplier stop) { ObjectHelper.requireNonNull(stop, "stop is null"); @@ -8601,6 +8875,7 @@ public final Observable repeatUntil(BooleanSupplier stop) { * @return the source ObservableSource modified with repeat logic * @see ReactiveX operators documentation: Repeat */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable repeatWhen(final Function, ? extends ObservableSource> handler) { ObjectHelper.requireNonNull(handler, "handler is null"); @@ -8623,6 +8898,7 @@ public final Observable repeatWhen(final Function, * items to its {@link Observer}s * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final ConnectableObservable replay() { return ObservableReplay.createFrom(this); @@ -8647,6 +8923,7 @@ public final ConnectableObservable replay() { * {@link ConnectableObservable} that shares a single subscription to the source ObservableSource * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable replay(Function, ? extends ObservableSource> selector) { ObjectHelper.requireNonNull(selector, "selector is null"); @@ -8676,6 +8953,7 @@ public final Observable replay(Function, ? extends * replaying no more than {@code bufferSize} items * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable replay(Function, ? extends ObservableSource> selector, final int bufferSize) { ObjectHelper.requireNonNull(selector, "selector is null"); @@ -8710,6 +8988,7 @@ public final Observable replay(Function, ? extends * {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable replay(Function, ? extends ObservableSource> selector, int bufferSize, long time, TimeUnit unit) { return replay(selector, bufferSize, time, unit, Schedulers.computation()); @@ -8747,6 +9026,7 @@ public final Observable replay(Function, ? extends * if {@code bufferSize} is less than zero * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable replay(Function, ? extends ObservableSource> selector, final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.verifyPositive(bufferSize, "bufferSize"); @@ -8780,6 +9060,7 @@ public final Observable replay(Function, ? extends * replaying no more than {@code bufferSize} notifications * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable replay(final Function, ? extends ObservableSource> selector, final int bufferSize, final Scheduler scheduler) { return ObservableReplay.multicastSelector(ObservableInternalHelper.replayCallable(this, bufferSize), @@ -8811,6 +9092,7 @@ public final Observable replay(final Function, ? ex * replaying all items that were emitted within the window defined by {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable replay(Function, ? extends ObservableSource> selector, long time, TimeUnit unit) { return replay(selector, time, unit, Schedulers.computation()); @@ -8843,6 +9125,7 @@ public final Observable replay(Function, ? extends * replaying all items that were emitted within the window defined by {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable replay(Function, ? extends ObservableSource> selector, final long time, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(selector, "selector is null"); @@ -8873,6 +9156,7 @@ public final Observable replay(Function, ? extends * replaying all items * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable replay(final Function, ? extends ObservableSource> selector, final Scheduler scheduler) { ObjectHelper.requireNonNull(selector, "selector is null"); @@ -8899,6 +9183,7 @@ public final Observable replay(final Function, ? ex * replays at most {@code bufferSize} items emitted by that ObservableSource * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final ConnectableObservable replay(final int bufferSize) { return ObservableReplay.create(this, bufferSize); @@ -8927,6 +9212,7 @@ public final ConnectableObservable replay(final int bufferSize) { * {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final ConnectableObservable replay(int bufferSize, long time, TimeUnit unit) { return replay(bufferSize, time, unit, Schedulers.computation()); @@ -8959,6 +9245,7 @@ public final ConnectableObservable replay(int bufferSize, long time, TimeUnit * if {@code bufferSize} is less than zero * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final ConnectableObservable replay(final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.verifyPositive(bufferSize, "bufferSize"); @@ -8987,6 +9274,7 @@ public final ConnectableObservable replay(final int bufferSize, final long ti * replays at most {@code bufferSize} items that were emitted by the ObservableSource * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final ConnectableObservable replay(final int bufferSize, final Scheduler scheduler) { return ObservableReplay.observeOn(replay(bufferSize), scheduler); @@ -9012,6 +9300,7 @@ public final ConnectableObservable replay(final int bufferSize, final Schedul * replays the items that were emitted during the window defined by {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final ConnectableObservable replay(long time, TimeUnit unit) { return replay(time, unit, Schedulers.computation()); @@ -9039,6 +9328,7 @@ public final ConnectableObservable replay(long time, TimeUnit unit) { * replays the items that were emitted during the window defined by {@code time} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final ConnectableObservable replay(final long time, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -9065,6 +9355,7 @@ public final ConnectableObservable replay(final long time, final TimeUnit uni * {@link Scheduler} * @see ReactiveX operators documentation: Replay */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final ConnectableObservable replay(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -9092,6 +9383,7 @@ public final ConnectableObservable replay(final Scheduler scheduler) { * @return the source ObservableSource modified with retry logic * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable retry() { return retry(Long.MAX_VALUE, Functions.alwaysTrue()); @@ -9114,6 +9406,7 @@ public final Observable retry() { * @see #retry() * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable retry(BiPredicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -9145,6 +9438,7 @@ public final Observable retry(BiPredicate * @return the source ObservableSource modified with retry logic * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable retry(long times) { return retry(times, Functions.alwaysTrue()); @@ -9162,6 +9456,7 @@ public final Observable retry(long times) { * @param predicate the predicate called with the failure Throwable and should return true to trigger a retry. * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable retry(long times, Predicate predicate) { if (times < 0) { @@ -9184,6 +9479,7 @@ public final Observable retry(long times, Predicate predic * @param predicate the predicate that receives the failure Throwable and should return true to trigger a retry. * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable retry(Predicate predicate) { return retry(Long.MAX_VALUE, predicate); @@ -9199,6 +9495,7 @@ public final Observable retry(Predicate predicate) { * @param stop the function that should return true to stop retrying * @return the new Observable instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable retryUntil(final BooleanSupplier stop) { ObjectHelper.requireNonNull(stop, "stop is null"); @@ -9253,6 +9550,7 @@ public final Observable retryUntil(final BooleanSupplier stop) { * @return the source ObservableSource modified with retry logic * @see ReactiveX operators documentation: Retry */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable retryWhen( final Function, ? extends ObservableSource> handler) { @@ -9301,6 +9599,7 @@ public final void safeSubscribe(Observer s) { * @see ReactiveX operators documentation: Sample * @see #throttleLast(long, TimeUnit) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable sample(long period, TimeUnit unit) { return sample(period, unit, Schedulers.computation()); @@ -9327,6 +9626,7 @@ public final Observable sample(long period, TimeUnit unit) { * @see ReactiveX operators documentation: Sample * @see #throttleLast(long, TimeUnit, Scheduler) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable sample(long period, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -9353,6 +9653,7 @@ public final Observable sample(long period, TimeUnit unit, Scheduler schedule * the {@code sampler} ObservableSource emits an item or completes * @see ReactiveX operators documentation: Sample */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable sample(ObservableSource sampler) { ObjectHelper.requireNonNull(sampler, "sampler is null"); @@ -9380,6 +9681,7 @@ public final Observable sample(ObservableSource sampler) { * @return an Observable that emits the results of each call to the accumulator function * @see ReactiveX operators documentation: Scan */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable scan(BiFunction accumulator) { ObjectHelper.requireNonNull(accumulator, "accumulator is null"); @@ -9428,6 +9730,7 @@ public final Observable scan(BiFunction accumulator) { * accumulator function * @see ReactiveX operators documentation: Scan */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable scan(final R initialValue, BiFunction accumulator) { ObjectHelper.requireNonNull(initialValue, "seed is null"); @@ -9476,6 +9779,7 @@ public final Observable scan(final R initialValue, BiFunctionReactiveX operators documentation: Scan */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable scanWith(Callable seedSupplier, BiFunction accumulator) { ObjectHelper.requireNonNull(seedSupplier, "seedSupplier is null"); @@ -9503,6 +9807,7 @@ public final Observable scanWith(Callable seedSupplier, BiFunctionReactiveX operators documentation: Serialize */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable serialize() { return RxJavaPlugins.onAssembly(new ObservableSerialized(this)); @@ -9525,6 +9830,7 @@ public final Observable serialize() { * to its {@link Observer}s * @see ReactiveX operators documentation: RefCount */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable share() { return publish().refCount(); @@ -9544,6 +9850,7 @@ public final Observable share() { * @return an Observable that emits the single item emitted by the source ObservableSource * @see ReactiveX operators documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe singleElement() { return RxJavaPlugins.onAssembly(new ObservableSingleMaybe(this)); @@ -9565,6 +9872,7 @@ public final Maybe singleElement() { * @return the new Single instance * @see ReactiveX operators documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single single(T defaultItem) { ObjectHelper.requireNonNull(defaultItem, "defaultItem is null"); @@ -9586,6 +9894,7 @@ public final Single single(T defaultItem) { * @return the new Single instance * @see ReactiveX operators documentation: First */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single singleOrError() { return RxJavaPlugins.onAssembly(new ObservableSingleSingle(this, null)); @@ -9607,6 +9916,7 @@ public final Single singleOrError() { * {@code count} items that the source ObservableSource emits * @see ReactiveX operators documentation: Skip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable skip(long count) { if (count <= 0) { @@ -9634,6 +9944,7 @@ public final Observable skip(long count) { * by {@code time} elapses and the emits the remainder * @see ReactiveX operators documentation: Skip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable skip(long time, TimeUnit unit) { return skipUntil(timer(time, unit)); @@ -9659,6 +9970,7 @@ public final Observable skip(long time, TimeUnit unit) { * by {@code time} and {@code scheduler} elapses, and then emits the remainder * @see ReactiveX operators documentation: Skip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable skip(long time, TimeUnit unit, Scheduler scheduler) { return skipUntil(timer(time, unit, scheduler)); @@ -9686,6 +9998,7 @@ public final Observable skip(long time, TimeUnit unit, Scheduler scheduler) { * if {@code count} is less than zero * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable skipLast(int count) { if (count < 0) { @@ -9718,6 +10031,7 @@ public final Observable skipLast(int count) { * source completes defined by {@code time} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.TRAMPOLINE) public final Observable skipLast(long time, TimeUnit unit) { return skipLast(time, unit, Schedulers.trampoline(), false, bufferSize()); @@ -9747,6 +10061,7 @@ public final Observable skipLast(long time, TimeUnit unit) { * source completes defined by {@code time} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.TRAMPOLINE) public final Observable skipLast(long time, TimeUnit unit, boolean delayError) { return skipLast(time, unit, Schedulers.trampoline(), delayError, bufferSize()); @@ -9774,6 +10089,7 @@ public final Observable skipLast(long time, TimeUnit unit, boolean delayError * source completes defined by {@code time} and {@code scheduler} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable skipLast(long time, TimeUnit unit, Scheduler scheduler) { return skipLast(time, unit, scheduler, false, bufferSize()); @@ -9804,6 +10120,7 @@ public final Observable skipLast(long time, TimeUnit unit, Scheduler schedule * source completes defined by {@code time} and {@code scheduler} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError) { return skipLast(time, unit, scheduler, delayError, bufferSize()); @@ -9836,6 +10153,7 @@ public final Observable skipLast(long time, TimeUnit unit, Scheduler schedule * source completes defined by {@code time} and {@code scheduler} * @see ReactiveX operators documentation: SkipLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -9864,6 +10182,7 @@ public final Observable skipLast(long time, TimeUnit unit, Scheduler schedule * item, then emits the remaining items * @see ReactiveX operators documentation: SkipUntil */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable skipUntil(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -9886,6 +10205,7 @@ public final Observable skipUntil(ObservableSource other) { * predicate becomes false * @see ReactiveX operators documentation: SkipWhile */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable skipWhile(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -9910,6 +10230,7 @@ public final Observable skipWhile(Predicate predicate) { * * @return an Observable that emits the items emitted by the source ObservableSource in sorted order */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable sorted() { return toList().toObservable().map(Functions.listSorter(Functions.naturalComparator())).flatMapIterable(Functions.>identity()); @@ -9932,6 +10253,7 @@ public final Observable sorted() { * that indicates their sort order * @return an Observable that emits the items emitted by the source ObservableSource in sorted order */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable sorted(Comparator sortFunction) { return toList().toObservable().map(Functions.listSorter(sortFunction)).flatMapIterable(Functions.>identity()); @@ -9954,6 +10276,7 @@ public final Observable sorted(Comparator sortFunction) { * @see ReactiveX operators documentation: StartWith */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable startWith(Iterable items) { return concatArray(fromIterable(items), this); @@ -9976,6 +10299,7 @@ public final Observable startWith(Iterable items) { * @see ReactiveX operators documentation: StartWith */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable startWith(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -9999,6 +10323,7 @@ public final Observable startWith(ObservableSource other) { * @see ReactiveX operators documentation: StartWith */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable startWith(T item) { ObjectHelper.requireNonNull(item, "item is null"); @@ -10022,6 +10347,7 @@ public final Observable startWith(T item) { * @see ReactiveX operators documentation: StartWith */ @SuppressWarnings("unchecked") + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable startWithArray(T... items) { Observable fromArray = fromArray(items); @@ -10066,6 +10392,7 @@ public final Disposable subscribe() { * if {@code onNext} is null * @see ReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext) { return subscribe(onNext, Functions.ERROR_CONSUMER, Functions.EMPTY_ACTION, Functions.emptyConsumer()); @@ -10091,6 +10418,7 @@ public final Disposable subscribe(Consumer onNext) { * if {@code onNext} is null, or * if {@code onError} is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext, Consumer onError) { return subscribe(onNext, onError, Functions.EMPTY_ACTION, Functions.emptyConsumer()); @@ -10120,6 +10448,7 @@ public final Disposable subscribe(Consumer onNext, ConsumerReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext, Consumer onError, Action onComplete) { @@ -10152,6 +10481,7 @@ public final Disposable subscribe(Consumer onNext, ConsumerReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext, Consumer onError, Action onComplete, Consumer onSubscribe) { @@ -10248,6 +10578,7 @@ public final > E subscribeWith(E observer) { * @see RxJava Threading Examples * @see #observeOn */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable subscribeOn(Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -10269,6 +10600,7 @@ public final Observable subscribeOn(Scheduler scheduler) { * alternate ObservableSource if the source ObservableSource is empty. * @since 1.1.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable switchIfEmpty(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -10296,6 +10628,7 @@ public final Observable switchIfEmpty(ObservableSource other) { * @return an Observable that emits the items emitted by the ObservableSource returned from applying {@code func} to the most recently emitted item emitted by the source ObservableSource * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable switchMap(Function> mapper) { return switchMap(mapper, bufferSize()); @@ -10324,6 +10657,7 @@ public final Observable switchMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable switchMap(Function> mapper, int bufferSize) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -10362,6 +10696,7 @@ public final Observable switchMap(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable switchMapDelayError(Function> mapper) { return switchMapDelayError(mapper, bufferSize()); @@ -10392,6 +10727,7 @@ public final Observable switchMapDelayError(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable switchMapDelayError(Function> mapper, int bufferSize) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -10427,6 +10763,7 @@ public final Observable switchMapDelayError(FunctionReactiveX operators documentation: Take */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable take(long count) { if (count < 0) { @@ -10452,6 +10789,7 @@ public final Observable take(long count) { * @return an Observable that emits those items emitted by the source ObservableSource before the time runs out * @see ReactiveX operators documentation: Take */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable take(long time, TimeUnit unit) { return takeUntil(timer(time, unit)); @@ -10477,6 +10815,7 @@ public final Observable take(long time, TimeUnit unit) { * according to the specified Scheduler * @see ReactiveX operators documentation: Take */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable take(long time, TimeUnit unit, Scheduler scheduler) { return takeUntil(timer(time, unit, scheduler)); @@ -10500,6 +10839,7 @@ public final Observable take(long time, TimeUnit unit, Scheduler scheduler) { * if {@code count} is less than zero * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable takeLast(int count) { if (count < 0) { @@ -10535,6 +10875,7 @@ public final Observable takeLast(int count) { * in a specified window of time before the ObservableSource completed * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.TRAMPOLINE) public final Observable takeLast(long count, long time, TimeUnit unit) { return takeLast(count, time, unit, Schedulers.trampoline(), false, bufferSize()); @@ -10566,6 +10907,7 @@ public final Observable takeLast(long count, long time, TimeUnit unit) { * if {@code count} is less than zero * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable takeLast(long count, long time, TimeUnit unit, Scheduler scheduler) { return takeLast(count, time, unit, scheduler, false, bufferSize()); @@ -10602,6 +10944,7 @@ public final Observable takeLast(long count, long time, TimeUnit unit, Schedu * if {@code count} is less than zero * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable takeLast(long count, long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -10631,6 +10974,7 @@ public final Observable takeLast(long count, long time, TimeUnit unit, Schedu * time before the ObservableSource completed specified by {@code time} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.TRAMPOLINE) public final Observable takeLast(long time, TimeUnit unit) { return takeLast(time, unit, Schedulers.trampoline(), false, bufferSize()); @@ -10657,6 +11001,7 @@ public final Observable takeLast(long time, TimeUnit unit) { * time before the ObservableSource completed specified by {@code time} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.TRAMPOLINE) public final Observable takeLast(long time, TimeUnit unit, boolean delayError) { return takeLast(time, unit, Schedulers.trampoline(), delayError, bufferSize()); @@ -10684,6 +11029,7 @@ public final Observable takeLast(long time, TimeUnit unit, boolean delayError * provided by {@code scheduler} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable takeLast(long time, TimeUnit unit, Scheduler scheduler) { return takeLast(time, unit, scheduler, false, bufferSize()); @@ -10714,6 +11060,7 @@ public final Observable takeLast(long time, TimeUnit unit, Scheduler schedule * provided by {@code scheduler} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable takeLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError) { return takeLast(time, unit, scheduler, delayError, bufferSize()); @@ -10746,6 +11093,7 @@ public final Observable takeLast(long time, TimeUnit unit, Scheduler schedule * provided by {@code scheduler} * @see ReactiveX operators documentation: TakeLast */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable takeLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { return takeLast(Long.MAX_VALUE, time, unit, scheduler, delayError, bufferSize); @@ -10769,6 +11117,7 @@ public final Observable takeLast(long time, TimeUnit unit, Scheduler schedule * @return an Observable that emits the items emitted by the source Observable until such time as {@code other} emits its first item * @see ReactiveX operators documentation: TakeUntil */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable takeUntil(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -10797,6 +11146,7 @@ public final Observable takeUntil(ObservableSource other) { * @see Observable#takeWhile(Predicate) * @since 1.1.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable takeUntil(Predicate stopPredicate) { ObjectHelper.requireNonNull(stopPredicate, "predicate is null"); @@ -10820,6 +11170,7 @@ public final Observable takeUntil(Predicate stopPredicate) { * @see ReactiveX operators documentation: TakeWhile * @see Observable#takeUntil(Predicate) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable takeWhile(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -10846,6 +11197,7 @@ public final Observable takeWhile(Predicate predicate) { * @return an Observable that performs the throttle operation * @see ReactiveX operators documentation: Sample */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable throttleFirst(long windowDuration, TimeUnit unit) { return throttleFirst(windowDuration, unit, Schedulers.computation()); @@ -10874,6 +11226,7 @@ public final Observable throttleFirst(long windowDuration, TimeUnit unit) { * @return an Observable that performs the throttle operation * @see ReactiveX operators documentation: Sample */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable throttleFirst(long skipDuration, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -10903,6 +11256,7 @@ public final Observable throttleFirst(long skipDuration, TimeUnit unit, Sched * @see ReactiveX operators documentation: Sample * @see #sample(long, TimeUnit) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable throttleLast(long intervalDuration, TimeUnit unit) { return sample(intervalDuration, unit); @@ -10933,6 +11287,7 @@ public final Observable throttleLast(long intervalDuration, TimeUnit unit) { * @see ReactiveX operators documentation: Sample * @see #sample(long, TimeUnit, Scheduler) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable throttleLast(long intervalDuration, TimeUnit unit, Scheduler scheduler) { return sample(intervalDuration, unit, scheduler); @@ -10969,6 +11324,7 @@ public final Observable throttleLast(long intervalDuration, TimeUnit unit, Sc * @see ReactiveX operators documentation: Debounce * @see #debounce(long, TimeUnit) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable throttleWithTimeout(long timeout, TimeUnit unit) { return debounce(timeout, unit); @@ -11009,6 +11365,7 @@ public final Observable throttleWithTimeout(long timeout, TimeUnit unit) { * @see ReactiveX operators documentation: Debounce * @see #debounce(long, TimeUnit, Scheduler) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable throttleWithTimeout(long timeout, TimeUnit unit, Scheduler scheduler) { return debounce(timeout, unit, scheduler); @@ -11028,6 +11385,7 @@ public final Observable throttleWithTimeout(long timeout, TimeUnit unit, Sche * @return an Observable that emits time interval information items * @see ReactiveX operators documentation: TimeInterval */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> timeInterval() { return timeInterval(TimeUnit.MILLISECONDS, Schedulers.computation()); @@ -11049,6 +11407,7 @@ public final Observable> timeInterval() { * @return an Observable that emits time interval information items * @see ReactiveX operators documentation: TimeInterval */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Observable> timeInterval(Scheduler scheduler) { return timeInterval(TimeUnit.MILLISECONDS, scheduler); @@ -11069,6 +11428,7 @@ public final Observable> timeInterval(Scheduler scheduler) { * @return an Observable that emits time interval information items * @see ReactiveX operators documentation: TimeInterval */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) // Trampoline scheduler is only used for creating timestamps. public final Observable> timeInterval(TimeUnit unit) { return timeInterval(unit, Schedulers.computation()); @@ -11091,6 +11451,7 @@ public final Observable> timeInterval(TimeUnit unit) { * @return an Observable that emits time interval information items * @see ReactiveX operators documentation: TimeInterval */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Observable> timeInterval(TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -11122,6 +11483,7 @@ public final Observable> timeInterval(TimeUnit unit, Scheduler schedule * the time window defined by the selector for the previously emitted item * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable timeout(Function> itemTimeoutIndicator) { return timeout0(null, itemTimeoutIndicator, null); @@ -11153,6 +11515,7 @@ public final Observable timeout(FunctionReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable timeout(Function> itemTimeoutIndicator, ObservableSource other) { @@ -11179,6 +11542,7 @@ public final Observable timeout(FunctionReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable timeout(long timeout, TimeUnit timeUnit) { return timeout0(timeout, timeUnit, null, Schedulers.computation()); @@ -11204,6 +11568,7 @@ public final Observable timeout(long timeout, TimeUnit timeUnit) { * @return the source ObservableSource modified to switch to the fallback ObservableSource in case of a timeout * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable timeout(long timeout, TimeUnit timeUnit, ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -11233,6 +11598,7 @@ public final Observable timeout(long timeout, TimeUnit timeUnit, ObservableSo * timeout * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler, ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -11261,6 +11627,7 @@ public final Observable timeout(long timeout, TimeUnit timeUnit, Scheduler sc * timeout * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler) { return timeout0(timeout, timeUnit, null, scheduler); @@ -11293,6 +11660,7 @@ public final Observable timeout(long timeout, TimeUnit timeUnit, Scheduler sc * the time windows specified by the timeout selectors * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable timeout(ObservableSource firstTimeoutIndicator, Function> itemTimeoutIndicator) { @@ -11332,6 +11700,7 @@ public final Observable timeout(ObservableSource firstTimeoutIndica * if {@code other} is null * @see ReactiveX operators documentation: Timeout */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable timeout( ObservableSource firstTimeoutIndicator, @@ -11371,6 +11740,7 @@ private Observable timeout0( * @return an Observable that emits timestamped items from the source ObservableSource * @see ReactiveX operators documentation: Timestamp */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> timestamp() { return timestamp(TimeUnit.MILLISECONDS, Schedulers.computation()); @@ -11393,6 +11763,7 @@ public final Observable> timestamp() { * the {@code scheduler} * @see ReactiveX operators documentation: Timestamp */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Observable> timestamp(Scheduler scheduler) { return timestamp(TimeUnit.MILLISECONDS, scheduler); @@ -11413,6 +11784,7 @@ public final Observable> timestamp(Scheduler scheduler) { * @return an Observable that emits timestamped items from the source ObservableSource * @see ReactiveX operators documentation: Timestamp */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> timestamp(TimeUnit unit) { return timestamp(unit, Schedulers.computation()); @@ -11436,6 +11808,7 @@ public final Observable> timestamp(TimeUnit unit) { * the {@code scheduler} * @see ReactiveX operators documentation: Timestamp */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Observable> timestamp(final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -11455,6 +11828,7 @@ public final Observable> timestamp(final TimeUnit unit, final Scheduler * @param converter the function that receives the current Observable instance and returns a value * @return the value returned by the function */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final R to(Function, R> converter) { try { @@ -11488,6 +11862,7 @@ public final R to(Function, R> converter) { * ObservableSource * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toList() { return toList(16); @@ -11518,6 +11893,7 @@ public final Single> toList() { * ObservableSource * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toList(final int capacityHint) { ObjectHelper.verifyPositive(capacityHint, "capacityHint"); @@ -11550,6 +11926,7 @@ public final Single> toList(final int capacityHint) { * ObservableSource * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final > Single toList(Callable collectionSupplier) { ObjectHelper.requireNonNull(collectionSupplier, "collectionSupplier is null"); @@ -11575,6 +11952,7 @@ public final > Single toList(Callable coll * ObservableSource * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap(final Function keySelector) { return collect(HashMapSupplier.asCallable(), Functions.toMapKeySelector(keySelector)); @@ -11603,6 +11981,7 @@ public final Single> toMap(final Function * ObservableSource * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap( final Function keySelector, @@ -11634,6 +12013,7 @@ public final Single> toMap( * source ObservableSource * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap( final Function keySelector, @@ -11659,6 +12039,7 @@ public final Single> toMap( * the source ObservableSource * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap(Function keySelector) { @SuppressWarnings({ "rawtypes", "unchecked" }) @@ -11689,6 +12070,7 @@ public final Single>> toMultimap(FunctionReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap(Function keySelector, Function valueSelector) { Callable>> mapSupplier = HashMapSupplier.asCallable(); @@ -11721,6 +12103,7 @@ public final Single>> toMultimap(FunctionReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap( final Function keySelector, @@ -11757,6 +12140,7 @@ public final Single>> toMultimap( * ObservableSource * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap( Function keySelector, @@ -11779,6 +12163,7 @@ public final Single>> toMultimap( * @return the new Flowable instance */ @BackpressureSupport(BackpressureKind.SPECIAL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable toFlowable(BackpressureStrategy strategy) { Flowable o = new FlowableFromObservable(this); @@ -11815,6 +12200,7 @@ public final Flowable toFlowable(BackpressureStrategy strategy) { * sorted order * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList() { return toSortedList(Functions.naturalOrder()); @@ -11837,6 +12223,7 @@ public final Single> toSortedList() { * sorted order * @see ReactiveX operators documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList(final Comparator comparator) { ObjectHelper.requireNonNull(comparator, "comparator is null"); @@ -11863,6 +12250,7 @@ public final Single> toSortedList(final Comparator comparator * @see ReactiveX operators documentation: To * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList(final Comparator comparator, int capacityHint) { ObjectHelper.requireNonNull(comparator, "comparator is null"); @@ -11891,6 +12279,7 @@ public final Single> toSortedList(final Comparator comparator * @see ReactiveX operators documentation: To * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList(int capacityHint) { return toSortedList(Functions.naturalOrder(), capacityHint); @@ -11910,6 +12299,7 @@ public final Single> toSortedList(int capacityHint) { * {@link Scheduler} * @see ReactiveX operators documentation: SubscribeOn */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable unsubscribeOn(Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -11935,6 +12325,7 @@ public final Observable unsubscribeOn(Scheduler scheduler) { * @throws IllegalArgumentException if either count is non-positive * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window(long count) { return window(count, count, bufferSize()); @@ -11962,6 +12353,7 @@ public final Observable> window(long count) { * @throws IllegalArgumentException if either count or skip is non-positive * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window(long count, long skip) { return window(count, skip, bufferSize()); @@ -11991,6 +12383,7 @@ public final Observable> window(long count, long skip) { * @throws IllegalArgumentException if either count or skip is non-positive * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window(long count, long skip, int bufferSize) { ObjectHelper.verifyPositive(count, "count"); @@ -12021,6 +12414,7 @@ public final Observable> window(long count, long skip, int bufferS * @return an Observable that emits new windows periodically as a fixed timespan elapses * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable> window(long timespan, long timeskip, TimeUnit unit) { return window(timespan, timeskip, unit, Schedulers.computation(), bufferSize()); @@ -12050,6 +12444,7 @@ public final Observable> window(long timespan, long timeskip, Time * @return an Observable that emits new windows periodically as a fixed timespan elapses * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler) { return window(timespan, timeskip, unit, scheduler, bufferSize()); @@ -12081,6 +12476,7 @@ public final Observable> window(long timespan, long timeskip, Time * @return an Observable that emits new windows periodically as a fixed timespan elapses * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler, int bufferSize) { ObjectHelper.verifyPositive(timespan, "timespan"); @@ -12112,6 +12508,7 @@ public final Observable> window(long timespan, long timeskip, Time * source ObservableSource during fixed, consecutive durations * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable> window(long timespan, TimeUnit unit) { return window(timespan, unit, Schedulers.computation(), Long.MAX_VALUE, false); @@ -12142,6 +12539,7 @@ public final Observable> window(long timespan, TimeUnit unit) { * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable> window(long timespan, TimeUnit unit, long count) { @@ -12175,6 +12573,7 @@ public final Observable> window(long timespan, TimeUnit unit, * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable> window(long timespan, TimeUnit unit, long count, boolean restart) { @@ -12204,6 +12603,7 @@ public final Observable> window(long timespan, TimeUnit unit, * source ObservableSource within a fixed duration * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> window(long timespan, TimeUnit unit, Scheduler scheduler) { @@ -12237,6 +12637,7 @@ public final Observable> window(long timespan, TimeUnit unit, * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> window(long timespan, TimeUnit unit, Scheduler scheduler, long count) { @@ -12272,6 +12673,7 @@ public final Observable> window(long timespan, TimeUnit unit, * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> window(long timespan, TimeUnit unit, Scheduler scheduler, long count, boolean restart) { @@ -12309,6 +12711,7 @@ public final Observable> window(long timespan, TimeUnit unit, * (whichever occurs first) * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Observable> window( long timespan, TimeUnit unit, Scheduler scheduler, @@ -12340,6 +12743,7 @@ public final Observable> window( * ObservableSource * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window(ObservableSource boundary) { return window(boundary, bufferSize()); @@ -12367,6 +12771,7 @@ public final Observable> window(ObservableSource boundary) * ObservableSource * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window(ObservableSource boundary, int bufferSize) { ObjectHelper.requireNonNull(boundary, "boundary is null"); @@ -12396,6 +12801,7 @@ public final Observable> window(ObservableSource boundary, * the specified window-governing ObservableSources * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window( ObservableSource openingIndicator, @@ -12428,6 +12834,7 @@ public final Observable> window( * the specified window-governing ObservableSources * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window( ObservableSource openingIndicator, @@ -12458,6 +12865,7 @@ public final Observable> window( * whenever {@code closingIndicator} emits an item * @see ReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window(Callable> boundary) { return window(boundary, bufferSize()); @@ -12485,6 +12893,7 @@ public final Observable> window(CallableReactiveX operators documentation: Window */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable> window(Callable> boundary, int bufferSize) { ObjectHelper.requireNonNull(boundary, "boundary is null"); @@ -12515,6 +12924,7 @@ public final Observable> window(CallableReactiveX operators documentation: CombineLatest */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable withLatestFrom(ObservableSource other, BiFunction combiner) { ObjectHelper.requireNonNull(other, "other is null"); @@ -12547,6 +12957,7 @@ public final Observable withLatestFrom(ObservableSource o * @return the new ObservableSource instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable withLatestFrom( ObservableSource o1, ObservableSource o2, @@ -12584,6 +12995,7 @@ public final Observable withLatestFrom( * @return the new ObservableSource instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable withLatestFrom( ObservableSource o1, ObservableSource o2, @@ -12625,6 +13037,7 @@ public final Observable withLatestFrom( * @return the new ObservableSource instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable withLatestFrom( ObservableSource o1, ObservableSource o2, @@ -12660,6 +13073,7 @@ public final Observable withLatestFrom( * @return the new ObservableSource instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable withLatestFrom(ObservableSource[] others, Function combiner) { ObjectHelper.requireNonNull(others, "others is null"); @@ -12688,6 +13102,7 @@ public final Observable withLatestFrom(ObservableSource[] others, Func * @return the new ObservableSource instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable withLatestFrom(Iterable> others, Function combiner) { ObjectHelper.requireNonNull(others, "others is null"); @@ -12721,6 +13136,7 @@ public final Observable withLatestFrom(IterableReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable zipWith(Iterable other, BiFunction zipper) { ObjectHelper.requireNonNull(other, "other is null"); @@ -12763,6 +13179,7 @@ public final Observable zipWith(Iterable other, BiFunctionReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable zipWith(ObservableSource other, BiFunction zipper) { @@ -12808,6 +13225,7 @@ public final Observable zipWith(ObservableSource other, * @see ReactiveX operators documentation: Zip * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable zipWith(ObservableSource other, BiFunction zipper, boolean delayError) { @@ -12854,6 +13272,7 @@ public final Observable zipWith(ObservableSource other, * @see ReactiveX operators documentation: Zip * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable zipWith(ObservableSource other, BiFunction zipper, boolean delayError, int bufferSize) { @@ -12884,7 +13303,7 @@ public final TestObserver test() { // NoPMD /** * Creates a TestObserver, optionally disposes it and then subscribes * it to this Observable. - * + * *

*
Scheduler:
*
{@code test} does not operate by default on a particular {@link Scheduler}.
diff --git a/src/main/java/io/reactivex/Single.java b/src/main/java/io/reactivex/Single.java index 2083171cb1..5e38eb0afb 100644 --- a/src/main/java/io/reactivex/Single.java +++ b/src/main/java/io/reactivex/Single.java @@ -70,6 +70,7 @@ public abstract class Single implements SingleSource { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single amb(final Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -88,6 +89,7 @@ public static Single amb(final Iterable Single ambArray(final SingleSource... sources) { @@ -114,6 +116,7 @@ public static Single ambArray(final SingleSource... sources) * @return the new Flowable instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public static Flowable concat(Iterable> sources) { @@ -132,6 +135,7 @@ public static Flowable concat(Iterable Observable concat(ObservableSource> sources) { @@ -153,6 +157,7 @@ public static Observable concat(ObservableSource Flowable concat(Publisher> sources) { @@ -175,6 +180,7 @@ public static Flowable concat(Publisher Flowable concat(PublisherReactiveX operators documentation: Concat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -234,6 +241,7 @@ public static Flowable concat( * @return a Flowable that emits items emitted by the three source Singles, one after the other. * @see ReactiveX operators documentation: Concat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -270,6 +278,7 @@ public static Flowable concat( * @return a Flowable that emits items emitted by the four source Singles, one after the other. * @see ReactiveX operators documentation: Concat */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -298,6 +307,7 @@ public static Flowable concat( * @return the new Flowable instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -340,6 +350,7 @@ public static Flowable concatArray(SingleSource... sources) * @see SingleOnSubscribe * @see Cancellable */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single create(SingleOnSubscribe source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -358,6 +369,7 @@ public static Single create(SingleOnSubscribe source) { * returns a SingleSource instance to subscribe to * @return the new Single instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single defer(final Callable> singleSupplier) { ObjectHelper.requireNonNull(singleSupplier, "singleSupplier is null"); @@ -375,6 +387,7 @@ public static Single defer(final Callable Single error(final Callable errorSupplier) { ObjectHelper.requireNonNull(errorSupplier, "errorSupplier is null"); @@ -399,6 +412,7 @@ public static Single error(final Callable errorSuppl * the subscriber subscribes to it * @see ReactiveX operators documentation: Throw */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single error(final Throwable exception) { ObjectHelper.requireNonNull(exception, "error is null"); @@ -422,6 +436,7 @@ public static Single error(final Throwable exception) { * the type of the item emitted by the {@link Single}. * @return a {@link Single} whose {@link SingleObserver}s' subscriptions trigger an invocation of the given function. */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single fromCallable(final Callable callable) { ObjectHelper.requireNonNull(callable, "callable is null"); @@ -451,6 +466,7 @@ public static Single fromCallable(final Callable callable) { * @return a {@code Single} that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single fromFuture(Future future) { return toSingle(Flowable.fromFuture(future)); @@ -483,6 +499,7 @@ public static Single fromFuture(Future future) { * @return a {@code Single} that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single fromFuture(Future future, long timeout, TimeUnit unit) { return toSingle(Flowable.fromFuture(future, timeout, unit)); @@ -517,6 +534,7 @@ public static Single fromFuture(Future future, long timeout, * @return a {@code Single} that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Single fromFuture(Future future, long timeout, TimeUnit unit, Scheduler scheduler) { return toSingle(Flowable.fromFuture(future, timeout, unit, scheduler)); @@ -546,6 +564,7 @@ public static Single fromFuture(Future future, long timeout, * @return a {@code Single} that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Single fromFuture(Future future, Scheduler scheduler) { return toSingle(Flowable.fromFuture(future, scheduler)); @@ -567,6 +586,7 @@ public static Single fromFuture(Future future, Scheduler sch * @return the new Single instance */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single fromPublisher(final Publisher publisher) { ObjectHelper.requireNonNull(publisher, "publisher is null"); @@ -588,6 +608,7 @@ public static Single fromPublisher(final Publisher publisher * the type of the item emitted by the {@link Single}. * @return the new Single instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single fromObservable(ObservableSource observableSource) { ObjectHelper.requireNonNull(observableSource, "observableSource is null"); @@ -613,6 +634,7 @@ public static Single fromObservable(ObservableSource observa * @return a {@code Single} that emits {@code item} * @see ReactiveX operators documentation: Just */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single just(final T item) { ObjectHelper.requireNonNull(item, "value is null"); @@ -633,6 +655,7 @@ public static Single just(final T item) { * @return the new Flowable instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Iterable> sources) { @@ -653,6 +676,7 @@ public static Flowable merge(Iterable * @return the new Flowable instance * @since 2.0 */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -678,6 +702,7 @@ public static Flowable merge(PublisherReactiveX operators documentation: Merge */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) public static Single merge(SingleSource> source) { @@ -707,6 +732,7 @@ public static Single merge(SingleSourceReactiveX operators documentation: Merge */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -742,6 +768,7 @@ public static Flowable merge( * @return a Flowable that emits all of the items emitted by the source Singles * @see ReactiveX operators documentation: Merge */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -781,6 +808,7 @@ public static Flowable merge( * @return a Flowable that emits all of the items emitted by the source Singles * @see ReactiveX operators documentation: Merge */ + @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -805,6 +833,7 @@ public static Flowable merge( * @return the singleton never instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single never() { @@ -822,6 +851,7 @@ public static Single never() { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Single timer(long delay, TimeUnit unit) { return timer(delay, unit, Schedulers.computation()); @@ -839,6 +869,7 @@ public static Single timer(long delay, TimeUnit unit) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static Single timer(final long delay, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -858,6 +889,7 @@ public static Single timer(final long delay, final TimeUnit unit, final Sc * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single equals(final SingleSource first, final SingleSource second) { // NOPMD ObjectHelper.requireNonNull(first, "first is null"); @@ -880,6 +912,7 @@ public static Single equals(final SingleSource first, * instead. * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single unsafeCreate(SingleSource onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); @@ -908,6 +941,7 @@ public static Single unsafeCreate(SingleSource onSubscribe) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single using(Callable resourceSupplier, Function> singleFunction, @@ -937,6 +971,7 @@ public static Single using(Callable resourceSupplier, * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single using( final Callable resourceSupplier, @@ -961,6 +996,7 @@ public static Single using( * @param source the source to wrap * @return the Single wrapper or the source cast to Single (if possible) */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single wrap(SingleSource source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -996,6 +1032,7 @@ public static Single wrap(SingleSource source) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Single zip(final Iterable> sources, Function zipper) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -1025,6 +1062,7 @@ public static Single zip(final IterableReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1062,6 +1100,7 @@ public static Single zip( * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1104,6 +1143,7 @@ public static Single zip( * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1150,6 +1190,7 @@ public static Single zip( * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1201,6 +1242,7 @@ public static Single zip( * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1256,6 +1298,7 @@ public static Single zip( * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1316,6 +1359,7 @@ public static Single zip( * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1380,6 +1424,7 @@ public static Single zip( * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1428,6 +1473,7 @@ public static Single zip( * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({"rawtypes", "unchecked"}) public static Single zipArray(Function zipper, SingleSource... sources) { @@ -1452,6 +1498,7 @@ public static Single zipArray(Function * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public final Single ambWith(SingleSource other) { @@ -1469,6 +1516,7 @@ public final Single ambWith(SingleSource other) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single hide() { return RxJavaPlugins.onAssembly(new SingleHide(this)); @@ -1492,6 +1540,7 @@ public final Single hide() { * @return the source Single, transformed by the transformer function * @see RxJava wiki: Implementing Your Own Operators */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single compose(SingleTransformer transformer) { return wrap(transformer.apply(this)); @@ -1509,6 +1558,7 @@ public final Single compose(SingleTransformer transformer) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single cache() { return RxJavaPlugins.onAssembly(new SingleCache(this)); @@ -1526,6 +1576,7 @@ public final Single cache() { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single cast(final Class clazz) { ObjectHelper.requireNonNull(clazz, "clazz is null"); @@ -1551,6 +1602,7 @@ public final Single cast(final Class clazz) { * @see ReactiveX operators documentation: Concat */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatWith(SingleSource other) { return concat(this, other); @@ -1569,6 +1621,7 @@ public final Flowable concatWith(SingleSource other) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Single delay(long time, TimeUnit unit) { return delay(time, unit, Schedulers.computation()); @@ -1588,6 +1641,7 @@ public final Single delay(long time, TimeUnit unit) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single delay(final long time, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -1609,6 +1663,7 @@ public final Single delay(final long time, final TimeUnit unit, final Schedul * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single delaySubscription(CompletableSource other) { return RxJavaPlugins.onAssembly(new SingleDelayWithCompletable(this, other)); @@ -1629,6 +1684,7 @@ public final Single delaySubscription(CompletableSource other) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single delaySubscription(SingleSource other) { return RxJavaPlugins.onAssembly(new SingleDelayWithSingle(this, other)); @@ -1649,6 +1705,7 @@ public final Single delaySubscription(SingleSource other) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single delaySubscription(ObservableSource other) { return RxJavaPlugins.onAssembly(new SingleDelayWithObservable(this, other)); @@ -1674,6 +1731,7 @@ public final Single delaySubscription(ObservableSource other) { * @since 2.0 */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single delaySubscription(Publisher other) { return RxJavaPlugins.onAssembly(new SingleDelayWithPublisher(this, other)); @@ -1692,6 +1750,7 @@ public final Single delaySubscription(Publisher other) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Single delaySubscription(long time, TimeUnit unit) { return delaySubscription(time, unit, Schedulers.computation()); @@ -1711,6 +1770,7 @@ public final Single delaySubscription(long time, TimeUnit unit) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single delaySubscription(long time, TimeUnit unit, Scheduler scheduler) { return delaySubscription(Observable.timer(time, unit, scheduler)); @@ -1728,6 +1788,7 @@ public final Single delaySubscription(long time, TimeUnit unit, Scheduler * @return the new Single instance * @since 2.0.1 - experimental */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @Experimental public final Single doAfterSuccess(Consumer onAfterSuccess) { @@ -1750,6 +1811,7 @@ public final Single doAfterSuccess(Consumer onAfterSuccess) { * @return the new Single instance * @since 2.0.1 - experimental */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @Experimental public final Single doFinally(Action onFinally) { @@ -1768,6 +1830,7 @@ public final Single doFinally(Action onFinally) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnSubscribe(final Consumer onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); @@ -1785,6 +1848,7 @@ public final Single doOnSubscribe(final Consumer onSubscr * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnSuccess(final Consumer onSuccess) { ObjectHelper.requireNonNull(onSuccess, "onSuccess is null"); @@ -1802,6 +1866,7 @@ public final Single doOnSuccess(final Consumer onSuccess) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnEvent(final BiConsumer onEvent) { ObjectHelper.requireNonNull(onEvent, "onEvent is null"); @@ -1819,6 +1884,7 @@ public final Single doOnEvent(final BiConsumer * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnError(final Consumer onError) { ObjectHelper.requireNonNull(onError, "onError is null"); @@ -1836,6 +1902,7 @@ public final Single doOnError(final Consumer onError) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnDispose(final Action onDispose) { ObjectHelper.requireNonNull(onDispose, "onDispose is null"); @@ -1859,6 +1926,7 @@ public final Single doOnDispose(final Action onDispose) { * evaluates as {@code true} * @see ReactiveX operators documentation: Filter */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe filter(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -1881,6 +1949,7 @@ public final Maybe filter(Predicate predicate) { * @return the Single returned from {@code mapper} when applied to the item emitted by the source Single * @see ReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single flatMap(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -1903,6 +1972,7 @@ public final Single flatMap(FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe flatMapMaybe(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -1930,6 +2000,7 @@ public final Maybe flatMapMaybe(final FunctionReactiveX operators documentation: FlatMap */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMapPublisher(Function> mapper) { return toFlowable().flatMap(mapper); @@ -1956,6 +2027,7 @@ public final Flowable flatMapPublisher(FunctionReactiveX operators documentation: FlatMap */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flattenAsFlowable(final Function> mapper) { return RxJavaPlugins.onAssembly(new SingleFlatMapIterableFlowable(this, mapper)); @@ -1978,6 +2050,7 @@ public final Flowable flattenAsFlowable(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flattenAsObservable(final Function> mapper) { return RxJavaPlugins.onAssembly(new SingleFlatMapIterableObservable(this, mapper)); @@ -1999,6 +2072,7 @@ public final Observable flattenAsObservable(final FunctionReactiveX operators documentation: FlatMap */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMapObservable(Function> mapper) { return toObservable().flatMap(mapper); @@ -2021,6 +2095,7 @@ public final Observable flatMapObservable(FunctionReactiveX operators documentation: FlatMap * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable flatMapCompletable(final Function mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2036,6 +2111,7 @@ public final Completable flatMapCompletable(final Function * @return the success value */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final T blockingGet() { BlockingMultiObserver observer = new BlockingMultiObserver(); @@ -2066,6 +2142,7 @@ public final T blockingGet() { * @return a Single that is the result of applying the lifted Operator to the source Single * @see RxJava wiki: Implementing Your Own Operators */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single lift(final SingleOperator lift) { ObjectHelper.requireNonNull(lift, "onLift is null"); @@ -2088,6 +2165,7 @@ public final Single lift(final SingleOperator lif * @return a Single that emits the item from the source Single, transformed by the specified function * @see ReactiveX operators documentation: Map */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single map(Function mapper) { return RxJavaPlugins.onAssembly(new SingleMap(this, mapper)); @@ -2104,6 +2182,7 @@ public final Single map(Function mapper) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single contains(Object value) { return contains(value, ObjectHelper.equalsPredicate()); @@ -2122,6 +2201,7 @@ public final Single contains(Object value) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single contains(final Object value, final BiPredicate comparer) { ObjectHelper.requireNonNull(value, "value is null"); @@ -2149,6 +2229,7 @@ public final Single contains(final Object value, final BiPredicateReactiveX operators documentation: Merge */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable mergeWith(SingleSource other) { return merge(this, other); @@ -2172,6 +2253,7 @@ public final Flowable mergeWith(SingleSource other) { * @see RxJava Threading Examples * @see #subscribeOn */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -2204,6 +2286,7 @@ public final Single observeOn(final Scheduler scheduler) { * @return the original Single with appropriately modified behavior * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single onErrorReturn(final Function resumeFunction) { ObjectHelper.requireNonNull(resumeFunction, "resumeFunction is null"); @@ -2220,6 +2303,7 @@ public final Single onErrorReturn(final Function resu * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single onErrorReturnItem(final T value) { ObjectHelper.requireNonNull(value, "value is null"); @@ -2253,6 +2337,7 @@ public final Single onErrorReturnItem(final T value) { * @return the original Single, with appropriately modified behavior. * @see ReactiveX operators documentation: Catch */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single onErrorResumeNext(final Single resumeSingleInCaseOfError) { ObjectHelper.requireNonNull(resumeSingleInCaseOfError, "resumeSingleInCaseOfError is null"); @@ -2287,6 +2372,7 @@ public final Single onErrorResumeNext(final Single resumeSingleI * @see ReactiveX operators documentation: Catch * @since .20 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single onErrorResumeNext( final Function> resumeFunctionInCaseOfError) { @@ -2306,6 +2392,7 @@ public final Single onErrorResumeNext( * @since 2.0 */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeat() { return toFlowable().repeat(); @@ -2324,6 +2411,7 @@ public final Flowable repeat() { * @since 2.0 */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeat(long times) { return toFlowable().repeat(times); @@ -2348,6 +2436,7 @@ public final Flowable repeat(long times) { * @since 2.0 */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeatWhen(Function, ? extends Publisher> handler) { return toFlowable().repeatWhen(handler); @@ -2367,6 +2456,7 @@ public final Flowable repeatWhen(Function, ? extends * @since 2.0 */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeatUntil(BooleanSupplier stop) { return toFlowable().repeatUntil(stop); @@ -2381,6 +2471,7 @@ public final Flowable repeatUntil(BooleanSupplier stop) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single retry() { return toSingle(toFlowable().retry()); @@ -2397,6 +2488,7 @@ public final Single retry() { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single retry(long times) { return toSingle(toFlowable().retry(times)); @@ -2414,6 +2506,7 @@ public final Single retry(long times) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single retry(BiPredicate predicate) { return toSingle(toFlowable().retry(predicate)); @@ -2431,6 +2524,7 @@ public final Single retry(BiPredicate pre * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single retry(Predicate predicate) { return toSingle(toFlowable().retry(predicate)); @@ -2452,6 +2546,7 @@ public final Single retry(Predicate predicate) { * be the output of the resulting Single * @return the new Single instance */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single retryWhen(Function, ? extends Publisher> handler) { return toSingle(toFlowable().retryWhen(handler)); @@ -2488,6 +2583,7 @@ public final Disposable subscribe() { * @throws NullPointerException * if {@code onCallback} is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(final BiConsumer onCallback) { ObjectHelper.requireNonNull(onCallback, "onCallback is null"); @@ -2511,6 +2607,7 @@ public final Disposable subscribe(final BiConsumer * if {@code onSuccess} is null * @see ReactiveX operators documentation: Subscribe */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onSuccess) { return subscribe(onSuccess, Functions.ERROR_CONSUMER); @@ -2535,6 +2632,7 @@ public final Disposable subscribe(Consumer onSuccess) { * if {@code onSuccess} is null, or * if {@code onError} is null */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(final Consumer onSuccess, final Consumer onError) { ObjectHelper.requireNonNull(onSuccess, "onSuccess is null"); @@ -2619,6 +2717,7 @@ public final > E subscribeWith(E observer) { * @see RxJava Threading Examples * @see #observeOn */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single subscribeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -2642,6 +2741,7 @@ public final Single subscribeOn(final Scheduler scheduler) { * @return a Single that emits the item emitted by the source Single until such time as {@code other} terminates. * @see ReactiveX operators documentation: TakeUntil */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single takeUntil(final CompletableSource other) { return takeUntil(new CompletableToFlowable(other)); @@ -2671,6 +2771,7 @@ public final Single takeUntil(final CompletableSource other) { * @see ReactiveX operators documentation: TakeUntil */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single takeUntil(final Publisher other) { return RxJavaPlugins.onAssembly(new SingleTakeUntil(this, other)); @@ -2694,6 +2795,7 @@ public final Single takeUntil(final Publisher other) { * @return a Single that emits the item emitted by the source Single until such time as {@code other} emits its item * @see ReactiveX operators documentation: TakeUntil */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single takeUntil(final SingleSource other) { return takeUntil(new SingleToFlowable(other)); @@ -2711,6 +2813,7 @@ public final Single takeUntil(final SingleSource other) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Single timeout(long timeout, TimeUnit unit) { return timeout0(timeout, unit, Schedulers.computation(), null); @@ -2730,6 +2833,7 @@ public final Single timeout(long timeout, TimeUnit unit) { * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler) { return timeout0(timeout, unit, scheduler, null); @@ -2749,6 +2853,7 @@ public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler) * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler, SingleSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2769,6 +2874,7 @@ public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler, * @return the new Single instance * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Single timeout(long timeout, TimeUnit unit, SingleSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2794,6 +2900,7 @@ private Single timeout0(final long timeout, final TimeUnit unit, final Schedu * * @return the value returned by the convert function */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final R to(Function, R> convert) { try { @@ -2822,6 +2929,7 @@ public final R to(Function, R> convert) { * @see ReactiveX documentation: Completable * @since 2.0 */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable toCompletable() { return RxJavaPlugins.onAssembly(new CompletableFromSingle(this)); @@ -2841,6 +2949,7 @@ public final Completable toCompletable() { * @return a {@link Flowable} that emits a single item T or an error. */ @BackpressureSupport(BackpressureKind.FULL) + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public final Flowable toFlowable() { @@ -2862,6 +2971,7 @@ public final Flowable toFlowable() { * @return a {@link Future} that expects a single item to be emitted by this {@code Single} * @see ReactiveX documentation: To */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Future toFuture() { return subscribeWith(new FutureSingleObserver()); @@ -2878,6 +2988,7 @@ public final Future toFuture() { * * @return a {@link Maybe} that emits a single item T or an error. */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public final Maybe toMaybe() { @@ -2897,6 +3008,7 @@ public final Maybe toMaybe() { * * @return an {@link Observable} that emits a single item T or an error. */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public final Observable toObservable() { @@ -2929,6 +3041,7 @@ public final Observable toObservable() { * and emits the results of {@code zipFunction} applied to these pairs * @see ReactiveX operators documentation: Zip */ + @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single zipWith(SingleSource other, BiFunction zipper) { return zip(this, other, zipper); diff --git a/src/main/java/io/reactivex/annotations/CheckReturnValue.java b/src/main/java/io/reactivex/annotations/CheckReturnValue.java index 0af6b90a78..ecb8f33776 100644 --- a/src/main/java/io/reactivex/annotations/CheckReturnValue.java +++ b/src/main/java/io/reactivex/annotations/CheckReturnValue.java @@ -21,7 +21,7 @@ /** * Marks methods whose return values should be checked. - * + * * @since 2.0.2 - experimental */ @Retention(RetentionPolicy.RUNTIME) diff --git a/src/test/java/io/reactivex/BaseTypeAnnotations.java b/src/test/java/io/reactivex/BaseTypeAnnotations.java index 3e9c3501a6..ad0b18e2d1 100644 --- a/src/test/java/io/reactivex/BaseTypeAnnotations.java +++ b/src/test/java/io/reactivex/BaseTypeAnnotations.java @@ -15,7 +15,7 @@ import static org.junit.Assert.fail; -import java.lang.reflect.Method; +import java.lang.reflect.*; import org.junit.Test; import org.reactivestreams.Publisher; @@ -25,6 +25,7 @@ /** * Verifies several properties. *
    + *
  • Certain public base type methods have the {@link CheckReturnValue} present
  • *
  • All public base type methods have the {@link SchedulerSupport} present
  • *
  • All public base type methods which return Flowable have the {@link BackpressureSupport} present
  • *
  • All public base types that don't return Flowable don't have the {@link BackpressureSupport} present (these are copy-paste errors)
  • @@ -32,6 +33,51 @@ */ public class BaseTypeAnnotations { + static void checkCheckReturnValueSupport(Class clazz) { + StringBuilder b = new StringBuilder(); + + for (Method m : clazz.getMethods()) { + if (m.getName().equals("bufferSize")) { + continue; + } + if (m.getDeclaringClass() == clazz) { + boolean isSubscribeMethod = "subscribe".equals(m.getName()) && m.getParameterCount() == 0; + boolean isAnnotationPresent = m.isAnnotationPresent(CheckReturnValue.class); + + if (isSubscribeMethod) { + if (isAnnotationPresent) { + b.append("subscribe() method has @CheckReturnValue: ").append(m).append("\r\n"); + } + continue; + } + + if (Modifier.isPrivate(m.getModifiers()) && isAnnotationPresent) { + b.append("Private method has @CheckReturnValue: ").append(m).append("\r\n"); + continue; + } + + if (m.getReturnType().equals(Void.TYPE)) { + if (isAnnotationPresent) { + b.append("Void method has @CheckReturnValue: ").append(m).append("\r\n"); + } + continue; + } + + if (!isAnnotationPresent) { + b.append("Missing @CheckReturnValue: ").append(m).append("\r\n"); + } + } + } + + if (b.length() != 0) { + System.out.println(clazz); + System.out.println("------------------------"); + System.out.println(b); + + fail(b.toString()); + } + } + static void checkSchedulerSupport(Class clazz) { StringBuilder b = new StringBuilder(); @@ -128,6 +174,31 @@ static void checkBackpressureSupport(Class clazz) { } } + @Test + public void checkReturnValueFlowable() { + checkCheckReturnValueSupport(Flowable.class); + } + + @Test + public void checkReturnValueObservable() { + checkCheckReturnValueSupport(Observable.class); + } + + @Test + public void checkReturnValueSingle() { + checkCheckReturnValueSupport(Single.class); + } + + @Test + public void checkReturnValueCompletable() { + checkCheckReturnValueSupport(Completable.class); + } + + @Test + public void checkReturnValueMaybe() { + checkCheckReturnValueSupport(Maybe.class); + } + @Test public void schedulerSupportFlowable() { checkSchedulerSupport(Flowable.class); From 94571e5e30180ebcf337e01540d2b5f5f0c639c7 Mon Sep 17 00:00:00 2001 From: Niklas Baudy Date: Thu, 24 Nov 2016 15:38:21 +0100 Subject: [PATCH 3/3] Java 6 Compatibility --- src/test/java/io/reactivex/BaseTypeAnnotations.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/io/reactivex/BaseTypeAnnotations.java b/src/test/java/io/reactivex/BaseTypeAnnotations.java index ad0b18e2d1..716c90616e 100644 --- a/src/test/java/io/reactivex/BaseTypeAnnotations.java +++ b/src/test/java/io/reactivex/BaseTypeAnnotations.java @@ -41,7 +41,7 @@ static void checkCheckReturnValueSupport(Class clazz) { continue; } if (m.getDeclaringClass() == clazz) { - boolean isSubscribeMethod = "subscribe".equals(m.getName()) && m.getParameterCount() == 0; + boolean isSubscribeMethod = "subscribe".equals(m.getName()) && m.getParameterTypes().length == 0; boolean isAnnotationPresent = m.isAnnotationPresent(CheckReturnValue.class); if (isSubscribeMethod) {