-
JAVA8 Stream 双重循环
2019-01-12 21:58好了好了 写出来了
类似的一个方法List<Map<String, Object>> collect = list1.stream() .filter(m1 -> list2.stream()//.peek(System.out::println) .anyMatch(m2 -> m1.get("height").toString().equals(m2.get("height").toString()) ) ).collect(Collectors.toList()); collect.forEach(System.out::println);