associateByTo
Populates the destination map with key-value pairs, where key is provided by keySelector function and value is provided by valueTransform applied to each element of the given collection, resolving conflicts with resolve function and returns the destination.
All pairs are added and resolved in order of iteration.
Return
the destination.
Parameters
the destination of the generated key-value pairs.
lambda functions that generates keys for the key-value pairs.
lambda functions that generates value for the key-value pairs.
lambda function that resolves merge conflicts which receives some key, its current, and new corresponding values.
Populates the destination map with key-value pairs, where key is provided by keySelector function applied to each element of the given collection and value is the element itself, resolving conflicts with resolve function and returns the destination.
All pairs are added and resolved in order of iteration.
Return
the destination.
Parameters
the destination of the generated key-value pairs.
lambda functions that generates keys for the key-value pairs.
lambda function that resolves merge conflicts which receives some key, its current, and new corresponding values.