Laurent Hinoul

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - John F. Woods

How to create a stream from an iterator in java 8

Hi guys!

In this post I’ll show you how to convert an java iterator to a java 8 stream. The code is really simple:

Just copy paste this static method in any class you like. It’s generic so you can use this method for all types of iterators. Enjoy!

Leave a Reply

%d bloggers like this: