【发布时间】:2020-04-06 19:14:27
【问题描述】:
我在下面打印了 HashMap(to.String())。
HashMap<String, HashMap<String, HashMap<String, Integer>>> abc = new HashMap<>();
HashMap abc = {disabled={account={testConfiguration=1, iterate=1}}}
如果键 disabled 匹配,我想将 {group={iterate=1}} 附加到现有映射。
最后我的地图应该如下所示,我该如何实现呢?
HashMap abc = {disabled={account={testConfiguration=1, iterate=1}, {group={iterate=1}}}
【问题讨论】:
-
能否详细说明一下。它不会冲走我现有的数据吗????
-
HashMap中有哪些类型? -
添加到问题中
-
abc.get("disabled").put("group", newValue)?
标签: java data-structures collections hashmap