I want to implement a Stream.
I don\'t want to just use implements Stream, because I would have to implement a ton of met
For the sake of completeness, as I did not find this directly among the answers here on SO: If you want to transform an existing Iterator into a Stream (e.g., because you want to generate elements successively), use this:
StreamSupport.stream(
Spliterators.spliterator(myIterator, /* initial size*/ 0L, Spliterator.NONNULL),
/* not parallel */ false);
I found this a bit hard to find, as you need to know StreamSupport, Spliterators and Spliterator