All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.squareup.sqldelight.internal.Atomics.kt Maven / Gradle / Ivy

There is a newer version: 1.5.5
Show newest version
package com.squareup.sqldelight.internal

import kotlin.reflect.KProperty

expect class AtomicBoolean(value: Boolean) {
  fun get(): Boolean
  fun set(value: Boolean)
}

internal operator fun AtomicBoolean.getValue(thisRef: Any?, prop: KProperty<*>): Boolean {
  return get()
}

internal operator fun AtomicBoolean.setValue(thisRef: Any?, prop: KProperty<*>, value: Boolean) {
  set(value)
}

expect class Atomic(value: V) {
  fun get(): V
  fun set(value: V)
}

operator fun  Atomic.getValue(thisRef: Any?, prop: KProperty<*>): T {
  return get()
}

operator fun  Atomic.setValue(thisRef: Any?, prop: KProperty<*>, value: T) {
  set(value)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy