Spliterators

public final class Spliterators extends Object

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

See Also

Nested Class Summary

class Spliterators.AbstractDoubleSpliterator An abstract Spliterator.OfDouble that implements trySplit to permit limited parallelism. 
class Spliterators.AbstractIntSpliterator An abstract Spliterator.OfInt that implements trySplit to permit limited parallelism. 
class Spliterators.AbstractLongSpliterator An abstract Spliterator.OfLong that implements trySplit to permit limited parallelism. 
class Spliterators.AbstractSpliterator<T> An abstract Spliterator that implements trySplit to permit limited parallelism. 

Public Method Summary

static Spliterator.OfDouble
emptyDoubleSpliterator()
Creates an empty Spliterator.OfDouble

The empty spliterator reports SIZED and SUBSIZED.

static Spliterator.OfInt
emptyIntSpliterator()
Creates an empty Spliterator.OfInt

The empty spliterator reports SIZED and SUBSIZED.

static Spliterator.OfLong
emptyLongSpliterator()
Creates an empty Spliterator.OfLong

The empty spliterator reports SIZED and SUBSIZED.

static <T> Spliterator<T>
emptySpliterator()
Creates an empty Spliterator

The empty spliterator reports SIZED and SUBSIZED.

static PrimitiveIterator.OfDouble
iterator(Spliterator.OfDouble spliterator)
Creates an PrimitiveIterator.OfDouble from a Spliterator.OfDouble.
static PrimitiveIterator.OfInt
iterator(Spliterator.OfInt spliterator)
Creates an PrimitiveIterator.OfInt from a Spliterator.OfInt.
static PrimitiveIterator.OfLong
iterator(Spliterator.OfLong spliterator)
Creates an PrimitiveIterator.OfLong from a Spliterator.OfLong.
static <T> Iterator<T>
iterator(Spliterator<? extends T> spliterator)
Creates an Iterator from a Spliterator.
static <T> Spliterator<T>
spliterator(Iterator<? extends T> iterator, long size, int characteristics)
Creates a Spliterator using a given Iterator as the source of elements, and with a given initially reported size.
static Spliterator.OfLong
spliterator(long[] array, int additionalCharacteristics)
Creates a Spliterator.OfLong covering the elements of a given array, using a customized set of spliterator characteristics.
static <T> Spliterator<T>
spliterator(Object[] array, int fromIndex, int toIndex, int additionalCharacteristics)
Creates a Spliterator covering a range of elements of a given array, using a customized set of spliterator characteristics.
static Spliterator.OfLong
spliterator(long[] array, int fromIndex, int toIndex, int additionalCharacteristics)
Creates a Spliterator.OfLong covering a range of elements of a given array, using a customized set of spliterator characteristics.
static Spliterator.OfLong
spliterator(PrimitiveIterator.OfLong iterator, long size, int characteristics)
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(PrimitiveIterator.OfDouble iterator, long size, int characteristics)
Creates a Spliterator.OfDouble using a given DoubleStream.DoubleIterator as the source of elements, and with a given initially reported size.
static Spliterator.OfDouble
spliterator(double[] array, int additionalCharacteristics)
Creates a Spliterator.OfDouble covering the elements of a given array, using a customized set of spliterator characteristics.
static Spliterator.OfInt
spliterator(int[] array, int fromIndex, int toIndex, int additionalCharacteristics)
Creates a Spliterator.OfInt covering a range of elements of a given array, using a customized set of spliterator characteristics.
static <T> Spliterator<T>
spliterator(Collection<? extends T> c, int characteristics)
Creates a Spliterator using the given collection's iterator() as the source of elements, and reporting its size() as its initial size.
static <T> Spliterator<T>
spliterator(Object[] array, int additionalCharacteristics)
Creates a Spliterator covering the elements of a given array, using a customized set of spliterator characteristics.
static Spliterator.OfInt
spliterator(int[] array, int additionalCharacteristics)
Creates a Spliterator.OfInt covering the elements of a given array, using a customized set of spliterator characteristics.
static Spliterator.OfDouble
spliterator(double[] array, int fromIndex, int toIndex, int additionalCharacteristics)
Creates a Spliterator.OfDouble covering a range of elements of a given array, using a customized set of spliterator characteristics.
static Spliterator.OfInt
spliterator(PrimitiveIterator.OfInt iterator, long size, int characteristics)
Creates a Spliterator.OfInt using a given IntStream.IntIterator as the source of elements, and with a given initially reported size.
static Spliterator.OfInt
spliteratorUnknownSize(PrimitiveIterator.OfInt iterator, int characteristics)
Creates a Spliterator.OfInt using a given IntStream.IntIterator as the source of elements, with no initial size estimate.
static <T> Spliterator<T>
spliteratorUnknownSize(Iterator<? extends T> iterator, int characteristics)
Creates a Spliterator using a given Iterator as the source of elements, with no initial size estimate.
static Spliterator.OfDouble
spliteratorUnknownSize(PrimitiveIterator.OfDouble iterator, int characteristics)
Creates a Spliterator.OfDouble using a given DoubleStream.DoubleIterator as the source of elements, with no initial size estimate.
static Spliterator.OfLong
spliteratorUnknownSize(PrimitiveIterator.OfLong iterator, int characteristics)
Creates a Spliterator.OfLong using a given LongStream.LongIterator as the source of elements, with no initial size estimate.

Inherited Method Summary