Provide Lazy<T> in kotlin package — an interface that represents lazily computed value. Read-only properties can be delegated to lazy with the extension getter. Delegates.lazy and blockingLazy are deprecated.
This commit is contained in:
@@ -49,4 +49,8 @@ public fun setOf<T>(value: T): Set<T> = hashSetOf(value)
|
||||
* Returns an immutable map, mapping only the specified key to the
|
||||
* specified value.
|
||||
*/
|
||||
public fun mapOf<K, V>(keyValuePair: Pair<K, V>): Map<K, V> = hashMapOf(keyValuePair)
|
||||
public fun mapOf<K, V>(keyValuePair: Pair<K, V>): Map<K, V> = hashMapOf(keyValuePair)
|
||||
|
||||
|
||||
public fun lazy<T>(initializer: () -> T): Lazy<T> = UnsafeLazyImpl(initializer)
|
||||
public fun lazy<T>(mode: LazyThreadSafetyMode, initializer: () -> T): Lazy<T> = UnsafeLazyImpl(initializer)
|
||||
|
||||
Reference in New Issue
Block a user