toList() |
Collects elements into one List . |
toSet() |
Collects elements into one Set . |
toCollection(Supplier<Collection>) |
Collects elements into a specific type Collection . |
toMap(Function<T, K>, Function<T, V>) |
The elements are collected into one Map , and the elements are converted to key values according to the mapping function provided. |
summingInt(ToIntFunction<T>) |
Calculates the sum of the int results that are applied to each element (and to the version) of the provided value mapping function long double . |
summarizingInt(ToIntFunction<T>) |
Calculates the,,,,,,,, int long double sum min max ,, count and average . |
reducing() |
Apply a reduction to an element (typically used as a downstream collector, for example groupingBy ) (various versions). |
partitioningBy(Predicate<T>) |
The elements are divided into two groups: the expected groups that are provided for them are retained and the expected groups are not retained. |
partitioningBy(Predicate<T>, Collector) |
Partitions an element, using the specified downstream collector to process each partition. |
groupingBy(Function<T,U>) |
Groups elements into one Map , where the key is the provided function applied to the flow element, and the value is the list of elements that share the key. |
groupingBy(Function<T,U>, Collector) |
Groups the elements, using the specified downstream collector to handle the values associated with each group. |
minBy(BinaryOperator<T>) |
Calculates the minimum value of the element (same as the maxBy() same). |
mapping(Function<T,U>, Collector) |
Applies the provided mapping function to each element and processes it using the specified downstream collector (typically used as the downstream collector itself, for example groupingBy ). |
joining() |
Assuming that the elements are String types, the elements are joined to a string (perhaps using separators, prefixes, and suffixes). |
counting() |
Calculates the number of elements. (typically used as a downstream collector.) ) |