Skip to content

Commit 0acd24a

Browse files
committed
add some annotations
1 parent 045b7ce commit 0acd24a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/io/reactivex/rxjava4/core/Streamable.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ default Streamable<T> hide() {
450450
* @return the new {@code Streamable} instance
451451
* @throw NullPointerException if {@code mapper} is {@code null}
452452
*/
453+
@CheckReturnValue
454+
@NonNull
453455
default <@NonNull R> Streamable<R> map(@NonNull Function<? super T, ? extends R> mapper) {
454456
Objects.requireNonNull(mapper, "mapper is null");
455457
return RxJavaPlugins.onAssembly(new StreamableMap<>(this, mapper));
@@ -463,6 +465,8 @@ default Streamable<T> hide() {
463465
* @return the new {@code Streamable} instance
464466
* @throw NullPointerException if {@code mapper} is {@code null}
465467
*/
468+
@CheckReturnValue
469+
@NonNull
466470
default <@NonNull R> Streamable<R> mapOptional(@NonNull Function<? super T, ? extends Optional<? extends R>> mapper) {
467471
Objects.requireNonNull(mapper, "mapper is null");
468472
return RxJavaPlugins.onAssembly(new StreamableMapOptional<>(this, mapper));

0 commit comments

Comments
 (0)