Spliterator - sized vs subsized flags

Viewed 659

https://docs.oracle.com/javase/8/docs/api/java/util/Spliterator.html

SIZED Characteristic value signifying that the value returned from estimateSize() prior to traversal or splitting represents a finite size that, in the absence of structural source modification, represents an exact count of the number of elements that would be encountered by a complete traversal.

SUBSIZED Characteristic value signifying that all Spliterators resulting from trySplit() will be both SIZED and SUBSIZED.

  1. Is there a situation when the SIZED flag is on but the SUBSIZED flag is off?
  2. Is there a situation when the SUBSIZED flag is on but the SIZED flag is off?
2 Answers
Related