Skip to content

Commit a127b06

Browse files
author
jmhofer
committed
adapted RxImplicits tests againt zip to new generics order, renamed two more reduceFunctions to zipFunction
1 parent ebaa616 commit a127b06

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/RxImplicits.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class UnitTestSuite extends JUnitSuite {
280280

281281
val cheetara = Character("green", "cheetara")
282282
val panthro = Character("blue", "panthro")
283-
val characters = Observable.zip[Character, String, String](colors, names, Character.apply _)
283+
val characters = Observable.zip[String, String, Character](colors, names, Character.apply _)
284284
assertSubscribeReceives(characters)(cheetara, panthro)
285285
}
286286

@@ -295,7 +295,7 @@ class UnitTestSuite extends JUnitSuite {
295295
val cheetara = Character(2, "green", "cheetara")
296296
val panthro = Character(3, "blue", "panthro")
297297

298-
val characters = Observable.zip[Character, Int, String, String](numbers, colors, names, Character.apply _)
298+
val characters = Observable.zip[Int, String, String, Character](numbers, colors, names, Character.apply _)
299299
assertSubscribeReceives(characters)(liono, cheetara, panthro)
300300
}
301301

@@ -311,7 +311,7 @@ class UnitTestSuite extends JUnitSuite {
311311
val cheetara = Character(2, "green", "cheetara", false)
312312
val panthro = Character(3, "blue", "panthro", false)
313313

314-
val characters = Observable.zip[Character, Int, String, String, Boolean](numbers, colors, names, isLeader, Character.apply _)
314+
val characters = Observable.zip[Int, String, String, Boolean, Character](numbers, colors, names, isLeader, Character.apply _)
315315
assertSubscribeReceives(characters)(liono, cheetara, panthro)
316316
}
317317

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,16 +1471,16 @@ public Observable<List<T>> buffer(long timespan, long timeshift, TimeUnit unit,
14711471
*
14721472
* @param ws
14731473
* An Observable of source Observables
1474-
* @param reduceFunction
1474+
* @param zipFunction
14751475
* a function that, when applied to an item emitted by each of the source
14761476
* Observables, results in an item that will be emitted by the resulting Observable
14771477
* @return an Observable that emits the zipped results
14781478
*/
1479-
public static <R> Observable<R> zip(Observable<Observable<?>> ws, final FuncN<? extends R> reduceFunction) {
1479+
public static <R> Observable<R> zip(Observable<Observable<?>> ws, final FuncN<? extends R> zipFunction) {
14801480
return ws.toList().mapMany(new Func1<List<Observable<?>>, Observable<R>>() {
14811481
@Override
14821482
public Observable<R> call(List<Observable<?>> wsList) {
1483-
return create(OperationZip.zip(wsList, reduceFunction));
1483+
return create(OperationZip.zip(wsList, zipFunction));
14841484
}
14851485
});
14861486
}
@@ -1505,8 +1505,8 @@ public Observable<R> call(List<Observable<?>> wsList) {
15051505
* Observables, results in an item that will be emitted by the resulting Observable
15061506
* @return an Observable that emits the zipped results
15071507
*/
1508-
public static <R> Observable<R> zip(Collection<Observable<?>> ws, FuncN<? extends R> reduceFunction) {
1509-
return create(OperationZip.zip(ws, reduceFunction));
1508+
public static <R> Observable<R> zip(Collection<Observable<?>> ws, FuncN<? extends R> zipFunction) {
1509+
return create(OperationZip.zip(ws, zipFunction));
15101510
}
15111511

15121512
/**

0 commit comments

Comments
 (0)