Skip to content

Commit a147ed6

Browse files
committed
Switch Maybe and Single to use their Transformers in compose()
Resolves ReactiveX#4650
1 parent 9047a3c commit a147ed6

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/main/java/io/reactivex/Maybe.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,13 +1967,12 @@ public final <U> Maybe<U> cast(final Class<? extends U> clazz) {
19671967
* </dl>
19681968
*
19691969
* @param <R> the value type of the Maybe returned by the transformer function
1970-
* @param transformer
1971-
* implements the function that transforms the source Maybe
1970+
* @param transformer the transformer function, not null
19721971
* @return a Maybe, transformed by the transformer function
19731972
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Implementing-Your-Own-Operators">RxJava wiki: Implementing Your Own Operators</a>
19741973
*/
19751974
@SchedulerSupport(SchedulerSupport.NONE)
1976-
public final <R> Maybe<R> compose(Function<? super Maybe<T>, ? extends MaybeSource<R>> transformer) {
1975+
public final <R> Maybe<R> compose(MaybeTransformer<T, R> transformer) {
19771976
return wrap(to(transformer));
19781977
}
19791978

src/main/java/io/reactivex/Single.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,13 +1467,12 @@ public final Single<T> hide() {
14671467
* </dl>
14681468
*
14691469
* @param <R> the value type of the single returned by the transformer function
1470-
* @param transformer
1471-
* implements the function that transforms the source Single
1470+
* @param transformer the transformer function, not null
14721471
* @return the source Single, transformed by the transformer function
14731472
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Implementing-Your-Own-Operators">RxJava wiki: Implementing Your Own Operators</a>
14741473
*/
14751474
@SchedulerSupport(SchedulerSupport.NONE)
1476-
public final <R> Single<R> compose(Function<? super Single<T>, ? extends SingleSource<R>> transformer) {
1475+
public final <R> Single<R> compose(SingleTransformer<T, R> transformer) {
14771476
return wrap(to(transformer));
14781477
}
14791478

0 commit comments

Comments
 (0)