| Modifier and Type | Method and Description |
|---|---|
default <RR> DoubleCollector<A,RR> |
DoubleCollector.andThen(Function<R,RR> finisher)
Adapts this collector to perform an additional finishing transformation.
|
static DoubleCollector<?,OptionalDouble> |
DoubleCollector.averaging()
Returns a
DoubleCollector that produces the arithmetic mean of
the input elements or an empty optional if no elements are collected. |
static DoubleCollector<?,Long> |
DoubleCollector.counting()
Returns a
DoubleCollector that counts the number of input
elements and returns the result as Long. |
static DoubleCollector<?,Integer> |
DoubleCollector.countingInt()
Returns an
DoubleCollector that counts the number of input
elements and returns the result as Integer. |
static <K> DoubleCollector<?,Map<K,double[]>> |
DoubleCollector.groupingBy(DoubleFunction<? extends K> classifier)
Returns a
DoubleCollector implementing a "group by" operation on
input numbers, grouping them according to a classification function, and
returning the results in a Map. |
static <K,D,A> DoubleCollector<?,Map<K,D>> |
DoubleCollector.groupingBy(DoubleFunction<? extends K> classifier,
DoubleCollector<A,D> downstream)
Returns a
DoubleCollector implementing a cascaded "group by"
operation on input numbers, grouping them according to a classification
function, and then performing a reduction operation on the values
associated with a given key using the specified downstream
IntCollector. |
static <K,D,A,M extends Map<K,D>> |
DoubleCollector.groupingBy(DoubleFunction<? extends K> classifier,
Supplier<M> mapFactory,
DoubleCollector<A,D> downstream)
Returns a
DoubleCollector implementing a cascaded "group by"
operation on input numbers, grouping them according to a classification
function, and then performing a reduction operation on the values
associated with a given key using the specified downstream
IntCollector. |
static DoubleCollector<?,String> |
DoubleCollector.joining(CharSequence delimiter)
Returns a
DoubleCollector that converts the input numbers to
strings and concatenates them, separated by the specified delimiter, in
encounter order. |
static DoubleCollector<?,String> |
DoubleCollector.joining(CharSequence delimiter,
CharSequence prefix,
CharSequence suffix)
Returns a
DoubleCollector that converts the input numbers to
strings and concatenates them, separated by the specified delimiter, with
the specified prefix and suffix, in encounter order. |
static <A,R> DoubleCollector<?,R> |
DoubleCollector.mapping(DoubleUnaryOperator mapper,
DoubleCollector<A,R> downstream)
Adapts a
DoubleCollector to another one by applying a mapping
function to each input element before accumulation. |
static <U,A,R> DoubleCollector<?,R> |
DoubleCollector.mappingToObj(DoubleFunction<U> mapper,
Collector<U,A,R> downstream)
Adapts a
Collector accepting elements of type U to a
DoubleCollector by applying a mapping function to each input
element before accumulation. |
static DoubleCollector<?,OptionalDouble> |
DoubleCollector.max()
Returns a
DoubleCollector that produces the maximal element,
described as an OptionalDouble. |
static DoubleCollector<?,OptionalDouble> |
DoubleCollector.min()
Returns a
DoubleCollector that produces the minimal element,
described as an OptionalDouble. |
static <A,R> DoubleCollector<?,R> |
DoubleCollector.of(Collector<Double,A,R> collector)
Adapts a
Collector which accepts elements of type Double
to a DoubleCollector. |
static <A,R> DoubleCollector<A,R> |
DoubleCollector.of(Supplier<A> supplier,
ObjDoubleConsumer<A> doubleAccumulator,
BiConsumer<A,A> merger,
Function<A,R> finisher)
Returns a new
DoubleCollector described by the given
supplier, accumulator, merger, and
finisher functions. |
static <R> DoubleCollector<R,R> |
DoubleCollector.of(Supplier<R> supplier,
ObjDoubleConsumer<R> doubleAccumulator,
BiConsumer<R,R> merger)
Returns a new
DoubleCollector described by the given
supplier, accumulator, and merger functions. |
static DoubleCollector<?,Map<Boolean,double[]>> |
DoubleCollector.partitioningBy(DoublePredicate predicate)
Returns a
DoubleCollector which partitions the input elements
according to a DoublePredicate, and organizes them into a
Map<Boolean, double[]>. |
static <A,D> DoubleCollector<?,Map<Boolean,D>> |
DoubleCollector.partitioningBy(DoublePredicate predicate,
DoubleCollector<A,D> downstream)
Returns a
DoubleCollector which partitions the input numbers
according to a DoublePredicate, reduces the values in each
partition according to another IntCollector, and organizes them
into a Map<Boolean, D> whose values are the result of the
downstream reduction. |
static DoubleCollector<?,OptionalDouble> |
DoubleCollector.reducing(DoubleBinaryOperator op)
Returns a
DoubleCollector which performs a reduction of its input
numbers under a specified DoubleBinaryOperator. |
static DoubleCollector<?,Double> |
DoubleCollector.reducing(double identity,
DoubleBinaryOperator op)
Returns a
DoubleCollector which performs a reduction of its input
numbers under a specified IntBinaryOperator using the provided
identity. |
static DoubleCollector<?,DoubleSummaryStatistics> |
DoubleCollector.summarizing()
Returns a
DoubleCollector which returns summary statistics for
the input elements. |
static DoubleCollector<?,Double> |
DoubleCollector.summing()
Returns a
DoubleCollector that produces the sum of the input
elements. |
static DoubleCollector<?,double[]> |
DoubleCollector.toArray()
Returns a
DoubleCollector that produces the array of the input
elements. |
static DoubleCollector<?,boolean[]> |
DoubleCollector.toBooleanArray(DoublePredicate predicate)
Returns a
DoubleCollector which produces a boolean array
containing the results of applying the given predicate to the input
elements, in encounter order. |
static DoubleCollector<?,float[]> |
DoubleCollector.toFloatArray()
Returns a
DoubleCollector that produces the float[] array
of the input elements converting them via (float) casting. |
| Modifier and Type | Method and Description |
|---|---|
<A,R> R |
DoubleStreamEx.collect(DoubleCollector<A,R> collector)
Performs a mutable reduction operation on the elements of this stream
using an
DoubleCollector which encapsulates the supplier,
accumulator and merger functions making easier to reuse collection
strategies. |
static <K,D,A> DoubleCollector<?,Map<K,D>> |
DoubleCollector.groupingBy(DoubleFunction<? extends K> classifier,
DoubleCollector<A,D> downstream)
Returns a
DoubleCollector implementing a cascaded "group by"
operation on input numbers, grouping them according to a classification
function, and then performing a reduction operation on the values
associated with a given key using the specified downstream
IntCollector. |
static <K,D,A,M extends Map<K,D>> |
DoubleCollector.groupingBy(DoubleFunction<? extends K> classifier,
Supplier<M> mapFactory,
DoubleCollector<A,D> downstream)
Returns a
DoubleCollector implementing a cascaded "group by"
operation on input numbers, grouping them according to a classification
function, and then performing a reduction operation on the values
associated with a given key using the specified downstream
IntCollector. |
static <A,R> DoubleCollector<?,R> |
DoubleCollector.mapping(DoubleUnaryOperator mapper,
DoubleCollector<A,R> downstream)
Adapts a
DoubleCollector to another one by applying a mapping
function to each input element before accumulation. |
static <A,D> DoubleCollector<?,Map<Boolean,D>> |
DoubleCollector.partitioningBy(DoublePredicate predicate,
DoubleCollector<A,D> downstream)
Returns a
DoubleCollector which partitions the input numbers
according to a DoublePredicate, reduces the values in each
partition according to another IntCollector, and organizes them
into a Map<Boolean, D> whose values are the result of the
downstream reduction. |
Copyright © 2017. All rights reserved.