diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index 76a0573663..9fd61814bc 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -5488,7 +5488,7 @@ public final Single collectInto(final U initialValue, BiConsumerRxJava wiki: Implementing Your Own Operators */ @SchedulerSupport(SchedulerSupport.NONE) - public final Observable compose(Function, ? extends ObservableSource> composer) { + public final Observable compose(ObservableTransformer composer) { return wrap(to(composer)); } diff --git a/src/test/java/io/reactivex/internal/operators/single/SingleAmbTest.java b/src/test/java/io/reactivex/internal/operators/single/SingleAmbTest.java index de9a0c9861..6f0062a794 100644 --- a/src/test/java/io/reactivex/internal/operators/single/SingleAmbTest.java +++ b/src/test/java/io/reactivex/internal/operators/single/SingleAmbTest.java @@ -17,9 +17,6 @@ import java.util.*; -import io.reactivex.Completable; -import io.reactivex.SingleSource; -import io.reactivex.exceptions.TestException; import org.junit.Test; import io.reactivex.Single; diff --git a/src/test/java/io/reactivex/observable/ObservableCovarianceTest.java b/src/test/java/io/reactivex/observable/ObservableCovarianceTest.java index 94c0626eb3..dcb637d9ed 100644 --- a/src/test/java/io/reactivex/observable/ObservableCovarianceTest.java +++ b/src/test/java/io/reactivex/observable/ObservableCovarianceTest.java @@ -90,7 +90,7 @@ public void accept(Movie pv) { System.out.println(pv); } }) - .compose(new Function, Observable>() { + .compose(new ObservableTransformer() { @Override public Observable apply(Observable m) { return m.concatWith(Observable.just(new ActionMovie())); @@ -116,7 +116,7 @@ public String apply(Movie v) { @Test public void testCovarianceOfCompose() { Observable movie = Observable.just(new HorrorMovie()); - Observable movie2 = movie.compose(new Function, Observable>() { + Observable movie2 = movie.compose(new ObservableTransformer() { @Override public Observable apply(Observable t) { return Observable.just(new Movie()); @@ -128,7 +128,7 @@ public Observable apply(Observable t) { @Test public void testCovarianceOfCompose2() { Observable movie = Observable. just(new HorrorMovie()); - Observable movie2 = movie.compose(new Function, Observable>() { + Observable movie2 = movie.compose(new ObservableTransformer() { @Override public Observable apply(Observable t) { return Observable.just(new HorrorMovie()); @@ -140,7 +140,7 @@ public Observable apply(Observable t) { @Test public void testCovarianceOfCompose3() { Observable movie = Observable.just(new HorrorMovie()); - Observable movie2 = movie.compose(new Function, Observable>() { + Observable movie2 = movie.compose(new ObservableTransformer() { @Override public Observable apply(Observable t) { return Observable.just(new HorrorMovie()).map(new Function() { @@ -158,7 +158,7 @@ public HorrorMovie apply(HorrorMovie v) { @Test public void testCovarianceOfCompose4() { Observable movie = Observable.just(new HorrorMovie()); - Observable movie2 = movie.compose(new Function, Observable>() { + Observable movie2 = movie.compose(new ObservableTransformer() { @Override public Observable apply(Observable t1) { return t1.map(new Function() { diff --git a/src/test/java/io/reactivex/observable/ObservableTest.java b/src/test/java/io/reactivex/observable/ObservableTest.java index 2c3e656c16..5fe89ad640 100644 --- a/src/test/java/io/reactivex/observable/ObservableTest.java +++ b/src/test/java/io/reactivex/observable/ObservableTest.java @@ -1087,7 +1087,7 @@ public void accept(List booleans) { @Test public void testCompose() { TestObserver ts = new TestObserver(); - Observable.just(1, 2, 3).compose(new Function, Observable>() { + Observable.just(1, 2, 3).compose(new ObservableTransformer() { @Override public Observable apply(Observable t1) { return t1.map(new Function() {