| Modifier and Type | Method and Description |
|---|---|
default <RR> LongCollector<A,RR> |
LongCollector.andThen(Function<R,RR> finisher)
Adapts this collector to perform an additional finishing transformation.
|
static LongCollector<?,OptionalDouble> |
LongCollector.averaging()
Returns a
LongCollector that produces the arithmetic mean of the
input elements or an empty optional if no elements are collected. |
static LongCollector<?,Long> |
LongCollector.counting()
Returns a
LongCollector that counts the number of input elements
and returns the result as Long. |
static LongCollector<?,Integer> |
LongCollector.countingInt()
Returns an
LongCollector that counts the number of input elements
and returns the result as Integer. |
static <K> LongCollector<?,Map<K,long[]>> |
LongCollector.groupingBy(LongFunction<? extends K> classifier)
Returns a
LongCollector 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> LongCollector<?,Map<K,D>> |
LongCollector.groupingBy(LongFunction<? extends K> classifier,
LongCollector<A,D> downstream)
Returns a
LongCollector 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>> |
LongCollector.groupingBy(LongFunction<? extends K> classifier,
Supplier<M> mapFactory,
LongCollector<A,D> downstream)
Returns a
LongCollector 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 LongCollector<?,String> |
LongCollector.joining(CharSequence delimiter)
Returns a
LongCollector that converts the input numbers to
strings and concatenates them, separated by the specified delimiter, in
encounter order. |
static LongCollector<?,String> |
LongCollector.joining(CharSequence delimiter,
CharSequence prefix,
CharSequence suffix)
Returns a
LongCollector 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> LongCollector<?,R> |
LongCollector.mapping(LongUnaryOperator mapper,
LongCollector<A,R> downstream)
Adapts a
LongCollector to another one by applying a mapping
function to each input element before accumulation. |
static <U,A,R> LongCollector<?,R> |
LongCollector.mappingToObj(LongFunction<U> mapper,
Collector<U,A,R> downstream)
Adapts a
Collector accepting elements of type U to a
LongCollector by applying a mapping function to each input
element before accumulation. |
static LongCollector<?,OptionalLong> |
LongCollector.max()
Returns a
LongCollector that produces the maximal element,
described as an OptionalLong. |
static LongCollector<?,OptionalLong> |
LongCollector.min()
Returns a
LongCollector that produces the minimal element,
described as an OptionalLong. |
static <A,R> LongCollector<?,R> |
LongCollector.of(Collector<Long,A,R> collector)
Adapts a
Collector which accepts elements of type Long to
a LongCollector. |
static <A,R> LongCollector<A,R> |
LongCollector.of(Supplier<A> supplier,
ObjLongConsumer<A> longAccumulator,
BiConsumer<A,A> merger,
Function<A,R> finisher)
Returns a new
LongCollector described by the given
supplier, accumulator, merger, and
finisher functions. |
static <R> LongCollector<R,R> |
LongCollector.of(Supplier<R> supplier,
ObjLongConsumer<R> longAccumulator,
BiConsumer<R,R> merger)
Returns a new
LongCollector described by the given
supplier, accumulator, and merger functions. |
static LongCollector<?,Map<Boolean,long[]>> |
LongCollector.partitioningBy(LongPredicate predicate)
Returns a
LongCollector which partitions the input elements
according to a LongPredicate, and organizes them into a
Map<Boolean, long[]>. |
static <A,D> LongCollector<?,Map<Boolean,D>> |
LongCollector.partitioningBy(LongPredicate predicate,
LongCollector<A,D> downstream)
Returns a
LongCollector which partitions the input numbers
according to a LongPredicate, 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 LongCollector<?,OptionalLong> |
LongCollector.reducing(LongBinaryOperator op)
Returns a
LongCollector which performs a reduction of its input
numbers under a specified LongBinaryOperator. |
static LongCollector<?,Long> |
LongCollector.reducing(long identity,
LongBinaryOperator op)
Returns a
LongCollector which performs a reduction of its input
numbers under a specified IntBinaryOperator using the provided
identity. |
static LongCollector<?,LongSummaryStatistics> |
LongCollector.summarizing()
Returns a
LongCollector which returns summary statistics for the
input elements. |
static LongCollector<?,Long> |
LongCollector.summing()
Returns a
LongCollector that produces the sum of the input
elements. |
static LongCollector<?,long[]> |
LongCollector.toArray()
Returns a
LongCollector that produces the array of the input
elements. |
static LongCollector<?,boolean[]> |
LongCollector.toBooleanArray(LongPredicate predicate)
Returns a
LongCollector which produces a boolean array containing
the results of applying the given predicate to the input elements, in
encounter order. |
| Modifier and Type | Method and Description |
|---|---|
<A,R> R |
LongStreamEx.collect(LongCollector<A,R> collector)
Performs a mutable reduction operation on the elements of this stream
using an
LongCollector which encapsulates the supplier,
accumulator and merger functions making easier to reuse collection
strategies. |
static <K,D,A> LongCollector<?,Map<K,D>> |
LongCollector.groupingBy(LongFunction<? extends K> classifier,
LongCollector<A,D> downstream)
Returns a
LongCollector 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>> |
LongCollector.groupingBy(LongFunction<? extends K> classifier,
Supplier<M> mapFactory,
LongCollector<A,D> downstream)
Returns a
LongCollector 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> LongCollector<?,R> |
LongCollector.mapping(LongUnaryOperator mapper,
LongCollector<A,R> downstream)
Adapts a
LongCollector to another one by applying a mapping
function to each input element before accumulation. |
static <A,D> LongCollector<?,Map<Boolean,D>> |
LongCollector.partitioningBy(LongPredicate predicate,
LongCollector<A,D> downstream)
Returns a
LongCollector which partitions the input numbers
according to a LongPredicate, 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.