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

Improved Java doc for Maybe#defaultIfEmpty to suggest Maybe#toSingle #5491

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Corrected return type in doc for F.reduce(seed, reducer), F.reduceWit…
…h(seedSupplier, reducer) and O.reduce(seed, reducer)
  • Loading branch information
ganapathi004 committed Jul 9, 2017
commit 85bff6e1126fe8ac9295cc4a1ac03b1c9292e0fe
8 changes: 4 additions & 4 deletions src/main/java/io/reactivex/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -10745,7 +10745,7 @@ public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
}

/**
* Returns a Flowable that applies a specified accumulator function to the first item emitted by a source
* Returns a Single that applies a specified accumulator function to the first item emitted by a source
* Publisher and a specified seed value, then feeds the result of that function along with the second item
* emitted by a Publisher into the same function, and so on until all items have been emitted by the
* source Publisher, emitting the final result from the final call to your function as its sole item.
Expand Down Expand Up @@ -10787,7 +10787,7 @@ public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
* @param reducer
* an accumulator function to be invoked on each item emitted by the source Publisher, the
* result of which will be used in the next accumulator call
* @return a Flowable that emits a single item that is the result of accumulating the output from the
* @return a Single that emits a single item that is the result of accumulating the output from the
* items emitted by the source Publisher
* @see <a href="http://reactivex.io/documentation/operators/reduce.html">ReactiveX operators documentation: Reduce</a>
* @see <a href="http://en.wikipedia.org/wiki/Fold_(higher-order_function)">Wikipedia: Fold (higher-order function)</a>
Expand All @@ -10803,7 +10803,7 @@ public final <R> Single<R> reduce(R seed, BiFunction<R, ? super T, R> reducer) {
}

/**
* Returns a Flowable that applies a specified accumulator function to the first item emitted by a source
* Returns a Single that applies a specified accumulator function to the first item emitted by a source
* Publisher and a seed value derived from calling a specified seedSupplier, then feeds the result
* of that function along with the second item emitted by a Publisher into the same function, and so on until
* all items have been emitted by the source Publisher, emitting the final result from the final call to your
Expand All @@ -10828,7 +10828,7 @@ public final <R> Single<R> reduce(R seed, BiFunction<R, ? super T, R> reducer) {
* @param reducer
* an accumulator function to be invoked on each item emitted by the source Publisher, the
* result of which will be used in the next accumulator call
* @return a Flowable that emits a single item that is the result of accumulating the output from the
* @return a Single that emits a single item that is the result of accumulating the output from the
* items emitted by the source Publisher
* @see <a href="http://reactivex.io/documentation/operators/reduce.html">ReactiveX operators documentation: Reduce</a>
* @see <a href="http://en.wikipedia.org/wiki/Fold_(higher-order_function)">Wikipedia: Fold (higher-order function)</a>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/reactivex/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -8988,7 +8988,7 @@ public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
}

/**
* Returns an Observable that applies a specified accumulator function to the first item emitted by a source
* Returns a Single that applies a specified accumulator function to the first item emitted by a source
* ObservableSource and a specified seed value, then feeds the result of that function along with the second item
* emitted by an ObservableSource into the same function, and so on until all items have been emitted by the
* source ObservableSource, emitting the final result from the final call to your function as its sole item.
Expand Down Expand Up @@ -9027,7 +9027,7 @@ public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
* @param reducer
* an accumulator function to be invoked on each item emitted by the source ObservableSource, the
* result of which will be used in the next accumulator call
* @return an Observable that emits a single item that is the result of accumulating the output from the
* @return a Single that emits a single item that is the result of accumulating the output from the
* items emitted by the source ObservableSource
* @see <a href="http://reactivex.io/documentation/operators/reduce.html">ReactiveX operators documentation: Reduce</a>
* @see <a href="http://en.wikipedia.org/wiki/Fold_(higher-order_function)">Wikipedia: Fold (higher-order function)</a>
Expand Down