Added in API level 24

Spliterators

class Spliterators
kotlin.Any
   ↳ java.util.Spliterators

Static classes and methods for operating on or creating instances of Spliterator and its primitive specializations Spliterator.OfInt, Spliterator.OfLong, and Spliterator.OfDouble.

Summary

Nested classes
abstract

An abstract Spliterator.OfDouble that implements trySplit to permit limited parallelism.

abstract

An abstract Spliterator.OfInt that implements trySplit to permit limited parallelism.

abstract

An abstract Spliterator.OfLong that implements trySplit to permit limited parallelism.

abstract

An abstract Spliterator that implements trySplit to permit limited parallelism.

Public methods
static Spliterator.OfDouble!

Creates an empty Spliterator.OfDouble

static Spliterator.OfInt!

Creates an empty Spliterator.OfInt

static Spliterator.OfLong!

Creates an empty Spliterator.OfLong

static Spliterator<T>!

Creates an empty Spliterator

static MutableIterator<T>!
iterator(spliterator: Spliterator<out T>!)

Creates an Iterator from a Spliterator.

static PrimitiveIterator.OfInt!
iterator(spliterator: Spliterator.OfInt!)

Creates an PrimitiveIterator.OfInt from a Spliterator.OfInt.

static PrimitiveIterator.OfLong!

Creates an PrimitiveIterator.OfLong from a Spliterator.OfLong.

static PrimitiveIterator.OfDouble!

Creates an PrimitiveIterator.OfDouble from a Spliterator.OfDouble.

static Spliterator<T>!
spliterator(array: Array<Any!>!, additionalCharacteristics: Int)

Creates a Spliterator covering the elements of a given array, using a customized set of spliterator characteristics.

static Spliterator<T>!
spliterator(array: Array<Any!>!, fromIndex: Int, toIndex: Int, additionalCharacteristics: Int)

Creates a Spliterator covering a range of elements of a given array, using a customized set of spliterator characteristics.

static Spliterator.OfInt!
spliterator(array: IntArray!, additionalCharacteristics: Int)

Creates a Spliterator.OfInt covering the elements of a given array, using a customized set of spliterator characteristics.

static Spliterator.OfInt!
spliterator(array: IntArray!, fromIndex: Int, toIndex: Int, additionalCharacteristics: Int)

Creates a Spliterator.OfInt covering a range of elements of a given array, using a customized set of spliterator characteristics.

static Spliterator.OfLong!
spliterator(array: LongArray!, additionalCharacteristics: Int)

Creates a Spliterator.OfLong covering the elements of a given array, using a customized set of spliterator characteristics.

static Spliterator.OfLong!
spliterator(array: LongArray!, fromIndex: Int, toIndex: Int, additionalCharacteristics: Int)

Creates a Spliterator.OfLong covering a range of elements of a given array, using a customized set of spliterator characteristics.

static Spliterator.OfDouble!
spliterator(array: DoubleArray!, additionalCharacteristics: Int)

Creates a Spliterator.OfDouble covering the elements of a given array, using a customized set of spliterator characteristics.

static Spliterator.OfDouble!
spliterator(array: DoubleArray!, fromIndex: Int, toIndex: Int, additionalCharacteristics: Int)

Creates a Spliterator.OfDouble covering a range of elements of a given array, using a customized set of spliterator characteristics.

static Spliterator<T>!
spliterator(c: MutableCollection<out T>!, characteristics: Int)

Creates a Spliterator using the given collection's java.util.Collection#iterator() as the source of elements, and reporting its java.util.Collection#size() as its initial size.

static Spliterator<T>!
spliterator(iterator: MutableIterator<T>!, size: Long, characteristics: Int)

Creates a Spliterator using a given Iterator as the source of elements, and with a given initially reported size.

static Spliterator.OfInt!
spliterator(iterator: PrimitiveIterator.OfInt!, size: Long, characteristics: Int)

Creates a Spliterator.OfInt using a given IntStream.IntIterator as the source of elements, and with a given initially reported size.

static Spliterator.OfLong!
spliterator(iterator: PrimitiveIterator.OfLong!, size: Long, characteristics: Int)

Creates a Spliterator.OfLong using a given LongStream.LongIterator as the source of elements, and with a given initially reported size.

static Spliterator.OfDouble!
spliterator(iterator: PrimitiveIterator.OfDouble!, size: Long, characteristics: Int)

Creates a Spliterator.OfDouble using a given DoubleStream.DoubleIterator as the source of elements, and with a given initially reported size.

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

Creates a Spliterator using a given Iterator as the source of elements, with no initial size estimate.

static Spliterator.OfInt!
spliteratorUnknownSize(iterator: PrimitiveIterator.OfInt!, characteristics: Int)

Creates a Spliterator.OfInt using a given IntStream.IntIterator as the source of elements, with no initial size estimate.

static Spliterator.OfLong!
spliteratorUnknownSize(iterator: PrimitiveIterator.OfLong!, characteristics: Int)

Creates a Spliterator.OfLong using a given LongStream.LongIterator as the source of elements, with no initial size estimate.

static Spliterator.OfDouble!
spliteratorUnknownSize(iterator: PrimitiveIterator.OfDouble!, characteristics: Int)

Creates a Spliterator.OfDouble using a given DoubleStream.DoubleIterator as the source of elements, with no initial size estimate.

Public methods

emptyDoubleSpliterator

Added in API level 24
static fun emptyDoubleSpliterator(): Spliterator.OfDouble!

Creates an empty Spliterator.OfDouble

The empty spliterator reports Spliterator#SIZED and Spliterator#SUBSIZED. Calls to java.util.Spliterator#trySplit() always return null.

Return
Spliterator.OfDouble! An empty spliterator

emptyIntSpliterator

Added in API level 24
static fun emptyIntSpliterator(): Spliterator.OfInt!

Creates an empty Spliterator.OfInt

The empty spliterator reports Spliterator#SIZED and Spliterator#SUBSIZED. Calls to java.util.Spliterator#trySplit() always return null.

Return
Spliterator.OfInt! An empty spliterator

emptyLongSpliterator

Added in API level 24
static fun emptyLongSpliterator(): Spliterator.OfLong!

Creates an empty Spliterator.OfLong

The empty spliterator reports Spliterator#SIZED and Spliterator#SUBSIZED. Calls to java.util.Spliterator#trySplit() always return null.

Return
Spliterator.OfLong! An empty spliterator

emptySpliterator

Added in API level 24
static fun <T : Any!> emptySpliterator(): Spliterator<T>!

Creates an empty Spliterator

The empty spliterator reports Spliterator#SIZED and Spliterator#SUBSIZED. Calls to java.util.Spliterator#trySplit() always return null.

Parameters
<T> Type of elements
Return
Spliterator<T>! An empty spliterator

iterator

Added in API level 24
static fun <T : Any!> iterator(spliterator: Spliterator<out T>!): MutableIterator<T>!

Creates an Iterator from a Spliterator.

Traversal of elements should be accomplished through the iterator. The behaviour of traversal is undefined if the spliterator is operated after the iterator is returned.

Parameters
<T> Type of elements
spliterator Spliterator<out T>!: The spliterator
Return
MutableIterator<T>! An iterator
Exceptions
java.lang.NullPointerException if the given spliterator is null

iterator

Added in API level 24
static fun iterator(spliterator: Spliterator.OfInt!): PrimitiveIterator.OfInt!

Creates an PrimitiveIterator.OfInt from a Spliterator.OfInt.

Traversal of elements should be accomplished through the iterator. The behaviour of traversal is undefined if the spliterator is operated after the iterator is returned.

Parameters
spliterator Spliterator.OfInt!: The spliterator
Return
PrimitiveIterator.OfInt! An iterator
Exceptions
java.lang.NullPointerException if the given spliterator is null

iterator

Added in API level 24
static fun iterator(spliterator: Spliterator.OfLong!): PrimitiveIterator.OfLong!

Creates an PrimitiveIterator.OfLong from a Spliterator.OfLong.

Traversal of elements should be accomplished through the iterator. The behaviour of traversal is undefined if the spliterator is operated after the iterator is returned.

Parameters
spliterator Spliterator.OfLong!: The spliterator
Return
PrimitiveIterator.OfLong! An iterator
Exceptions
java.lang.NullPointerException if the given spliterator is null

iterator

Added in API level 24
static fun iterator(spliterator: Spliterator.OfDouble!): PrimitiveIterator.OfDouble!

Creates an PrimitiveIterator.OfDouble from a Spliterator.OfDouble.

Traversal of elements should be accomplished through the iterator. The behaviour of traversal is undefined if the spliterator is operated after the iterator is returned.

Parameters
spliterator Spliterator.OfDouble!: The spliterator
Return
PrimitiveIterator.OfDouble! An iterator
Exceptions
java.lang.NullPointerException if the given spliterator is null

spliterator

Added in API level 24
static fun <T : Any!> spliterator(
    array: Array<Any!>!,
    additionalCharacteristics: Int
): Spliterator<T>!

Creates a Spliterator covering the elements of a given array, using a customized set of spliterator characteristics.

This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays#spliterator(Object[]).

The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report; it is common to additionally specify IMMUTABLE and ORDERED.

Parameters
<T> Type of elements
array Array<Any!>!: The array, assumed to be unmodified during use
additionalCharacteristics Int: Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
Return
Spliterator<T>! A spliterator for an array
Exceptions
java.lang.NullPointerException if the given array is null

spliterator

Added in API level 24
static fun <T : Any!> spliterator(
    array: Array<Any!>!,
    fromIndex: Int,
    toIndex: Int,
    additionalCharacteristics: Int
): Spliterator<T>!

Creates a Spliterator covering a range of elements of a given array, using a customized set of spliterator characteristics.

This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays#spliterator(Object[]).

The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report; it is common to additionally specify IMMUTABLE and ORDERED.

Parameters
<T> Type of elements
array Array<Any!>!: The array, assumed to be unmodified during use
fromIndex Int: The least index (inclusive) to cover
toIndex Int: One past the greatest index to cover
additionalCharacteristics Int: Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
Return
Spliterator<T>! A spliterator for an array
Exceptions
java.lang.NullPointerException if the given array is null
java.lang.ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex is greater than the array size

spliterator

Added in API level 24
static fun spliterator(
    array: IntArray!,
    additionalCharacteristics: Int
): Spliterator.OfInt!

Creates a Spliterator.OfInt covering the elements of a given array, using a customized set of spliterator characteristics.

This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays#spliterator(int[]).

The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report; it is common to additionally specify IMMUTABLE and ORDERED.

Parameters
array IntArray!: The array, assumed to be unmodified during use
additionalCharacteristics Int: Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
Return
Spliterator.OfInt! A spliterator for an array
Exceptions
java.lang.NullPointerException if the given array is null

spliterator

Added in API level 24
static fun spliterator(
    array: IntArray!,
    fromIndex: Int,
    toIndex: Int,
    additionalCharacteristics: Int
): Spliterator.OfInt!

Creates a Spliterator.OfInt covering a range of elements of a given array, using a customized set of spliterator characteristics.

This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays#spliterator(int[], int, int).

The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report; it is common to additionally specify IMMUTABLE and ORDERED.

Parameters
array IntArray!: The array, assumed to be unmodified during use
fromIndex Int: The least index (inclusive) to cover
toIndex Int: One past the greatest index to cover
additionalCharacteristics Int: Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
Return
Spliterator.OfInt! A spliterator for an array
Exceptions
java.lang.NullPointerException if the given array is null
java.lang.ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex is greater than the array size

spliterator

Added in API level 24
static fun spliterator(
    array: LongArray!,
    additionalCharacteristics: Int
): Spliterator.OfLong!

Creates a Spliterator.OfLong covering the elements of a given array, using a customized set of spliterator characteristics.

This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays#spliterator(long[]).

The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report; it is common to additionally specify IMMUTABLE and ORDERED.

Parameters
array LongArray!: The array, assumed to be unmodified during use
additionalCharacteristics Int: Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
Return
Spliterator.OfLong! A spliterator for an array
Exceptions
java.lang.NullPointerException if the given array is null

spliterator

Added in API level 24
static fun spliterator(
    array: LongArray!,
    fromIndex: Int,
    toIndex: Int,
    additionalCharacteristics: Int
): Spliterator.OfLong!

Creates a Spliterator.OfLong covering a range of elements of a given array, using a customized set of spliterator characteristics.

This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays#spliterator(long[], int, int).

The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report. (For example, if it is known the array will not be further modified, specify IMMUTABLE; if the array data is considered to have an encounter order, specify ORDERED). The method Arrays#spliterator(long[], int, int) can often be used instead, which returns a spliterator that reports SIZED, SUBSIZED, IMMUTABLE, and ORDERED.

Parameters
array LongArray!: The array, assumed to be unmodified during use
fromIndex Int: The least index (inclusive) to cover
toIndex Int: One past the greatest index to cover
additionalCharacteristics Int: Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
Return
Spliterator.OfLong! A spliterator for an array
Exceptions
java.lang.NullPointerException if the given array is null
java.lang.ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex is greater than the array size

spliterator

Added in API level 24
static fun spliterator(
    array: DoubleArray!,
    additionalCharacteristics: Int
): Spliterator.OfDouble!

Creates a Spliterator.OfDouble covering the elements of a given array, using a customized set of spliterator characteristics.

This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays#spliterator(double[]).

The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report; it is common to additionally specify IMMUTABLE and ORDERED.

Parameters
array DoubleArray!: The array, assumed to be unmodified during use
additionalCharacteristics Int: Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
Return
Spliterator.OfDouble! A spliterator for an array
Exceptions
java.lang.NullPointerException if the given array is null

spliterator

Added in API level 24
static fun spliterator(
    array: DoubleArray!,
    fromIndex: Int,
    toIndex: Int,
    additionalCharacteristics: Int
): Spliterator.OfDouble!

Creates a Spliterator.OfDouble covering a range of elements of a given array, using a customized set of spliterator characteristics.

This method is provided as an implementation convenience for Spliterators which store portions of their elements in arrays, and need fine control over Spliterator characteristics. Most other situations in which a Spliterator for an array is needed should use Arrays#spliterator(double[], int, int).

The returned spliterator always reports the characteristics SIZED and SUBSIZED. The caller may provide additional characteristics for the spliterator to report. (For example, if it is known the array will not be further modified, specify IMMUTABLE; if the array data is considered to have an encounter order, specify ORDERED). The method Arrays#spliterator(long[], int, int) can often be used instead, which returns a spliterator that reports SIZED, SUBSIZED, IMMUTABLE, and ORDERED.

Parameters
array DoubleArray!: The array, assumed to be unmodified during use
fromIndex Int: The least index (inclusive) to cover
toIndex Int: One past the greatest index to cover
additionalCharacteristics Int: Additional spliterator characteristics of this spliterator's source or elements beyond SIZED and SUBSIZED which are always reported
Return
Spliterator.OfDouble! A spliterator for an array
Exceptions
java.lang.NullPointerException if the given array is null
java.lang.ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex is greater than the array size

spliterator

Added in API level 24
static fun <T : Any!> spliterator(
    c: MutableCollection<out T>!,
    characteristics: Int
): Spliterator<T>!

Creates a Spliterator using the given collection's java.util.Collection#iterator() as the source of elements, and reporting its java.util.Collection#size() as its initial size.

The spliterator is late-binding, inherits the fail-fast properties of the collection's iterator, and implements trySplit to permit limited parallelism.

Parameters
<T> Type of elements
c MutableCollection<out T>!: The collection
characteristics Int: Characteristics of this spliterator's source or elements. The characteristics SIZED and SUBSIZED are additionally reported unless CONCURRENT is supplied.
Return
Spliterator<T>! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given collection is null

spliterator

Added in API level 24
static fun <T : Any!> spliterator(
    iterator: MutableIterator<T>!,
    size: Long,
    characteristics: Int
): Spliterator<T>!

Creates a Spliterator using a given Iterator as the source of elements, and with a given initially reported size.

The spliterator is not late-binding, inherits the fail-fast properties of the iterator, and implements trySplit to permit limited parallelism.

Traversal of elements should be accomplished through the spliterator. The behaviour of splitting and traversal is undefined if the iterator is operated on after the spliterator is returned, or the initially reported size is not equal to the actual number of elements in the source.

Parameters
<T> Type of elements
iterator MutableIterator<T>!: The iterator for the source
size Long: The number of elements in the source, to be reported as initial estimateSize
characteristics Int: Characteristics of this spliterator's source or elements. The characteristics SIZED and SUBSIZED are additionally reported unless CONCURRENT is supplied.
Return
Spliterator<T>! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given iterator is null

spliterator

Added in API level 24
static fun spliterator(
    iterator: PrimitiveIterator.OfInt!,
    size: Long,
    characteristics: Int
): Spliterator.OfInt!

Creates a Spliterator.OfInt using a given IntStream.IntIterator as the source of elements, and with a given initially reported size.

The spliterator is not late-binding, inherits the fail-fast properties of the iterator, and implements trySplit to permit limited parallelism.

Traversal of elements should be accomplished through the spliterator. The behaviour of splitting and traversal is undefined if the iterator is operated on after the spliterator is returned, or the initially reported size is not equal to the actual number of elements in the source.

Parameters
iterator PrimitiveIterator.OfInt!: The iterator for the source
size Long: The number of elements in the source, to be reported as initial estimateSize.
characteristics Int: Characteristics of this spliterator's source or elements. The characteristics SIZED and SUBSIZED are additionally reported unless CONCURRENT is supplied.
Return
Spliterator.OfInt! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given iterator is null

spliterator

Added in API level 24
static fun spliterator(
    iterator: PrimitiveIterator.OfLong!,
    size: Long,
    characteristics: Int
): Spliterator.OfLong!

Creates a Spliterator.OfLong using a given LongStream.LongIterator as the source of elements, and with a given initially reported size.

The spliterator is not late-binding, inherits the fail-fast properties of the iterator, and implements trySplit to permit limited parallelism.

Traversal of elements should be accomplished through the spliterator. The behaviour of splitting and traversal is undefined if the iterator is operated on after the spliterator is returned, or the initially reported size is not equal to the actual number of elements in the source.

Parameters
iterator PrimitiveIterator.OfLong!: The iterator for the source
size Long: The number of elements in the source, to be reported as initial estimateSize.
characteristics Int: Characteristics of this spliterator's source or elements. The characteristics SIZED and SUBSIZED are additionally reported unless CONCURRENT is supplied.
Return
Spliterator.OfLong! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given iterator is null

spliterator

Added in API level 24
static fun spliterator(
    iterator: PrimitiveIterator.OfDouble!,
    size: Long,
    characteristics: Int
): Spliterator.OfDouble!

Creates a Spliterator.OfDouble using a given DoubleStream.DoubleIterator as the source of elements, and with a given initially reported size.

The spliterator is not late-binding, inherits the fail-fast properties of the iterator, and implements trySplit to permit limited parallelism.

Traversal of elements should be accomplished through the spliterator. The behaviour of splitting and traversal is undefined if the iterator is operated on after the spliterator is returned, or the initially reported size is not equal to the actual number of elements in the source.

Parameters
iterator PrimitiveIterator.OfDouble!: The iterator for the source
size Long: The number of elements in the source, to be reported as initial estimateSize
characteristics Int: Characteristics of this spliterator's source or elements. The characteristics SIZED and SUBSIZED are additionally reported unless CONCURRENT is supplied.
Return
Spliterator.OfDouble! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given iterator is null

spliteratorUnknownSize

Added in API level 24
static fun <T : Any!> spliteratorUnknownSize(
    iterator: MutableIterator<T>!,
    characteristics: Int
): Spliterator<T>!

Creates a Spliterator using a given Iterator as the source of elements, with no initial size estimate.

The spliterator is not late-binding, inherits the fail-fast properties of the iterator, and implements trySplit to permit limited parallelism.

Traversal of elements should be accomplished through the spliterator. The behaviour of splitting and traversal is undefined if the iterator is operated on after the spliterator is returned.

Parameters
<T> Type of elements
iterator MutableIterator<T>!: The iterator for the source
characteristics Int: Characteristics of this spliterator's source or elements (SIZED and SUBSIZED, if supplied, are ignored and are not reported.)
Return
Spliterator<T>! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given iterator is null

spliteratorUnknownSize

Added in API level 24
static fun spliteratorUnknownSize(
    iterator: PrimitiveIterator.OfInt!,
    characteristics: Int
): Spliterator.OfInt!

Creates a Spliterator.OfInt using a given IntStream.IntIterator as the source of elements, with no initial size estimate.

The spliterator is not late-binding, inherits the fail-fast properties of the iterator, and implements trySplit to permit limited parallelism.

Traversal of elements should be accomplished through the spliterator. The behaviour of splitting and traversal is undefined if the iterator is operated on after the spliterator is returned.

Parameters
iterator PrimitiveIterator.OfInt!: The iterator for the source
characteristics Int: Characteristics of this spliterator's source or elements (SIZED and SUBSIZED, if supplied, are ignored and are not reported.)
Return
Spliterator.OfInt! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given iterator is null

spliteratorUnknownSize

Added in API level 24
static fun spliteratorUnknownSize(
    iterator: PrimitiveIterator.OfLong!,
    characteristics: Int
): Spliterator.OfLong!

Creates a Spliterator.OfLong using a given LongStream.LongIterator as the source of elements, with no initial size estimate.

The spliterator is not late-binding, inherits the fail-fast properties of the iterator, and implements trySplit to permit limited parallelism.

Traversal of elements should be accomplished through the spliterator. The behaviour of splitting and traversal is undefined if the iterator is operated on after the spliterator is returned.

Parameters
iterator PrimitiveIterator.OfLong!: The iterator for the source
characteristics Int: Characteristics of this spliterator's source or elements (SIZED and SUBSIZED, if supplied, are ignored and are not reported.)
Return
Spliterator.OfLong! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given iterator is null

spliteratorUnknownSize

Added in API level 24
static fun spliteratorUnknownSize(
    iterator: PrimitiveIterator.OfDouble!,
    characteristics: Int
): Spliterator.OfDouble!

Creates a Spliterator.OfDouble using a given DoubleStream.DoubleIterator as the source of elements, with no initial size estimate.

The spliterator is not late-binding, inherits the fail-fast properties of the iterator, and implements trySplit to permit limited parallelism.

Traversal of elements should be accomplished through the spliterator. The behaviour of splitting and traversal is undefined if the iterator is operated on after the spliterator is returned.

Parameters
iterator PrimitiveIterator.OfDouble!: The iterator for the source
characteristics Int: Characteristics of this spliterator's source or elements (SIZED and SUBSIZED, if supplied, are ignored and are not reported.)
Return
Spliterator.OfDouble! A spliterator from an iterator
Exceptions
java.lang.NullPointerException if the given iterator is null