Creates a
Spliterator.OfLong
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(long[], int, int)
.
The returned spliterator always reports the characteristics SIZED
and SUBSIZED
. The caller may provide additional characteristics for the spliterator to report. (For example, if it is known the array will not be further modified, specify IMMUTABLE
; if the array data is considered to have an encounter order, specify ORDERED
). The method Arrays.spliterator(long[], int, int)
can often be used instead, which returns a spliterator that reports SIZED
, SUBSIZED
, IMMUTABLE
, and ORDERED
.