jdk1.8新特性之--------------------- filter使用


      获取dtos集合中total=500.00的salesman的集合。
List<String> collect = dtos.stream().filter(d -> d.getTotal().equals("500.00")).map(ReportDTO::getSalesman).collect(Collectors.toList());
posted @ 2020-09-02 16:18  wangt1  阅读(616)  评论(0编辑  收藏  举报