Interface DoubleStream
- All Superinterfaces:
AutoCloseable, BaseStream<Double, DoubleStream>
A sequence of double values to which operations are applied one stage at a
time, evaluated lazily, one element at a time, when a terminal operation
asks for them.
Streams here are sequential: parallel() answers the same stream, which
the JDK allows a parallel stream to be.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallMatch(DoublePredicate predicate) booleananyMatch(DoublePredicate predicate) average()boxed()<R> Rcollect(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BiConsumer<R, R> combiner) static DoubleStreamconcat(DoubleStream a, DoubleStream b) The elements ofa, then those ofb.longcount()distinct()dropWhile(DoublePredicate predicate) static DoubleStreamempty()filter(DoublePredicate predicate) findAny()flatMap(DoubleFunction<? extends DoubleStream> mapper) voidforEach(DoubleConsumer action) voidforEachOrdered(DoubleConsumer action) static DoubleStreamThe valuessanswers, one call per element, without end.static DoubleStreamiterate(double seed, DoublePredicate hasNext, DoubleUnaryOperator next) Asiterate(double, DoubleUnaryOperator), ending before the first valuehasNextrefuses.static DoubleStreamiterate(double seed, DoubleUnaryOperator f) seed, thenfapplied to it, thenfapplied to that, without end.iterator()limit(long maxSize) map(DoubleUnaryOperator mapper) mapToInt(DoubleToIntFunction mapper) mapToLong(DoubleToLongFunction mapper) <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper) max()min()booleannoneMatch(DoublePredicate predicate) static DoubleStreamof(double value) static DoubleStreamof(double... values) parallel()Declared again with this type; seesequential().peek(DoubleConsumer action) doublereduce(double identity, DoubleBinaryOperator op) Declared again with this type, as the JDK does: a call compiled against the JDK namesDoubleStream.sequential()answeringDoubleStream, and the method inherited fromBaseStreamanswers its type variable, which is another descriptor.skip(long n) sorted()doublesum()takeWhile(DoublePredicate predicate) double[]toArray()Methods inherited from interface BaseStream
close, isParallel, onClose, unordered
-
Method Details
-
sequential
DoubleStream sequential()Declared again with this type, as the JDK does: a call compiled against the JDK namesDoubleStream.sequential()answeringDoubleStream, and the method inherited fromBaseStreamanswers its type variable, which is another descriptor.- Specified by:
sequentialin interfaceBaseStream<Double, DoubleStream>
-
parallel
DoubleStream parallel()Declared again with this type; seesequential().- Specified by:
parallelin interfaceBaseStream<Double, DoubleStream>
-
filter
-
map
-
mapToObj
-
mapToInt
-
mapToLong
-
flatMap
-
distinct
DoubleStream distinct() -
sorted
DoubleStream sorted() -
peek
-
limit
-
skip
-
takeWhile
-
dropWhile
-
forEach
-
forEachOrdered
-
toArray
double[] toArray() -
reduce
-
reduce
-
collect
-
sum
double sum() -
min
OptionalDouble min() -
max
OptionalDouble max() -
count
long count() -
average
OptionalDouble average() -
summaryStatistics
DoubleSummaryStatistics summaryStatistics() -
anyMatch
-
allMatch
-
noneMatch
-
findFirst
OptionalDouble findFirst() -
findAny
OptionalDouble findAny() -
boxed
-
iterator
PrimitiveIterator.OfDouble iterator()- Specified by:
iteratorin interfaceBaseStream<Double, DoubleStream>
-
empty
-
of
-
of
-
iterate
seed, thenfapplied to it, thenfapplied to that, without end. -
iterate
Asiterate(double, DoubleUnaryOperator), ending before the first valuehasNextrefuses. -
generate
The valuessanswers, one call per element, without end. -
concat
The elements ofa, then those ofb. Closing the result closes both.
-