Spliterators
Defined in: src/stream/Spliterators.ts:411
Static factories for Spliterators over arrays, collections and iterators, and the AbstractSpliterator base classes.
Methods
Section titled “Methods”emptyDoubleSpliterator()
Section titled “emptyDoubleSpliterator()”
staticemptyDoubleSpliterator():Spliterator<number>
Defined in: src/stream/Spliterators.ts:440
Returns the empty spliterator, typed for numbers.
Returns
Section titled “Returns”Spliterator<number>
emptyIntSpliterator()
Section titled “emptyIntSpliterator()”
staticemptyIntSpliterator():Spliterator<number>
Defined in: src/stream/Spliterators.ts:432
Returns the empty spliterator, typed for numbers.
Returns
Section titled “Returns”Spliterator<number>
emptyLongSpliterator()
Section titled “emptyLongSpliterator()”
staticemptyLongSpliterator():Spliterator<number>
Defined in: src/stream/Spliterators.ts:436
Returns the empty spliterator, typed for numbers.
Returns
Section titled “Returns”Spliterator<number>
emptySpliterator()
Section titled “emptySpliterator()”
staticemptySpliterator<T>():Spliterator<T>
Defined in: src/stream/Spliterators.ts:428
Returns an empty spliterator (a shared instance): SIZED | SUBSIZED, size 0, never splits.
Type Parameters
Section titled “Type Parameters”T
Returns
Section titled “Returns”Spliterator<T>
iterator()
Section titled “iterator()”
staticiterator<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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”spliterator
Section titled “spliterator”Spliterator<T>
Returns
Section titled “Returns”Iterator<T>
Throws
Section titled “Throws”NullPointerException if spliterator is null
spliterator()
Section titled “spliterator()”Call Signature
Section titled “Call Signature”
staticspliterator<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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”ArrayLike<T>
characteristics
Section titled “characteristics”number
Returns
Section titled “Returns”Spliterator<T>
Throws
Section titled “Throws”NullPointerException if array is null
Call Signature
Section titled “Call Signature”
staticspliterator<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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”ArrayLike<T>
fromIndex
Section titled “fromIndex”number
toIndex
Section titled “toIndex”number
characteristics
Section titled “characteristics”number
Returns
Section titled “Returns”Spliterator<T>
Throws
Section titled “Throws”ArrayIndexOutOfBoundsException if fromIndex > toIndex, fromIndex < 0 or toIndex > array.length
Throws
Section titled “Throws”NullPointerException if array is null
Call Signature
Section titled “Call Signature”
staticspliterator<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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”collection
Section titled “collection”Collection<T>
characteristics
Section titled “characteristics”number
Returns
Section titled “Returns”Spliterator<T>
Throws
Section titled “Throws”NullPointerException if collection is null
Call Signature
Section titled “Call Signature”
staticspliterator<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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterator
Section titled “iterator”Iterator<T>
number
characteristics
Section titled “characteristics”number
Returns
Section titled “Returns”Spliterator<T>
Throws
Section titled “Throws”NullPointerException if iterator is null
spliteratorUnknownSize()
Section titled “spliteratorUnknownSize()”
staticspliteratorUnknownSize<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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterator
Section titled “iterator”Iterator<T>
characteristics
Section titled “characteristics”number
Returns
Section titled “Returns”Spliterator<T>
Throws
Section titled “Throws”NullPointerException if iterator is null