put

suspend fun put(descriptor: K, loader: suspend () -> V, unload: suspend V.() -> Unit = {}): Boolean

Puts a new entry to this map.

Return

True if the entry was added, false if the entry already exists.

Parameters

descriptor

The descriptor of the entry.

loader

The loader of the entry.

unload

The optional function to unload the entry.


fun put(descriptor: K, loadable: Loadable<V>): Boolean

Puts a loadable entry to this map.

See also