//根據id去重
examRoomModelLists = examRoomModelLists.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(
// 利用 TreeSet 的排序去重構造函數來達到去重元素的目的
// 根據firstName去重
() -> new TreeSet<>(Comparator.comparing(ExamRoomModel::getId))), ArrayList::new));