这个世界上没有无用的齿轮,也只有齿轮本身能决定自己的用途。——《嫌疑犯X的献身》
跟昨天介绍的eclipse-collections一样,这是一个同类产品:
仓库地址:https://github.com/amaembo/streamex
JavaDoc
:http://amaembo.github.io/streamex/javadoc/one/util/streamex/package-summary.html
感受下:
1 | List<String> userNames = StreamEx.of(users).map(User::getName).toList(); |
对比起来好像比eclipse-collections
写更少代码
而且更向原生stream
靠拢
文档:https://github.com/amaembo/streamex/blob/master/wiki/CHEATSHEET.md