spliterator
Creates a Spliterator covering a range of elements of a given array, using a customized set of spliterator characteristics.
This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays.spliterator.
The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report; it is common to additionally specify IMMUTABLE and ORDERED.
Return
A spliterator for an array
Parameters
The array, assumed to be unmodified during use
The least index (inclusive) to cover
One past the greatest index to cover
Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
See also
Throws
if the given array is null
if fromIndex is negative, toIndex is less than fromIndex, or toIndex is greater than the array size