-
Enhancement
-
Resolution: Fixed
-
P4
-
None
The default implementation of List.spliterator() produces a spliterator from the list's iterator.
If the List implementation implements RandomAccess then a spliterator can be produced that traverses elements using List.get and can therefore split efficiently (calls to List.get may be performed by multiple threads concurrently).
Further if the List implementation extends from AbstractList then the modCount field can be used to support fail-fast behaviour.
If the List implementation implements RandomAccess then a spliterator can be produced that traverses elements using List.get and can therefore split efficiently (calls to List.get may be performed by multiple threads concurrently).
Further if the List implementation extends from AbstractList then the modCount field can be used to support fail-fast behaviour.