Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x: Update the javadoc description of cast() #7606

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/main/java/io/reactivex/rxjava3/core/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -7475,8 +7475,10 @@ public final Flowable<T> cacheWithInitialCapacity(int initialCapacity) {
}

/**
* Returns a {@code Flowable} that emits the items emitted by the current {@code Flowable}, converted to the specified
* type.
* Returns a {@code Flowable} that emits the upstream items while
* they can be cast via {@link Class#cast(Object)} until the upstream terminates,
* or until the upstream signals an item which can't be cast,
* resulting in a {@link ClassCastException} to be signaled to the downstream.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/cast.v3.png" alt="">
* <dl>
Expand All @@ -7489,8 +7491,7 @@ public final Flowable<T> cacheWithInitialCapacity(int initialCapacity) {
*
* @param <U> the output value type cast to
* @param clazz
* the target class type that {@code cast} will cast the items emitted by the current {@code Flowable}
* into before emitting them from the resulting {@code Flowable}
* the target class to use to try and cast the upstream items into
* @return the new {@code Flowable} instance
* @throws NullPointerException if {@code clazz} is {@code null}
* @see <a href="http://reactivex.io/documentation/operators/map.html">ReactiveX operators documentation: Map</a>
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/io/reactivex/rxjava3/core/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -6668,8 +6668,10 @@ public final Observable<T> cacheWithInitialCapacity(int initialCapacity) {
}

/**
* Returns an {@code Observable} that emits the items emitted by the current {@code Observable}, converted to the specified
* type.
* Returns an {@code Observable} that emits the upstream items while
* they can be cast via {@link Class#cast(Object)} until the upstream terminates,
* or until the upstream signals an item which can't be cast,
* resulting in a {@link ClassCastException} to be signaled to the downstream.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/cast.v3.png" alt="">
* <dl>
Expand All @@ -6679,8 +6681,7 @@ public final Observable<T> cacheWithInitialCapacity(int initialCapacity) {
*
* @param <U> the output value type cast to
* @param clazz
* the target class type that {@code cast} will cast the items emitted by the current {@code Observable}
* into before emitting them from the resulting {@code Observable}
* the target class to use to try and cast the upstream items into
* @return the new {@code Observable} instance
* @throws NullPointerException if {@code clazz} is {@code null}
* @see <a href="http://reactivex.io/documentation/operators/map.html">ReactiveX operators documentation: Map</a>
Expand Down