SingleTransformer (RxJava Javadoc 3.1.10) (original) (raw)
- Type Parameters:
Upstream
- the upstream value typeDownstream
- the downstream value type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface SingleTransformer<Upstream,Downstream>
Interface to compose Singles.
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method and Description @NonNull SingleSource<Downstream> apply(@NonNull Single<Upstream> upstream) Applies a function to the upstream Single and returns a SingleSource with optionally different element type. Method Detail
* #### apply [@NonNull](../../../../io/reactivex/rxjava3/annotations/NonNull.html "annotation in io.reactivex.rxjava3.annotations") [@NonNull](../../../../io/reactivex/rxjava3/annotations/NonNull.html "annotation in io.reactivex.rxjava3.annotations") [SingleSource](../../../../io/reactivex/rxjava3/core/SingleSource.html "interface in io.reactivex.rxjava3.core")<[Downstream](../../../../io/reactivex/rxjava3/core/SingleTransformer.html "type parameter in SingleTransformer")> apply([@NonNull](../../../../io/reactivex/rxjava3/annotations/NonNull.html "annotation in io.reactivex.rxjava3.annotations") [@NonNull](../../../../io/reactivex/rxjava3/annotations/NonNull.html "annotation in io.reactivex.rxjava3.annotations") [Single](../../../../io/reactivex/rxjava3/core/Single.html "class in io.reactivex.rxjava3.core")<[Upstream](../../../../io/reactivex/rxjava3/core/SingleTransformer.html "type parameter in SingleTransformer")> upstream) Applies a function to the upstream [Single](../../../../io/reactivex/rxjava3/core/Single.html "class in io.reactivex.rxjava3.core") and returns a [SingleSource](../../../../io/reactivex/rxjava3/core/SingleSource.html "interface in io.reactivex.rxjava3.core") with optionally different element type. Parameters: `upstream` \- the upstream `Single` instance Returns: the transformed `SingleSource` instance