TestStore.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:store2store 作者:
@Override
public Flowable<Optional<List<TestModel>>> getAll(final List<TestModel> items) {
    return getAll(null, null).map(new Function<Optional<List<TestModel>>, Optional<List<TestModel>>>() {
        @Override
        public Optional<List<TestModel>> apply(Optional<List<TestModel>> fullList) throws Exception {
            List<TestModel> output = new ArrayList<>();
            for(TestModel toFind : items){
                for(TestModel tm : fullList.get()){
                    if(tm.getId() == toFind.getId()){
                        output.add(tm);
                    }
                }
            }
            return Optional.wrap(output);
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号