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

associateBy

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

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

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> Field<Sequence<T>>.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Field<Map<K, V>>
fun <T, K> Field<Sequence<T>>.associateBy(keySelector: (T) -> K): Field<Map<K, T>>

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

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> Field<String>.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Field<Map<K, V>>
fun <K> Field<String>.associateBy(keySelector: (Char) -> K): Field<Map<K, Char>>

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

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