Title: Theory / Unimportant / CS / Programming / Java / Android / Lib / DataStore

Typ: DataStore<T>
Meaning: a safe and durable way to store small amounts of data, such as preferences and application state.
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/core/DataStore

Instruction: dataStore.updateData(transform)
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/core/DataStore
Effect: Read, apply transform and write its output in the store
Language: Kotlin
Variables: dataStore: DataStore<T>

Instruction: dataStore.data
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/core/DataStore
Language: Kotlin
Returns: Efficient access to the latest durabliy persisted state
Variables: dataStore: DataStore<T>

Typ: Preferences
Meaning: generic Map and MutableMap keyed by the Preferences.Key class. These are intended for use with DataStore
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/preferences/core/Preferences
Variables: dataStore: DataStore<T>
Language: Kotlin

Instruction: preferences.asMap()
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/preferences/core/Preferences
Returns: A map of all key preferences pairs
Variables: preferences: Preferences

Instruction: preferences.contains(key)
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/preferences/core/Preferences
Returns: Whether this preferences contains key
Variables: preferences: Preferences

Instruction: preferences.get(key)
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/preferences/core/Preferences
Returns: Preference associated to key
Variables: preferences: Preferences

Instruction: preferences.toMutablePreferences(key)
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/preferences/core/Preferences
Returns: a mutable copy of Preferences which contains all the preferences in this Preferences.
Variables: preferences: Preferences

Instruction: preferences.toPreferences(key)
Page: https://developer.android.com/topic/libraries/architecture/datastore
https://developer.android.com/reference/kotlin/androidx/datastore/preferences/core/Preferences
Returns: a read-only copy of Preferences which contains all the preferences in this Preferences.
Variables: preferences: Preferences