vault backup: 2023-03-18 12:50:25

This commit is contained in:
2023-03-18 12:50:25 +08:00
parent 9531508b6f
commit cfa792ba67
2 changed files with 23 additions and 5 deletions

View File

@@ -1 +1,19 @@
[AtomicBoolean  |  Android Developers](https://developer.android.com/reference/java/util/concurrent/atomic/AtomicBoolean)
## 初始化
```kotlin
val init = AtomicBoolean(false)
or
val inti = AtomicBoolean() // Default false
```
## read/write
`get()`取值,用`set()`設值
例:
```kotlin
if (init.get()) { ... } // 如果 init 是 true 的話
init.set(true) // 將 init 設為 true
```
## 其他function