假设我有两个可观察的流
Observable<Book> books;
Observable<Movie> movies;
如果他们有匹配的属性,我该如何加入?像下面的psudo代码:
Observable<BookMoviePair> pairs = books.join(movies)
.where((book, movie) -> book.getId() == movie.getId()))
.return((book, movie) -> new BookMoviePair(book, movie));
答案 0 :(得分:4)
一种方法:
r'C:\Users\NANA\Desktop\output'