Collector
Interface Collector<T,A,R>
- Type Parameters:
-
T
- the type of input elements to the reduction operation -
A
- the mutable accumulation type of the reduction operation (often hidden as an implementation detail) -
R
- the result type of the reduction operation
public interface Collector<T,A,R>
A mutable reduction operation that accumulates input elements into a mutable result container, optionally transforming the accumulated result into a final representation after all input elements have been processed. Reduction operations can be performed either sequentially or in parallel.
Examples of mutable reduction operations include: accumulating elements into a Collection
; concatenating strings using a StringBuilder
; computing summary information about eleme