Convert Map to Map

后端 未结 11 1830
暗喜
暗喜 2021-01-31 13:27

How can I convert Map to Map ?

This does not work:

Map map = ne         


        
11条回答
  •  生来不讨喜
    2021-01-31 14:04

    private Map convertAttributes(final Map attributes) {
        final Map result = new HashMap();
        for (final Map.Entry entry : attributes.entrySet()) {
            result.put(entry.getKey(), String.valueOf(entry.getValue()));
        }
        return result;
    }
    

提交回复
热议问题