So, in Clojure, I can just say something like this...
(into [] (map some-function some-collection))
And I get a new vector of my transformed data.
Is there some simple equivalent of into
for Java 8 streams? For example, I don't see a constructor on ArrayList
that takes a stream, nor do I see some sort of helper function in java.util.Collections
, nor the stream interface.