Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public interface DoubleStream

ExtendsAutoCloseable, 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.

Methods

public abstract DoubleStream sequential()Declared again with this type, as the JDK does: a call compiled against the JDK names DoubleStream.sequential() answering DoubleStream, and the method inherited from BaseStream answers its type variable, which is another descriptor.
public abstract DoubleStream parallel()Declared again with this type; see sequential().
public abstract DoubleStream filter(DoublePredicate predicate)
public abstract DoubleStream map(DoubleUnaryOperator mapper)
public abstract <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper)
public abstract IntStream mapToInt(DoubleToIntFunction mapper)
public abstract LongStream mapToLong(DoubleToLongFunction mapper)
public abstract DoubleStream flatMap(DoubleFunction<? extends DoubleStream> mapper)
public abstract DoubleStream distinct()
public abstract DoubleStream sorted()
public abstract DoubleStream peek(DoubleConsumer action)
public abstract DoubleStream limit(long maxSize)
public abstract DoubleStream skip(long n)
public abstract DoubleStream takeWhile(DoublePredicate predicate)
public abstract DoubleStream dropWhile(DoublePredicate predicate)
public abstract void forEach(DoubleConsumer action)
public abstract void forEachOrdered(DoubleConsumer action)
public abstract double[] toArray()
public abstract double reduce(double identity, DoubleBinaryOperator op)
public abstract OptionalDouble reduce(DoubleBinaryOperator op)
public abstract <R> R collect(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BiConsumer<R, R> combiner)
public abstract double sum()
public abstract OptionalDouble min()
public abstract OptionalDouble max()
public abstract long count()
public abstract OptionalDouble average()
public abstract DoubleSummaryStatistics summaryStatistics()
public abstract boolean anyMatch(DoublePredicate predicate)
public abstract boolean allMatch(DoublePredicate predicate)
public abstract boolean noneMatch(DoublePredicate predicate)
public abstract OptionalDouble findFirst()
public abstract OptionalDouble findAny()
public abstract Stream<Double> boxed()
public abstract PrimitiveIterator.OfDouble iterator()
public static DoubleStream empty()
public static DoubleStream of(double value)
public static DoubleStream of(double... values)
public static DoubleStream iterate(double seed, DoubleUnaryOperator f)seed, then f applied to it, then f applied to that, without end.
public static DoubleStream iterate(double seed, DoublePredicate hasNext, DoubleUnaryOperator next)As iterate(double, DoubleUnaryOperator), ending before the first value hasNext refuses.
public static DoubleStream generate(DoubleSupplier s)The values s answers, one call per element, without end.
public static DoubleStream concat(DoubleStream a, DoubleStream b)The elements of a, then those of b.

Inherited methods

Method details

sequential

public abstract DoubleStream sequential()
Declared again with this type, as the JDK does: a call compiled against the JDK names DoubleStream.sequential() answering DoubleStream, and the method inherited from BaseStream answers its type variable, which is another descriptor.

parallel

public abstract DoubleStream parallel()
Declared again with this type; see sequential().

filter

public abstract DoubleStream filter(DoublePredicate predicate)

map

public abstract DoubleStream map(DoubleUnaryOperator mapper)

mapToObj

public abstract <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper)

mapToInt

public abstract IntStream mapToInt(DoubleToIntFunction mapper)

mapToLong

public abstract LongStream mapToLong(DoubleToLongFunction mapper)

flatMap

public abstract DoubleStream flatMap(DoubleFunction<? extends DoubleStream> mapper)

distinct

public abstract DoubleStream distinct()

sorted

public abstract DoubleStream sorted()

peek

public abstract DoubleStream peek(DoubleConsumer action)

limit

public abstract DoubleStream limit(long maxSize)

skip

public abstract DoubleStream skip(long n)

takeWhile

public abstract DoubleStream takeWhile(DoublePredicate predicate)

dropWhile

public abstract DoubleStream dropWhile(DoublePredicate predicate)

forEach

public abstract void forEach(DoubleConsumer action)

forEachOrdered

public abstract void forEachOrdered(DoubleConsumer action)

toArray

public abstract double[] toArray()

reduce

public abstract double reduce(double identity, DoubleBinaryOperator op)

reduce

public abstract OptionalDouble reduce(DoubleBinaryOperator op)

collect

public abstract <R> R collect(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BiConsumer<R, R> combiner)

sum

public abstract double sum()

min

public abstract OptionalDouble min()

max

public abstract OptionalDouble max()

count

public abstract long count()

average

public abstract OptionalDouble average()

summaryStatistics

public abstract DoubleSummaryStatistics summaryStatistics()

anyMatch

public abstract boolean anyMatch(DoublePredicate predicate)

allMatch

public abstract boolean allMatch(DoublePredicate predicate)

noneMatch

public abstract boolean noneMatch(DoublePredicate predicate)

findFirst

public abstract OptionalDouble findFirst()

findAny

public abstract OptionalDouble findAny()

boxed

public abstract Stream<Double> boxed()

iterator

public abstract PrimitiveIterator.OfDouble iterator()

empty

public static DoubleStream empty()

of

public static DoubleStream of(double value)

of

public static DoubleStream of(double... values)

iterate

public static DoubleStream iterate(double seed, DoubleUnaryOperator f)
seed, then f applied to it, then f applied to that, without end.

iterate

public static DoubleStream iterate(double seed, DoublePredicate hasNext, DoubleUnaryOperator next)
As iterate(double, DoubleUnaryOperator), ending before the first value hasNext refuses.

generate

public static DoubleStream generate(DoubleSupplier s)
The values s answers, one call per element, without end.

concat

public static DoubleStream concat(DoubleStream a, DoubleStream b)
The elements of a, then those of b. Closing the result closes both.