如何从Observable <list <type>&gt;创建一个Observable <type>

时间:2015-05-09 14:28:21

标签: java rx-java observable

如果我有Observable ListLetter

public Observable<List<Letter>> getAToZList() {
        return Observable.create(
                new Observable.OnSubscribe<List<Letter>>() {
                    @Override
                    public void call(Subscriber<? super List<Letter>> subscriber) {
                        List<Letter> aToZLetters = getLetters();
                        subscriber.onNext(aToZLetters);
                        subscriber.onCompleted();
                    }
                }
        );
    }

如何创建一个观察单Observable的{​​{1}},并在Letter中为每个List发一个?{/ p>

public Observable<Letter> getAToZ() {
        return Observable.create(
                     getAToZList().something() ??
        );
    }

https://github.com/ReactiveX/RxJava

0 个答案:

没有答案