Please, try something like that:
Map<Object,Map<Object,Map<Object,Object>>> deepCopy(Map<Object,Map<Object,Map<Object,Object>>> src) {
final Map<Object,Map<Object,Map<Object,Object>>> dst = new HashMap<Object, Map<Object, Map<Object, Object>>>();
for (Object key : src.keySet()) {
final HashMap<Object, Map<Object, Object>> copy = new HashMap<Object, Map<Object, Object>>();
final Map<Object, Map<Object, Object>> innerMap = src.get(key);
for (Object innerKey : innerMap.keySet()) {
Map<Object,Object> innerCopy = new HashMap<Object, Object>(innerMap.get(innerKey));
copy.put(innerKey, innerCopy);
}
dst.put(key, copy);
}
return dst;
}
I'm not really sure that it's working, but I think you get the idea... you have to copy Map<Object,Object>
to another Map<Object,Object>
on the lowest level, all levels above needs to be "get from original -> put to copy with the same key".