DkIterableAssociateExt<E> extension

on

Methods

associate<K, V>(MapEntry<K, V> transform(E element)) Map<K, V>

Available on Iterable<E>, provided by the DkIterableAssociateExt extension

返回一个包含由 transform 函数提供的 MapEntry 的Map映射。
associateBy<K>(K keySelector(E element)) Map<K, E>

Available on Iterable<E>, provided by the DkIterableAssociateExt extension

返回一个Map映射,其中每个 element 都与 keySelector 函数生成键相关联。
associateByTo<K>(Map<K, E> destination, K keySelector(E element)) Map<K, E>

Available on Iterable<E>, provided by the DkIterableAssociateExt extension

生成一个Map映射,其中每个 element 都与 keySelector 函数生成键相关联,然后追加到 destination中并返回。
associateTo<K, V>(Map<K, V> destination, MapEntry<K, V> transform(E element)) Map<K, V>

Available on Iterable<E>, provided by the DkIterableAssociateExt extension

生成一个包含由 transform 函数提供的 MapEntry 的Map映射,然后追加到 destination中并返回。
associateWith<V>(V valueSelector(E element)) Map<E, V>

Available on Iterable<E>, provided by the DkIterableAssociateExt extension

返回一个Map映射,其中每个 element 都与 valueSelector 函数生成值相关联。
associateWithTo<V>(Map<E, V> destination, V valueSelector(E element)) Map<E, V>

Available on Iterable<E>, provided by the DkIterableAssociateExt extension

生成一个Map映射,其中每个 element 都与 valueSelector 函数生成值相关联,然后追加到 destination中并返回。