摘要: 集合 List<DictEntity> dictEntityList = dictService.findByType(6);1取出属性为集合 List<String> stateNameList = dictEntityList.stream().map(DictEntity::getName). 阅读全文
posted @ 2022-04-13 12:42 你我一路随行 阅读(2250) 评论(0) 推荐(0) 编辑
摘要: 1.使用规则: toMap(Function, Function) 返回一个 Collector,它将元素累积到一个 Map中,其键和值是将提供的映射函数应用于输入元素的结果。 如果映射的键包含重复项,则在执行收集操作时会抛出IllegalStateException。如果映射的键可能有重复项,请改 阅读全文
posted @ 2022-04-13 12:37 你我一路随行 阅读(2522) 评论(0) 推荐(0) 编辑