Preferences.Key
public final class Preferences.Key<T extends Object>
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, doublePreferencesKey, byteArrayPreferencesKey.
Summary
Public methods |
|
|---|---|
boolean |
|
final @NonNull String |
getName() |
int |
hashCode() |
final @NonNull Preferences.Pair<@NonNull T> |
Infix function to create a Preferences.Pair. |
@NonNull String |
toString() |
Public methods
to
public final @NonNull Preferences.Pair<@NonNull T> to(@NonNull T value)
Infix function to create a Preferences.Pair. This is used to support preferencesOf and MutablePreferences.putAll
| Parameters | |
|---|---|
@NonNull T value |
is the value this preferences key should point to. |