List

  1. 过滤数组中分数为1的数据
    1. List<MutualEvaluation> one = (List)((List)disSatisfiedList)
    2. .stream().filter((x) -> x.getScore() == 1;})
    3. .collect(Collectors.toList());

Map

  1. 按照分数划分区组,合格/不合格
    1. // 根据得分划分成map,得分大于4的为true,否则为false
    2. Map<Boolean, List<MutualEvaluation>> partMap = (Map)((List)mutualEvaluationList).stream().collect(Collectors.partitioningBy((x) -> {
    3. return x.getScore() >= 4;
    4. }));