get Or Put
inline fun <V> PrefixTree<Int, V>.getOrPut(key: String, noinline producer: () -> V): V
Content copied to clipboard
Convenience getter/setter for using string-keyed prefix trees.
Return
The value associated with key, which may have been obtained from producer.
Parameters
key
The search key.
producer
How to produce a value if none was available.