IntLongMapField

class IntLongMapField<T>(name: String, keyName: String, meta: SettingMeta?, getter: (T) -> Map<Int, Long>, setter: (T, Map<Int, Long>) -> T, json: Json = SerializedField.DefaultJson) : BaseMapField<T, Int, Long>

Constructors

Link copied to clipboard
constructor(name: String, keyName: String, meta: SettingMeta?, getter: (T) -> Map<Int, Long>, setter: (T, Map<Int, Long>) -> T, json: Json = SerializedField.DefaultJson)

Properties

Link copied to clipboard
open override val keyName: String

DataStore key name

Link copied to clipboard
open override val meta: SettingMeta?

UI metadata (null for @Persisted-only fields)

Link copied to clipboard
open override val name: String

Property name in the data class

Functions

Link copied to clipboard
open override fun get(model: T): Map<Int, Long>

Get value from model

Link copied to clipboard
open override fun read(prefs: Preferences): Map<Int, Long>?

Read from preferences

Link copied to clipboard
open override fun set(model: T, value: Map<Int, Long>): T

Set value in model (returns new model)

Link copied to clipboard
open override fun write(prefs: MutablePreferences, value: Map<Int, Long>)

Write to preferences