insert

abstract fun insert(key: K, value: V)(source)

Adds a map entry to the property value.

When invoked on a property with no value, this method first sets the value of the property to its current convention value, if set, or an empty map.

Since

8.7

Parameters

key

the key

value

the value


abstract fun insert(key: K, providerOfValue: Provider<out V>)(source)

Adds a map entry to the property value.

The given provider will be queried when the value of this property is queried.

When invoked on a property with no value, this method first sets the value of the property to its current convention value, if set, or an empty map.

Even if the given provider has no value, after this method is invoked, the actual value of this property is guaranteed to be present.

Since

8.7

Parameters

key

the key

providerOfValue

the provider of the value