当我在 IntelliJ 中用 Java 编程时,我经常使用流并将它们收集到列表中:
list.stream()
.whatever()
.whatever2()
.collect(Collectors.toList())
IntelliJ 有一个很好的功能,我只需键入“.toL”,自动完成功能就会为我生成 .collect(Collectors.toList())
。
如何更改设置以便自动静态导入 Collectors.toList?
list.stream()
.whatever()
.whatever2()
.collect(toList())
编辑:我知道如何静态导入任何方法,但我希望自动完成一步完成。
最佳答案
关于java - IntelliJ : How to autocomple AND import statically Collectors. 列表(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51207074/