HashMap<String, Object> res = order.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> a, HashMap::new));
如何使用jdk8快速将一个map复制到另一个map
最新推荐文章于 2024-04-10 10:14:54 发布
HashMap<String, Object> res = order.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> a, HashMap::new));