https://www.javacodegeeks.com/partitioning-a-stream-in-java.html
Partitioning a Stream in Java