public interface Api {
    Observable<X> getX();
    Observable<Y> getY();
Observable.zip(api.getX(), api.getY(), new Func2<X, Y, Pair>() {
    public Pair call(X x, Y y) {
        return new Pair(x, y);
}).subscribe(new Action1<Pair>() {
    public void call(Pair pair) {
        // you got pair ;)
This entry was posted in Java, Retrofit, RxJava. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">