目录引入问题方法一:使用 HashSet 数据结构方法二:使用 Java 8 的 Stream API 的 distinct() 去重方法三:使用 Map 数据结构方法四:使用 Collectors.toMap() 方法方法五:使用 Collectors.collectingAndThen() 方