public final class PrimitiveIteratorExtensions extends Object
PrimitiveIterator
.
The methods are intended to be used as extension methods.
The class is not intended to be instantiated.Modifier and Type | Method and Description |
---|---|
static DoubleStream |
parallelStreamRemaining(PrimitiveIterator.OfDouble wrapped)
Convenience method to turn a primitive iterator into a parallel stream.
|
static IntStream |
parallelStreamRemaining(PrimitiveIterator.OfInt wrapped)
Convenience method to turn a primitive iterator into a parallel stream.
|
static LongStream |
parallelStreamRemaining(PrimitiveIterator.OfLong wrapped)
Convenience method to turn a primitive iterator into a parallel stream.
|
static DoubleStream |
streamRemaining(PrimitiveIterator.OfDouble wrapped)
Convenience method to turn a primitive iterator into a stream.
|
static IntStream |
streamRemaining(PrimitiveIterator.OfInt wrapped)
Convenience method to turn a primitive iterator into a stream.
|
static LongStream |
streamRemaining(PrimitiveIterator.OfLong wrapped)
Convenience method to turn a primitive iterator into a stream.
|
static DoubleStream |
streamRemainingExhaustive(PrimitiveIterator.OfDouble wrapped)
Convenience method to turn a primitive iterator into a stream.
|
static IntStream |
streamRemainingExhaustive(PrimitiveIterator.OfInt wrapped)
Convenience method to turn a primitive iterator into a stream.
|
static LongStream |
streamRemainingExhaustive(PrimitiveIterator.OfLong wrapped)
Convenience method to turn a primitive iterator into a stream.
|
static DoubleSummaryStatistics |
summarize(PrimitiveIterator.OfDouble iterator)
This method will read all remaining
double values from the given
iterator and creates and returns an DoubleSummaryStatistics over all
these elements. |
static IntSummaryStatistics |
summarize(PrimitiveIterator.OfInt iterator)
This method will read all remaining
int values from the given
iterator and creates and returns an IntSummaryStatistics over all
these elements. |
static LongSummaryStatistics |
summarize(PrimitiveIterator.OfLong iterator)
This method will read all remaining
long values from the given
iterator and creates and returns an LongSummaryStatistics over all
these elements. |
public static IntStream streamRemaining(PrimitiveIterator.OfInt wrapped)
null
.
Note that this method does not guarantee that the given iterator will
be exhausted. If the underlying iterator implementation is known the stream
may not pull elements from the wrapped
iterator.wrapped
- the iterator from which the returned stream is created fromwrapped
PrimitiveIteratorExtensions#streamRemainingExhaustive(OfInt)
public static IntStream streamRemainingExhaustive(PrimitiveIterator.OfInt wrapped)
null
.
Note that this method does not guarantee that the given iterator will
be exhausted. If the underlying iterator implementation is known the stream
may not pull elements from the wrapped
iterator in order to create
a stream that may have better characteristics in some way.wrapped
- the iterator from which the returned stream is created fromwrapped
PrimitiveIteratorExtensions#streamRemaining(OfInt)
public static IntStream parallelStreamRemaining(PrimitiveIterator.OfInt wrapped)
null
.
Note that this method does not guarantee that the given iterator will
be exhausted. If the underlying iterator implementation is known the stream
may not pull elements from the wrapped
iterator.wrapped
- the iterator from which the returned stream is created fromwrapped
public static IntSummaryStatistics summarize(PrimitiveIterator.OfInt iterator)
int
values from the given
iterator
and creates and returns an IntSummaryStatistics
over all
these elements.iterator
- primitive iterator over elements to be summarizediterator
NullPointerException
- if iterator
is null
.public static LongStream streamRemaining(PrimitiveIterator.OfLong wrapped)
null
.
Note that this method does not guarantee that the given iterator will
be exhausted. If the underlying iterator implementation is known the stream
may not pull elements from the wrapped
iterator in order to create
a stream that may have better characteristics in some way.wrapped
- the iterator from which the returned stream is created fromwrapped
PrimitiveIteratorExtensions#streamRemainingExhaustive(OfLong)
public static LongStream streamRemainingExhaustive(PrimitiveIterator.OfLong wrapped)
null
.
Note that this method does not guarantee that the given iterator will
be exhausted. If the underlying iterator implementation is known the stream
may not pull elements from the wrapped
iterator.wrapped
- the iterator from which the returned stream is created fromwrapped
PrimitiveIteratorExtensions#streamRemaining(OfLong)
public static LongStream parallelStreamRemaining(PrimitiveIterator.OfLong wrapped)
null
.wrapped
- the iterator from which the returned stream is created fromwrapped
public static LongSummaryStatistics summarize(PrimitiveIterator.OfLong iterator)
long
values from the given
iterator
and creates and returns an LongSummaryStatistics
over all
these elements.iterator
- primitive iterator over elements to be summarizediterator
NullPointerException
- if iterator
is null
.public static DoubleStream streamRemaining(PrimitiveIterator.OfDouble wrapped)
null
.
Note that this method does not guarantee that the given iterator will
be exhausted. If the underlying iterator implementation is known the stream
may not pull elements from the wrapped
iterator in order to create
a stream that may have better characteristics in some way.wrapped
- the iterator from which the returned stream is created fromwrapped
PrimitiveIteratorExtensions#streamRemainingExhaustive(OfDouble)
public static DoubleStream streamRemainingExhaustive(PrimitiveIterator.OfDouble wrapped)
null
.
Note that this method does guarantee that the given iterator will
be exhausted. All elements provided by the stream are taken from the wrapped
iterator.wrapped
- the iterator from which the returned stream is created fromwrapped
PrimitiveIteratorExtensions#streamRemaining(OfDouble)
public static DoubleStream parallelStreamRemaining(PrimitiveIterator.OfDouble wrapped)
wrapped
- the iterator from which the returned stream is created fromwrapped
public static DoubleSummaryStatistics summarize(PrimitiveIterator.OfDouble iterator)
double
values from the given
iterator
and creates and returns an DoubleSummaryStatistics
over all
these elements.iterator
- primitive iterator over elements to be summarizediterator
NullPointerException
- if iterator
is null
.Copyright © 2019. All rights reserved.