Java java.util.stream Collectors fields, constructors, methods, implement or subclass

Example usage for Java java.util.stream Collectors fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.stream Collectors.

The text is from its open source code.

Method

CollectoraveragingDouble(ToDoubleFunction mapper)
Returns a Collector that produces the arithmetic mean of a double-valued function applied to the input elements.
CollectoraveragingInt(ToIntFunction mapper)
Returns a Collector that produces the arithmetic mean of an integer-valued function applied to the input elements.
CollectoraveragingLong(ToLongFunction mapper)
Returns a Collector that produces the arithmetic mean of a long-valued function applied to the input elements.
CollectorcollectingAndThen(Collector downstream, Function finisher)
Adapts a Collector to perform an additional finishing transformation.
Collectorcounting()
Returns a Collector accepting elements of type T that counts the number of input elements.
Collector>groupingBy(Function classifier, Collector downstream)
Returns a Collector implementing a cascaded "group by" operation on input elements of type T , grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstream Collector .
Collector>>groupingBy(Function classifier)
Returns a Collector implementing a "group by" operation on input elements of type T , grouping elements according to a classification function, and returning the results in a Map .
CollectorgroupingBy( Function classifier, Supplier mapFactory, Collector downstream)
Returns a Collector implementing a cascaded "group by" operation on input elements of type T , grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstream Collector .
Collector>groupingByConcurrent( Function classifier, Collector downstream)
Returns a concurrent Collector implementing a cascaded "group by" operation on input elements of type T , grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstream Collector .
Collector>>groupingByConcurrent( Function classifier)
Returns a concurrent Collector implementing a "group by" operation on input elements of type T , grouping elements according to a classification function.
Collectorjoining(CharSequence delimiter)
Returns a Collector that concatenates the input elements, separated by the specified delimiter, in encounter order.
Collectorjoining()
Returns a Collector that concatenates the input elements into a String , in encounter order.
Collectorjoining(CharSequence delimiter, CharSequence prefix, CharSequence suffix)
Returns a Collector that concatenates the input elements, separated by the specified delimiter, with the specified prefix and suffix, in encounter order.
Collectormapping(Function mapper, Collector downstream)
Adapts a Collector accepting elements of type U to one accepting elements of type T by applying a mapping function to each input element before accumulation.
Collector>maxBy(Comparator comparator)
Returns a Collector that produces the maximal element according to a given Comparator , described as an Optional .
Collector>minBy(Comparator comparator)
Returns a Collector that produces the minimal element according to a given Comparator , described as an Optional .
Collector>>partitioningBy(Predicate predicate)
Returns a Collector which partitions the input elements according to a Predicate , and organizes them into a Map> .
Collector>partitioningBy(Predicate predicate, Collector downstream)
Returns a Collector which partitions the input elements according to a Predicate , reduces the values in each partition according to another Collector , and organizes them into a Map whose values are the result of the downstream reduction.
Collectorreducing(U identity, Function mapper, BinaryOperator op)
Returns a Collector which performs a reduction of its input elements under a specified mapping function and BinaryOperator .
Collector>reducing(BinaryOperator op)
Returns a Collector which performs a reduction of its input elements under a specified BinaryOperator .
Collectorreducing(T identity, BinaryOperator op)
Returns a Collector which performs a reduction of its input elements under a specified BinaryOperator using the provided identity.
CollectorsummarizingDouble( ToDoubleFunction mapper)
Returns a Collector which applies an double -producing mapping function to each input element, and returns summary statistics for the resulting values.
CollectorsummarizingInt(ToIntFunction mapper)
Returns a Collector which applies an int -producing mapping function to each input element, and returns summary statistics for the resulting values.
CollectorsummarizingLong(ToLongFunction mapper)
Returns a Collector which applies an long -producing mapping function to each input element, and returns summary statistics for the resulting values.
CollectorsummingDouble(ToDoubleFunction mapper)
Returns a Collector that produces the sum of a double-valued function applied to the input elements.
CollectorsummingInt(ToIntFunction mapper)
Returns a Collector that produces the sum of a integer-valued function applied to the input elements.
CollectorsummingLong(ToLongFunction mapper)
Returns a Collector that produces the sum of a long-valued function applied to the input elements.
CollectortoCollection(Supplier collectionFactory)
Returns a Collector that accumulates the input elements into a new Collection , in encounter order.
Collector>toConcurrentMap( Function keyMapper, Function valueMapper, BinaryOperator mergeFunction)
Returns a concurrent Collector that accumulates elements into a ConcurrentMap whose keys and values are the result of applying the provided mapping functions to the input elements.
Collector>toConcurrentMap( Function keyMapper, Function valueMapper)
Returns a concurrent Collector that accumulates elements into a ConcurrentMap whose keys and values are the result of applying the provided mapping functions to the input elements.
Collector>toList()
Returns a Collector that accumulates the input elements into a new List .
Collector>toMap(Function keyMapper, Function valueMapper)
Returns a Collector that accumulates elements into a Map whose keys and values are the result of applying the provided mapping functions to the input elements.
Collector>toMap(Function keyMapper, Function valueMapper, BinaryOperator mergeFunction)
Returns a Collector that accumulates elements into a Map whose keys and values are the result of applying the provided mapping functions to the input elements.
CollectortoMap( Function keyMapper, Function valueMapper, BinaryOperator mergeFunction, Supplier mapFactory)
Returns a Collector that accumulates elements into a Map whose keys and values are the result of applying the provided mapping functions to the input elements.
Collector>toSet()
Returns a Collector that accumulates the input elements into a new Set .