Documentation / dataflow-async / com.femastudios.dataflow.async.extensions / associateBy
Go to reference

associateBy

fun <T, K, V> Attribute<Iterable<T>>.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Attribute<Map<K, V>>
fun <T, K> Attribute<Iterable<T>>.associateBy(keySelector: (T) -> K): Attribute<Map<K, T>>

Same as associateBy, but accepts Attribute and returns a new Attribute.

Calling this function is equivalent to use transform and calling associateBy in the transformation function.

This is simply a convenience function.

See Also

kotlin.collections.associateBy


fun <T, K, V> Attribute<Sequence<T>>.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Attribute<Map<K, V>>
fun <T, K> Attribute<Sequence<T>>.associateBy(keySelector: (T) -> K): Attribute<Map<K, T>>

Same as associateBy, but accepts Attribute and returns a new Attribute.

Calling this function is equivalent to use transform and calling associateBy in the transformation function.

This is simply a convenience function.

See Also

kotlin.sequences.associateBy


fun <K, V> Attribute<String>.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Attribute<Map<K, V>>
fun <K> Attribute<String>.associateBy(keySelector: (Char) -> K): Attribute<Map<K, Char>>

Same as associateBy, but accepts Attribute and returns a new Attribute.

Calling this function is equivalent to use transform and calling associateBy in the transformation function.

This is simply a convenience function.

See Also

kotlin.text.associateBy