Key for values stored in Preferences. Type T is the type of the value associated with the Key.

T must be one of the following: Boolean, Int, Long, Float, String, Set.

Construct Keys for your data type using: booleanPreferencesKey, intPreferencesKey, longPreferencesKey, floatPreferencesKey, stringPreferencesKey, stringSetPreferencesKey

Summary

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
infix Preferences.Pair<T>
to(value: T)

Infix function to create a Preferences.Pair.

Cmn
open String
Cmn

Public properties

String
Cmn

Extension functions

ActionParameters.Key<T>

Creates an action key from a preferences key.

android

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

to

infix fun to(value: T): Preferences.Pair<T>

Infix function to create a Preferences.Pair. This is used to support preferencesOf and MutablePreferences.putAll

Parameters
value: T

is the value this preferences key should point to.

toString

open fun toString(): String

Public properties

name

val nameString

Extension functions

toParametersKey

fun <T : Any> Preferences.Key<T>.toParametersKey(): ActionParameters.Key<T>

Creates an action key from a preferences key.