@@ -147,6 +147,10 @@ public static interface OnSubscribeFunc<T> extends Function {
147
147
* <p> {@code
148
148
* observable.map(...).filter(...).take(5).lift(new OperatorA()).lift(new OperatorB(...)).subscribe()
149
149
* }
150
+ * <p>
151
+ * If the operator you are creating is designed to act on the individual items emitted by a source
152
+ * Observable, use {@code lift}. If your operator is designed to transform the source Observable as a whole
153
+ * (for instance, by applying a particular set of existing RxJava operators to it) use {@link #compose}.
150
154
* <dl>
151
155
* <dt><b>Scheduler:</b></dt>
152
156
* <dd>{@code lift} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -182,17 +186,22 @@ public void call(Subscriber<? super R> o) {
182
186
183
187
184
188
/**
185
- * Compose Observables together with a function.
186
- *
187
- * This works on the Observables themselves whereas {@link #lift} works on the internal
188
- * Subscriber/Observers.
189
- *
190
- * Use {@code lift} if you are creating an operator that acts on the underlying data. Use {@code compose} if
191
- * you are acting on the observable itself, for instance by composing multiple operators.
189
+ * Transform an Observable by applying a particular Transformer function to it.
190
+ * <p>
191
+ * This method operates on the Observable itself whereas {@link #lift} operates on the Observable's
192
+ * Subscribers or Observers.
193
+ * <p>
194
+ * If the operator you are creating is designed to act on the individual items emitted by a source
195
+ * Observable, use {@link #lift}. If your operator is designed to transform the source Observable as a whole
196
+ * (for instance, by applying a particular set of existing RxJava operators to it) use {@code compose}.
197
+ * <dl>
198
+ * <dt><b>Scheduler:</b></dt>
199
+ * <dd>{@code compose} does not operate by default on a particular {@link Scheduler}.</dd>
200
+ * </dl>
192
201
*
193
- * @warn param transformer not described
194
- * @param transformer
195
- * @return
202
+ * @param transformer implements the function that transforms the source Observable
203
+ * @return the source Observable, transformed by the transformer function
204
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Implementing-Your-Own-Operators">RxJava wiki: Implementing Your Own Operators</a>
196
205
* @since 0.20
197
206
*/
198
207
public <R> Observable<R> compose(Transformer<T, R> transformer) {
0 commit comments