vault backup: 2023-03-18 12:50:25
This commit is contained in:
10
.obsidian/workspace.json
vendored
10
.obsidian/workspace.json
vendored
@@ -60,7 +60,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 1
|
||||
"currentTab": 3
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
@@ -118,7 +118,7 @@
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "00. Inbox/01. TODO.md",
|
||||
"file": "04. Programming/Kotlin/AtomicBoolean.md",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
@@ -154,7 +154,7 @@
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "00. Inbox/01. TODO.md"
|
||||
"file": "04. Programming/Kotlin/AtomicBoolean.md"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,11 +180,11 @@
|
||||
"periodic-notes:Open today": false
|
||||
}
|
||||
},
|
||||
"active": "3b4577823cedf427",
|
||||
"active": "0c4cc0216ea83049",
|
||||
"lastOpenFiles": [
|
||||
"00. Inbox/01. TODO.md",
|
||||
"04. Programming/Kotlin/AtomicBoolean.md",
|
||||
"04. Programming/Kotlin/run, let, with, also 和 apply.md",
|
||||
"00. Inbox/01. TODO.md",
|
||||
"05. 資料收集/軟體工具/git/tag.md",
|
||||
"05. 資料收集/讀書筆記/20230206 - 卡片盒筆記.md",
|
||||
"01. 個人/00. Informations/Datas.md",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user