Collector (Java SE 26 & JDK 26)
- Type Parameters:
T- the type of input elements to the reduction operationA- the mutable accumulation type of the reduction operation (often hidden as an implementation detail)R- the result type of the reduction operation
-
Nested Class Summary
Nested Classes
static enumCharacteristics indicating properties of a
Collector, which can be used to optimize reduction implementations. -
Method Summary
A function that folds a value into a mutable result container.
Returns a
SetofCollector.Characteristicsindicating the characteristics of this Collector.combiner()A function that accepts two partial results and merges them.
finisher()Perform the final transformation from the intermediate accumulation type
Ato the final result typeR.Returns a new
Collectordescribed by the givensupplier,accumulator,combiner, andfinisherfunctions.Returns a new
Collectordescribed by the givensupplier,accumulator, andcombinerfunctions.supplier()A function that creates and returns a new mutable result container.
-
Method Details
-
supplier
-
accumulator
-
combiner
-
finisher
-
characteristics
-
of
-
of
-