Skip to content
Buy me a coffee

Spliterators

Defined in: src/stream/Spliterators.ts:411

Static factories for Spliterators over arrays, collections and iterators, and the AbstractSpliterator base classes.

static emptyDoubleSpliterator(): Spliterator<number>

Defined in: src/stream/Spliterators.ts:440

Returns the empty spliterator, typed for numbers.

Spliterator<number>


static emptyIntSpliterator(): Spliterator<number>

Defined in: src/stream/Spliterators.ts:432

Returns the empty spliterator, typed for numbers.

Spliterator<number>


static emptyLongSpliterator(): Spliterator<number>

Defined in: src/stream/Spliterators.ts:436

Returns the empty spliterator, typed for numbers.

Spliterator<number>


static emptySpliterator<T>(): Spliterator<T>

Defined in: src/stream/Spliterators.ts:428

Returns an empty spliterator (a shared instance): SIZED | SUBSIZED, size 0, never splits.

T

Spliterator<T>


static iterator<T>(spliterator): Iterator<T>

Defined in: src/stream/Spliterators.ts:501

Returns an Iterator (hasNext()/next()) over the spliterator’s remaining elements; remove() throws UnsupportedOperationException.

T

Spliterator<T>

Iterator<T>

NullPointerException if spliterator is null


static spliterator<T>(array, characteristics): Spliterator<T>

Defined in: src/stream/Spliterators.ts:449

Returns a spliterator over the whole array-like (typed arrays too), without copying, reporting characteristics | SIZED | SUBSIZED and splitting in halves.

T

ArrayLike<T>

number

Spliterator<T>

NullPointerException if array is null

static spliterator<T>(array, fromIndex, toIndex, characteristics): Spliterator<T>

Defined in: src/stream/Spliterators.ts:456

Returns a spliterator over array[fromIndex..toIndex), without copying, reporting characteristics | SIZED | SUBSIZED and splitting in halves.

T

ArrayLike<T>

number

number

number

Spliterator<T>

ArrayIndexOutOfBoundsException if fromIndex > toIndex, fromIndex < 0 or toIndex > array.length

NullPointerException if array is null

static spliterator<T>(collection, characteristics): Spliterator<T>

Defined in: src/stream/Spliterators.ts:462

Returns a late-binding spliterator over collection.iterator(), sized by collection.size() at first use; adds SIZED | SUBSIZED unless CONCURRENT is given.

T

Collection<T>

number

Spliterator<T>

NullPointerException if collection is null

static spliterator<T>(iterator, size, characteristics): Spliterator<T>

Defined in: src/stream/Spliterators.ts:468

Returns a spliterator over the library Iterator (hasNext()/next()), sized by size; adds SIZED | SUBSIZED unless CONCURRENT is given.

T

Iterator<T>

number

number

Spliterator<T>

NullPointerException if iterator is null


static spliteratorUnknownSize<T>(iterator, characteristics): Spliterator<T>

Defined in: src/stream/Spliterators.ts:492

Returns a spliterator over the library Iterator with no known size: SIZED and SUBSIZED are cleared and estimateSize() is Infinity.

T

Iterator<T>

number

Spliterator<T>

NullPointerException if iterator is null