Java Reference
In-Depth Information
Figure 7.6. The recursive splitting process
This splitting process can also be influenced by the characteristics of the Spliterator itself, which
are declared via the characteristics method.
The Spliterator characteristics
The last abstract method declared by the Spliterator interface is characteristics, which returns
an int encoding the set of characteristics of the Spliterator itself. The Spliterator clients can use
these characteristics to better control and optimize its usage. Table 7.2 summarizes them.
(Unfortunately, although these conceptually overlap with characteristics of a collector, they're
coded differently.)
Table 7.2. Spliterator 's characteristics
Characteristic Meaning
ORDERED
Elements have a defined order (for example, a List), so the Spliterator enforces this
order when traversing and partitioning them.
 
Search WWH ::




Custom Search