In RxJava, how to pass a variable along when chaining observables?

图片[1]-In RxJava, how to pass a variable along when chaining observables? - 拾光赋-拾光赋
answer re: In RxJava, how to pass a variable along when chaining observables?
Jan 29 ’15
70

The advice I got from the Couchbase forum is to use nested observables:

Observable
    .from(modifications)
    .flatmap( (data1) -> {
        return op1(data1)
            ...
            .flatmap( (data2) -> { 
                // I can access data1 here
                return op2(data2);
            })
        });

EDIT: I’ll mark this as the accepted answer as it seems to be the…

Open Full Answer

原文链接:In RxJava, how to pass a variable along when chaining observables?

© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容