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

getOrDefault

fun <K, V> Attribute<Map<in K, V>>.getOrDefault(key: K, defaultValue: V): Attribute<V>
fun <K, V> Attribute<Map<in K, V>>.getOrDefault(key: K, defaultValue: Attribute<V>): Attribute<V>
fun <K, V> Attribute<Map<in K, V>>.getOrDefault(key: Attribute<K>, defaultValue: V): Attribute<V>
fun <K, V> Attribute<Map<in K, V>>.getOrDefault(key: Attribute<K>, defaultValue: Attribute<V>): Attribute<V>

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

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

This is simply a convenience function.

See Also

kotlin.collections.Map.getOrDefault