diff --git a/rxjava-core/src/main/java/rx/Observable.java b/rxjava-core/src/main/java/rx/Observable.java index 80bc473bc5..787611dc49 100644 --- a/rxjava-core/src/main/java/rx/Observable.java +++ b/rxjava-core/src/main/java/rx/Observable.java @@ -849,7 +849,9 @@ public static Observable from(T t1) { * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))} */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2) { @@ -873,7 +875,9 @@ public static Observable from(T t1, T t2) { * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))}. */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2, T t3) { @@ -898,7 +902,9 @@ public static Observable from(T t1, T t2, T t3) { * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))}. */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2, T t3, T t4) { @@ -924,7 +930,9 @@ public static Observable from(T t1, T t2, T t3, T t4) { * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))}. */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2, T t3, T t4, T t5) { @@ -951,7 +959,9 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5) { * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))}. */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6) { @@ -979,7 +989,9 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6) { * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))}. */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7) { @@ -1008,7 +1020,9 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7) { * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))}. */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8) { @@ -1038,7 +1052,9 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))}. */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9) { @@ -1064,7 +1080,9 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T * resulting Observable * @return an Observable that emits each item * @see RxJava Wiki: from() + * @deprecated Use {@link #from(Iterable)} instead such as {@code from(Arrays.asList(t1))}. */ + @Deprecated @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9, T t10) { @@ -1175,7 +1193,9 @@ public static Observable defer(Func0> o * @param the type of that item * @return an Observable that emits a single item and then completes * @see RxJava Wiki: just() + * @deprecated Use {@link #from(T)} */ + @Deprecated public static Observable just(T value) { return from(Arrays.asList((value))); } @@ -1194,7 +1214,9 @@ public static Observable just(T value) { * @return an Observable that emits a single item and then completes, on a * specified scheduler * @see RxJava Wiki: just() + * @deprecated Use {@link #from(T)} */ + @Deprecated public static Observable just(T value, Scheduler scheduler) { return from(Arrays.asList((value)), scheduler); } @@ -3898,6 +3920,7 @@ public Observable switchMap(Func1RxJava Wiki: where() * @see #filter(Func1) */ + @Deprecated public Observable where(Func1 predicate) { return filter(predicate); } @@ -3935,6 +3958,7 @@ public Observable map(Func1 func) { * @see MSDN: Observable.Select * @deprecated just use zip with {@link Observable#range(int)} */ + @Deprecated public Observable mapWithIndex(Func2 func) { return create(OperationMap.mapWithIndex(this, func)); } @@ -3959,6 +3983,7 @@ public Observable mapWithIndex(Func2 fun * @see #flatMap(Func1) * @deprecated */ + @Deprecated public Observable mapMany(Func1> func) { return mergeMap(func); } @@ -5237,6 +5262,7 @@ public ConnectableObservable publishLast() { * @see #reduce(Func2) * @deprecated use #reduce(Func2) */ + @Deprecated public Observable aggregate(Func2 accumulator) { return reduce(accumulator); } @@ -5303,6 +5329,7 @@ public R call(R state, T value) { * @see #reduce(Object, Func2) * @deprecated use #reduce(Object, Func2) */ + @Deprecated public Observable aggregate(R initialValue, Func2 accumulator) { return reduce(initialValue, accumulator); }