diff --git a/src/main/java/io/reactivex/CompletableEmitter.java b/src/main/java/io/reactivex/CompletableEmitter.java index 3943083988..a1bd1e69bf 100644 --- a/src/main/java/io/reactivex/CompletableEmitter.java +++ b/src/main/java/io/reactivex/CompletableEmitter.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.*; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Cancellable; @@ -35,21 +36,21 @@ public interface CompletableEmitter { * Signal an exception. * @param t the exception, not null */ - void onError(Throwable t); + void onError(@NonNull Throwable t); /** * Sets a Disposable on this emitter; any previous Disposable * or Cancellation will be disposed/cancelled. * @param d the disposable, null is allowed */ - void setDisposable(Disposable d); + void setDisposable(@Nullable Disposable d); /** * Sets a Cancellable on this emitter; any previous Disposable * or Cancellation will be disposed/cancelled. * @param c the cancellable resource, null is allowed */ - void setCancellable(Cancellable c); + void setCancellable(@Nullable Cancellable c); /** * Returns true if the downstream disposed the sequence. diff --git a/src/main/java/io/reactivex/CompletableObserver.java b/src/main/java/io/reactivex/CompletableObserver.java index 47c626e0e1..54695d9a41 100644 --- a/src/main/java/io/reactivex/CompletableObserver.java +++ b/src/main/java/io/reactivex/CompletableObserver.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.NonNull; import io.reactivex.disposables.Disposable; /** @@ -24,7 +25,7 @@ public interface CompletableObserver { * then can be used to cancel the subscription at any time. * @param d the Disposable instance to call dispose on for cancellation, not null */ - void onSubscribe(Disposable d); + void onSubscribe(@NonNull Disposable d); /** * Called once the deferred computation completes normally. @@ -35,5 +36,5 @@ public interface CompletableObserver { * Called once if the deferred computation 'throws' an exception. * @param e the exception, not null. */ - void onError(Throwable e); + void onError(@NonNull Throwable e); } diff --git a/src/main/java/io/reactivex/CompletableOnSubscribe.java b/src/main/java/io/reactivex/CompletableOnSubscribe.java index 1a403a5674..f4dae79f5d 100644 --- a/src/main/java/io/reactivex/CompletableOnSubscribe.java +++ b/src/main/java/io/reactivex/CompletableOnSubscribe.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * A functional interface that has a {@code subscribe()} method that receives * an instance of a {@link CompletableEmitter} instance that allows pushing @@ -24,6 +26,6 @@ public interface CompletableOnSubscribe { * @param e the safe emitter instance, never null * @throws Exception on error */ - void subscribe(CompletableEmitter e) throws Exception; + void subscribe(@NonNull CompletableEmitter e) throws Exception; } diff --git a/src/main/java/io/reactivex/CompletableOperator.java b/src/main/java/io/reactivex/CompletableOperator.java index d7edcfb454..749e41fa05 100644 --- a/src/main/java/io/reactivex/CompletableOperator.java +++ b/src/main/java/io/reactivex/CompletableOperator.java @@ -13,6 +13,8 @@ package io.reactivex; +import io.reactivex.annotations.*; + /** * Interface to map/wrap a downstream observer to an upstream observer. */ @@ -23,5 +25,6 @@ public interface CompletableOperator { * @return the parent CompletableObserver instance * @throws Exception on failure */ - CompletableObserver apply(CompletableObserver observer) throws Exception; + @NonNull + CompletableObserver apply(@NonNull CompletableObserver observer) throws Exception; } diff --git a/src/main/java/io/reactivex/CompletableSource.java b/src/main/java/io/reactivex/CompletableSource.java index 09d41d58f6..57019f3164 100644 --- a/src/main/java/io/reactivex/CompletableSource.java +++ b/src/main/java/io/reactivex/CompletableSource.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * Represents a basic {@link Completable} source base interface, * consumable via an {@link CompletableObserver}. @@ -25,5 +27,5 @@ public interface CompletableSource { * @param cs the CompletableObserver, not null * @throws NullPointerException if {@code cs} is null */ - void subscribe(CompletableObserver cs); + void subscribe(@NonNull CompletableObserver cs); } diff --git a/src/main/java/io/reactivex/CompletableTransformer.java b/src/main/java/io/reactivex/CompletableTransformer.java index 15948f8112..f6569916ef 100644 --- a/src/main/java/io/reactivex/CompletableTransformer.java +++ b/src/main/java/io/reactivex/CompletableTransformer.java @@ -13,6 +13,8 @@ package io.reactivex; +import io.reactivex.annotations.*; + /** * Convenience interface and callback used by the compose operator to turn a Completable into another * Completable fluently. @@ -23,5 +25,6 @@ public interface CompletableTransformer { * @param upstream the upstream Completable instance * @return the transformed CompletableSource instance */ - CompletableSource apply(Completable upstream); + @NonNull + CompletableSource apply(@NonNull Completable upstream); } diff --git a/src/main/java/io/reactivex/FlowableEmitter.java b/src/main/java/io/reactivex/FlowableEmitter.java index 12eff99923..855ff08b6b 100644 --- a/src/main/java/io/reactivex/FlowableEmitter.java +++ b/src/main/java/io/reactivex/FlowableEmitter.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.*; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Cancellable; @@ -35,14 +36,14 @@ public interface FlowableEmitter extends Emitter { * or Cancellation will be unsubscribed/cancelled. * @param s the disposable, null is allowed */ - void setDisposable(Disposable s); + void setDisposable(@Nullable Disposable s); /** * Sets a Cancellable on this emitter; any previous Disposable * or Cancellation will be unsubscribed/cancelled. * @param c the cancellable resource, null is allowed */ - void setCancellable(Cancellable c); + void setCancellable(@Nullable Cancellable c); /** * The current outstanding request amount. @@ -62,5 +63,6 @@ public interface FlowableEmitter extends Emitter { * Ensures that calls to onNext, onError and onComplete are properly serialized. * @return the serialized FlowableEmitter */ + @NonNull FlowableEmitter serialize(); } diff --git a/src/main/java/io/reactivex/FlowableOnSubscribe.java b/src/main/java/io/reactivex/FlowableOnSubscribe.java index 50f0c0ab09..40911eb3cd 100644 --- a/src/main/java/io/reactivex/FlowableOnSubscribe.java +++ b/src/main/java/io/reactivex/FlowableOnSubscribe.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * A functional interface that has a {@code subscribe()} method that receives * an instance of a {@link FlowableEmitter} instance that allows pushing @@ -26,6 +28,6 @@ public interface FlowableOnSubscribe { * @param e the safe emitter instance, never null * @throws Exception on error */ - void subscribe(FlowableEmitter e) throws Exception; + void subscribe(@NonNull FlowableEmitter e) throws Exception; } diff --git a/src/main/java/io/reactivex/FlowableOperator.java b/src/main/java/io/reactivex/FlowableOperator.java index d7b803103b..4211a3ab52 100644 --- a/src/main/java/io/reactivex/FlowableOperator.java +++ b/src/main/java/io/reactivex/FlowableOperator.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.*; import org.reactivestreams.Subscriber; /** @@ -28,5 +29,6 @@ public interface FlowableOperator { * @return the parent Subscriber instance * @throws Exception on failure */ - Subscriber apply(Subscriber observer) throws Exception; + @NonNull + Subscriber apply(@NonNull Subscriber observer) throws Exception; } diff --git a/src/main/java/io/reactivex/FlowableSubscriber.java b/src/main/java/io/reactivex/FlowableSubscriber.java index dabd898dae..8076c5c143 100644 --- a/src/main/java/io/reactivex/FlowableSubscriber.java +++ b/src/main/java/io/reactivex/FlowableSubscriber.java @@ -13,10 +13,9 @@ package io.reactivex; +import io.reactivex.annotations.*; import org.reactivestreams.*; -import io.reactivex.annotations.Experimental; - /** * Represents a Reactive-Streams inspired Subscriber that is RxJava 2 only * and weakens rules §1.3 and §3.9 of the specification for gaining performance. @@ -37,5 +36,5 @@ public interface FlowableSubscriber extends Subscriber { * {@inheritDoc} */ @Override - void onSubscribe(Subscription s); + void onSubscribe(@NonNull Subscription s); } diff --git a/src/main/java/io/reactivex/FlowableTransformer.java b/src/main/java/io/reactivex/FlowableTransformer.java index f1ad26b5b3..78a0f43e9d 100644 --- a/src/main/java/io/reactivex/FlowableTransformer.java +++ b/src/main/java/io/reactivex/FlowableTransformer.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.*; import org.reactivestreams.Publisher; /** @@ -28,5 +29,6 @@ public interface FlowableTransformer { * @param upstream the upstream Flowable instance * @return the transformed Publisher instance */ - Publisher apply(Flowable upstream); + @NonNull + Publisher apply(@NonNull Flowable upstream); } diff --git a/src/main/java/io/reactivex/MaybeEmitter.java b/src/main/java/io/reactivex/MaybeEmitter.java index c05e4408f9..38389d250f 100644 --- a/src/main/java/io/reactivex/MaybeEmitter.java +++ b/src/main/java/io/reactivex/MaybeEmitter.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.*; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Cancellable; @@ -32,13 +33,13 @@ public interface MaybeEmitter { * Signal a success value. * @param t the value, not null */ - void onSuccess(T t); + void onSuccess(@NonNull T t); /** * Signal an exception. * @param t the exception, not null */ - void onError(Throwable t); + void onError(@NonNull Throwable t); /** * Signal the completion. @@ -50,14 +51,14 @@ public interface MaybeEmitter { * or Cancellation will be unsubscribed/cancelled. * @param s the disposable, null is allowed */ - void setDisposable(Disposable s); + void setDisposable(@Nullable Disposable s); /** * Sets a Cancellable on this emitter; any previous Disposable * or Cancellation will be unsubscribed/cancelled. * @param c the cancellable resource, null is allowed */ - void setCancellable(Cancellable c); + void setCancellable(@Nullable Cancellable c); /** * Returns true if the downstream cancelled the sequence. diff --git a/src/main/java/io/reactivex/MaybeObserver.java b/src/main/java/io/reactivex/MaybeObserver.java index d2d3b7e6a1..42a0ac7bfe 100644 --- a/src/main/java/io/reactivex/MaybeObserver.java +++ b/src/main/java/io/reactivex/MaybeObserver.java @@ -13,7 +13,9 @@ package io.reactivex; +import io.reactivex.annotations.*; import io.reactivex.disposables.Disposable; + /** * Provides a mechanism for receiving push-based notifications. *

@@ -37,7 +39,7 @@ public interface MaybeObserver { * @param d the Disposable instance whose {@link Disposable#dispose()} can * be called anytime to cancel the connection */ - void onSubscribe(Disposable d); + void onSubscribe(@NonNull Disposable d); /** * Notifies the MaybeObserver with one item and that the {@link Maybe} has finished sending @@ -48,7 +50,7 @@ public interface MaybeObserver { * @param t * the item emitted by the Maybe */ - void onSuccess(T t); + void onSuccess(@NonNull T t); /** * Notifies the MaybeObserver that the {@link Maybe} has experienced an error condition. @@ -58,7 +60,7 @@ public interface MaybeObserver { * @param e * the exception encountered by the Maybe */ - void onError(Throwable e); + void onError(@NonNull Throwable e); /** * Called once the deferred computation completes normally. diff --git a/src/main/java/io/reactivex/MaybeOnSubscribe.java b/src/main/java/io/reactivex/MaybeOnSubscribe.java index 255bf8401a..9c03275797 100644 --- a/src/main/java/io/reactivex/MaybeOnSubscribe.java +++ b/src/main/java/io/reactivex/MaybeOnSubscribe.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * A functional interface that has a {@code subscribe()} method that receives * an instance of a {@link MaybeEmitter} instance that allows pushing @@ -26,6 +28,6 @@ public interface MaybeOnSubscribe { * @param e the safe emitter instance, never null * @throws Exception on error */ - void subscribe(MaybeEmitter e) throws Exception; + void subscribe(@NonNull MaybeEmitter e) throws Exception; } diff --git a/src/main/java/io/reactivex/MaybeOperator.java b/src/main/java/io/reactivex/MaybeOperator.java index 0bd3ab15d6..9e7a54f122 100644 --- a/src/main/java/io/reactivex/MaybeOperator.java +++ b/src/main/java/io/reactivex/MaybeOperator.java @@ -10,9 +10,10 @@ * 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; +import io.reactivex.annotations.*; + /** * Interface to map/wrap a downstream observer to an upstream observer. * @@ -26,5 +27,6 @@ public interface MaybeOperator { * @return the parent MaybeObserver instance * @throws Exception on failure */ - MaybeObserver apply(MaybeObserver observer) throws Exception; + @NonNull + MaybeObserver apply(@NonNull MaybeObserver observer) throws Exception; } diff --git a/src/main/java/io/reactivex/MaybeSource.java b/src/main/java/io/reactivex/MaybeSource.java index 697c51c745..4694eb0cef 100644 --- a/src/main/java/io/reactivex/MaybeSource.java +++ b/src/main/java/io/reactivex/MaybeSource.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * Represents a basic {@link Maybe} source base interface, * consumable via an {@link MaybeObserver}. @@ -29,5 +31,5 @@ public interface MaybeSource { * @param observer the MaybeObserver, not null * @throws NullPointerException if {@code observer} is null */ - void subscribe(MaybeObserver observer); + void subscribe(@NonNull MaybeObserver observer); } diff --git a/src/main/java/io/reactivex/MaybeTransformer.java b/src/main/java/io/reactivex/MaybeTransformer.java index 51874dec63..1526913b53 100644 --- a/src/main/java/io/reactivex/MaybeTransformer.java +++ b/src/main/java/io/reactivex/MaybeTransformer.java @@ -13,6 +13,8 @@ package io.reactivex; +import io.reactivex.annotations.*; + /** * Interface to compose Maybes. * @@ -26,5 +28,6 @@ public interface MaybeTransformer { * @param upstream the upstream Maybe instance * @return the transformed MaybeSource instance */ - MaybeSource apply(Maybe upstream); + @NonNull + MaybeSource apply(@NonNull Maybe upstream); } diff --git a/src/main/java/io/reactivex/ObservableEmitter.java b/src/main/java/io/reactivex/ObservableEmitter.java index 94f324e019..bf2c890038 100644 --- a/src/main/java/io/reactivex/ObservableEmitter.java +++ b/src/main/java/io/reactivex/ObservableEmitter.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.*; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Cancellable; @@ -34,14 +35,14 @@ public interface ObservableEmitter extends Emitter { * or Cancellation will be unsubscribed/cancelled. * @param d the disposable, null is allowed */ - void setDisposable(Disposable d); + void setDisposable(@Nullable Disposable d); /** * Sets a Cancellable on this emitter; any previous Disposable * or Cancellation will be unsubscribed/cancelled. * @param c the cancellable resource, null is allowed */ - void setCancellable(Cancellable c); + void setCancellable(@Nullable Cancellable c); /** * Returns true if the downstream disposed the sequence. @@ -53,5 +54,6 @@ public interface ObservableEmitter extends Emitter { * Ensures that calls to onNext, onError and onComplete are properly serialized. * @return the serialized ObservableEmitter */ + @NonNull ObservableEmitter serialize(); } diff --git a/src/main/java/io/reactivex/ObservableOnSubscribe.java b/src/main/java/io/reactivex/ObservableOnSubscribe.java index 7c386e5fb4..6ed97c7779 100644 --- a/src/main/java/io/reactivex/ObservableOnSubscribe.java +++ b/src/main/java/io/reactivex/ObservableOnSubscribe.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * A functional interface that has a {@code subscribe()} method that receives * an instance of an {@link ObservableEmitter} instance that allows pushing @@ -26,6 +28,6 @@ public interface ObservableOnSubscribe { * @param e the safe emitter instance, never null * @throws Exception on error */ - void subscribe(ObservableEmitter e) throws Exception; + void subscribe(@NonNull ObservableEmitter e) throws Exception; } diff --git a/src/main/java/io/reactivex/ObservableOperator.java b/src/main/java/io/reactivex/ObservableOperator.java index ad4df3e6ff..18ec3ecef6 100644 --- a/src/main/java/io/reactivex/ObservableOperator.java +++ b/src/main/java/io/reactivex/ObservableOperator.java @@ -13,6 +13,8 @@ package io.reactivex; +import io.reactivex.annotations.*; + /** * Interface to map/wrap a downstream observer to an upstream observer. * @@ -26,5 +28,6 @@ public interface ObservableOperator { * @return the parent Observer instance * @throws Exception on failure */ - Observer apply(Observer observer) throws Exception; + @NonNull + Observer apply(@NonNull Observer observer) throws Exception; } diff --git a/src/main/java/io/reactivex/ObservableSource.java b/src/main/java/io/reactivex/ObservableSource.java index f5890a1d9f..ea0b16490b 100644 --- a/src/main/java/io/reactivex/ObservableSource.java +++ b/src/main/java/io/reactivex/ObservableSource.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * Represents a basic, non-backpressured {@link Observable} source base interface, * consumable via an {@link Observer}. @@ -26,5 +28,5 @@ public interface ObservableSource { * @param observer the Observer, not null * @throws NullPointerException if {@code observer} is null */ - void subscribe(Observer observer); + void subscribe(@NonNull Observer observer); } diff --git a/src/main/java/io/reactivex/ObservableTransformer.java b/src/main/java/io/reactivex/ObservableTransformer.java index 1de17a7f69..a7f20eb965 100644 --- a/src/main/java/io/reactivex/ObservableTransformer.java +++ b/src/main/java/io/reactivex/ObservableTransformer.java @@ -13,6 +13,8 @@ package io.reactivex; +import io.reactivex.annotations.*; + /** * Interface to compose Observables. * @@ -26,5 +28,6 @@ public interface ObservableTransformer { * @param upstream the upstream Observable instance * @return the transformed ObservableSource instance */ - ObservableSource apply(Observable upstream); + @NonNull + ObservableSource apply(@NonNull Observable upstream); } diff --git a/src/main/java/io/reactivex/SingleEmitter.java b/src/main/java/io/reactivex/SingleEmitter.java index 8c49c4c79d..5e23c7d5a5 100644 --- a/src/main/java/io/reactivex/SingleEmitter.java +++ b/src/main/java/io/reactivex/SingleEmitter.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.*; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Cancellable; @@ -32,27 +33,27 @@ public interface SingleEmitter { * Signal a success value. * @param t the value, not null */ - void onSuccess(T t); + void onSuccess(@NonNull T t); /** * Signal an exception. * @param t the exception, not null */ - void onError(Throwable t); + void onError(@NonNull Throwable t); /** * Sets a Disposable on this emitter; any previous Disposable * or Cancellation will be unsubscribed/cancelled. * @param s the disposable, null is allowed */ - void setDisposable(Disposable s); + void setDisposable(@Nullable Disposable s); /** * Sets a Cancellable on this emitter; any previous Disposable * or Cancellation will be unsubscribed/cancelled. * @param c the cancellable resource, null is allowed */ - void setCancellable(Cancellable c); + void setCancellable(@Nullable Cancellable c); /** * Returns true if the downstream cancelled the sequence. diff --git a/src/main/java/io/reactivex/SingleObserver.java b/src/main/java/io/reactivex/SingleObserver.java index 9a81fc3134..eeda4af342 100644 --- a/src/main/java/io/reactivex/SingleObserver.java +++ b/src/main/java/io/reactivex/SingleObserver.java @@ -13,6 +13,7 @@ package io.reactivex; +import io.reactivex.annotations.*; import io.reactivex.disposables.Disposable; /** @@ -39,7 +40,7 @@ public interface SingleObserver { * be called anytime to cancel the connection * @since 2.0 */ - void onSubscribe(Disposable d); + void onSubscribe(@NonNull Disposable d); /** * Notifies the SingleObserver with a single item and that the {@link Single} has finished sending @@ -50,7 +51,7 @@ public interface SingleObserver { * @param t * the item emitted by the Single */ - void onSuccess(T t); + void onSuccess(@NonNull T t); /** * Notifies the SingleObserver that the {@link Single} has experienced an error condition. @@ -60,5 +61,5 @@ public interface SingleObserver { * @param e * the exception encountered by the Single */ - void onError(Throwable e); + void onError(@NonNull Throwable e); } diff --git a/src/main/java/io/reactivex/SingleOnSubscribe.java b/src/main/java/io/reactivex/SingleOnSubscribe.java index a2ce2751ee..1f65502729 100644 --- a/src/main/java/io/reactivex/SingleOnSubscribe.java +++ b/src/main/java/io/reactivex/SingleOnSubscribe.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * A functional interface that has a {@code subscribe()} method that receives * an instance of a {@link SingleEmitter} instance that allows pushing @@ -26,6 +28,6 @@ public interface SingleOnSubscribe { * @param e the safe emitter instance, never null * @throws Exception on error */ - void subscribe(SingleEmitter e) throws Exception; + void subscribe(@NonNull SingleEmitter e) throws Exception; } diff --git a/src/main/java/io/reactivex/SingleOperator.java b/src/main/java/io/reactivex/SingleOperator.java index a6b260e264..92ccfe7927 100644 --- a/src/main/java/io/reactivex/SingleOperator.java +++ b/src/main/java/io/reactivex/SingleOperator.java @@ -13,6 +13,8 @@ package io.reactivex; +import io.reactivex.annotations.*; + /** * Interface to map/wrap a downstream observer to an upstream observer. * @@ -26,5 +28,6 @@ public interface SingleOperator { * @return the parent SingleObserver instance * @throws Exception on failure */ - SingleObserver apply(SingleObserver observer) throws Exception; + @NonNull + SingleObserver apply(@NonNull SingleObserver observer) throws Exception; } diff --git a/src/main/java/io/reactivex/SingleSource.java b/src/main/java/io/reactivex/SingleSource.java index 421b9d921b..befdd5858a 100644 --- a/src/main/java/io/reactivex/SingleSource.java +++ b/src/main/java/io/reactivex/SingleSource.java @@ -12,6 +12,8 @@ */ package io.reactivex; +import io.reactivex.annotations.*; + /** * Represents a basic {@link Single} source base interface, * consumable via an {@link SingleObserver}. @@ -29,5 +31,5 @@ public interface SingleSource { * @param observer the SingleObserver, not null * @throws NullPointerException if {@code observer} is null */ - void subscribe(SingleObserver observer); + void subscribe(@NonNull SingleObserver observer); } diff --git a/src/main/java/io/reactivex/SingleTransformer.java b/src/main/java/io/reactivex/SingleTransformer.java index b4cf57b57e..bb0a7c1a06 100644 --- a/src/main/java/io/reactivex/SingleTransformer.java +++ b/src/main/java/io/reactivex/SingleTransformer.java @@ -13,6 +13,8 @@ package io.reactivex; +import io.reactivex.annotations.*; + /** * Interface to compose Singles. * @@ -26,5 +28,6 @@ public interface SingleTransformer { * @param upstream the upstream Single instance * @return the transformed SingleSource instance */ - SingleSource apply(Single upstream); + @NonNull + SingleSource apply(@NonNull Single upstream); }