Skip to content
Buy me a coffee

Spliterator

Spliterator: object

Defined in: src/stream/Spliterator.ts:11

Characteristic flags (same bit values as the reference), combined with bitwise OR. Report only flags that are true: the stream engine trusts them (distinct() on a DISTINCT source and count() on a SIZED one skip work).

readonly CONCURRENT: 4096 = 0x00001000

The source may change safely during traversal.

readonly DISTINCT: 1 = 0x00000001

No two elements are equals.

readonly IMMUTABLE: 1024 = 0x00000400

The source cannot change during traversal.

readonly NONNULL: 256 = 0x00000100

No element is null.

readonly ORDERED: 16 = 0x00000010

Elements have a defined encounter order.

readonly SIZED: 64 = 0x00000040

estimateSize() is exact before traversal.

readonly SORTED: 4 = 0x00000004

Elements follow getComparator() (or natural order); implies ORDERED.

readonly SUBSIZED: 16384 = 0x00004000

Every spliterator trySplit() returns is SIZED and SUBSIZED too.