There is a from method in the Observable class in rxjava 1 but not found in rxjava 2. How can I replace the from method in rxjava 2 in the following code:
List<Integer> ints = new ArrayList<>();
for (int i=1; i<10; i++) {
ints.add(new Integer(i));
}
Observable.just(ints)
.flatMap(new Function<List<Integer>, Observable<Integer>>() {
@Override
public Observable<Integer> apply(List<Integer> ints) {
return Observable.from(ints);
}
})