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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.