-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Description
I have a documented API for rxjava-jdbc that suggests certain special operations to be performed using the Observable.lift method with custom Operators. Works fine but if internally I decide to use a composition of existing operators instead of a custom operator then I need the ability to convert a Transformer into an Operator so that the documented use of the API does not need to change. I'd suggest the addition of a Transformers utility class and supporting classes:
public final class Transformers {
public static <T,R> Operator<R,T> toOperator(Transformer<T,R> transformer) {
return TransformerOperator.toOperator(transformer);
}
}I have the code for this and tests resident in rxjava-jdbc and can contribute it if there is support. Are people happy for me to proceed with a PR?
Incidentally, Operator -> Transformer is a trivial conversion, it is just the Transformer -> Operator conversion that the suggested PR could facilitate.