Skip to content

Commit 985005e

Browse files
Deprecate aggregate in favor of reduce
We have had aggregate from Rx.Net for a while but long ago migrated to reduce as the primary. Time to deprecate it.
1 parent c300559 commit 985005e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5139,6 +5139,7 @@ public ConnectableObservable<T> publishLast() {
51395139
*
51405140
* @see <a href="https://github.com/Netflix/RxJava/wiki/Transforming-Observables#reduce-or-aggregate">RxJava Wiki: aggregate()</a>
51415141
* @see #reduce(Func2)
5142+
* @deprecated
51425143
*/
51435144
public Observable<T> aggregate(Func2<T, T, T> accumulator) {
51445145
return reduce(accumulator);
@@ -5181,6 +5182,7 @@ public <R> Observable<R> reduce(R initialValue, Func2<R, ? super T, R> accumulat
51815182
*
51825183
* @see <a href="https://github.com/Netflix/RxJava/wiki/Transforming-Observables#reduce-or-aggregate">RxJava Wiki: aggregate()</a>
51835184
* @see #reduce(Object, Func2)
5185+
* @deprecated
51845186
*/
51855187
public <R> Observable<R> aggregate(R initialValue, Func2<R, ? super T, R> accumulator) {
51865188
return reduce(initialValue, accumulator);

0 commit comments

Comments
 (0)