aggregate To
abstract fun <R, M : MutableMapWrapper<in K, R>> aggregateTo(destination: M, operation: (key: K, accumulator: R?, element: T, first: Boolean) -> R): M
对每个组应用给定的聚合操作,并将结果存储在提供的 MutableMapWrapper 中。
Return
包含聚合结果的 MutableMapWrapper
Parameters
destination
用于存储聚合结果的 MutableMapWrapper
operation
聚合操作函数,接收 key、accumulator、element 和 first 作为参数