Java 8 java.util.stream.Streams

纵然是瞬间 提交于 2019-12-05 21:56:13

问题


I see many blog posts mention a Streams class and I see it was once part of the lambda branch API. It appears to be non-public API now and it does not match the previous implementation. Is there a different way to do Streams.concat() or to append multiple values to a stream?


回答1:


The Streams class got split and some of its methods were moved to StreamSupport, which does not contain a concat method in the latest build. The rationale for the split is explained here.

The specific case of concat has been mentioned separately in this post where it was proposed for removal and was apparently removed.

However a later post seems to indicate that it will reappear in future builds.



来源:https://stackoverflow.com/questions/16780647/java-8-java-util-stream-streams

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!