Eclipse调试详细信息格式化程序

时间:2020-10-28 19:44:03

标签: eclipse

我想更改java.util.HashMap条目的格式。 为此,我尝试像这样的细节格式化程序:

entrySet().stream()
    .map(e -> String.format("%-40s -> %s", e.getKey(), e.getValue()))
    .collect(java.util.stream.Collectors.joining("\n", "{", "}"))

但是Eclipse向我显示了以下消息:

Detail formatter error:
    The method entrySet() is undefined for the type HashMap<K,V>

我缺少什么?

0 个答案:

没有答案