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