The Spliterator interface

A new interface is added to the java.util package called Spliterator, which, as the name implies, is a new type of iterator that can traverse through a Collection object. The Collection interface is updated to include a new spliterator() method, which returns a Spliterator upon invocation. The Spliterator iterator's strength lies in its ability to split the Collection object, partitioning off some of its elements as another Spliterator component. This gives the ability to perform parallel processing in the Collection items; however, Spliterator alone cannot supply the ability to process the tasks in parallel. The Spliterator ability is to support parallel processing in certain elements of a Collection element. Compared ...

Get Distributed Computing in Java 9 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.