-
- All Implemented Interfaces:
-
ai.kubesense.android.internal.data.PreferencesStorage
public final class SharedPreferencesStorage implements PreferencesStorage
An implementation of PreferencesStorage that uses Android's SharedPreferences as storage backend.
-
-
Constructor Summary
Constructors Constructor Description SharedPreferencesStorage(Context appContext)
-
Method Summary
Modifier and Type Method Description UnitputFloat(String key, Float value)Put a float value in the storage. FloatgetFloat(String key, Float defaultValue)Get a float value from the storage. UnitputInt(String key, Integer value)Put an integer value in the storage. IntegergetInt(String key, Integer defaultValue)Get an integer value from the storage. StringgetString(String key, String defaultValue)Put a string value in the storage. UnitputString(String key, String value)Put a string value in the storage. Set<String>getStringSet(String key, Set<String> defaultValue)Get a string set value from the storage. UnitputStringSet(String key, Set<String> value)Put a string set value in the storage. UnitputBoolean(String key, Boolean value)Put a boolean value in the storage. BooleangetBoolean(String key, Boolean defaultValue)Get a boolean value from the storage. Unitremove(String key)Remove a value from the storage. Unitclear()Clear all values from the storage. -
-
Constructor Detail
-
SharedPreferencesStorage
SharedPreferencesStorage(Context appContext)
-
-
Method Detail
-
getStringSet
Set<String> getStringSet(String key, Set<String> defaultValue)
Get a string set value from the storage.
-
putStringSet
Unit putStringSet(String key, Set<String> value)
Put a string set value in the storage.
-
putBoolean
Unit putBoolean(String key, Boolean value)
Put a boolean value in the storage.
-
getBoolean
Boolean getBoolean(String key, Boolean defaultValue)
Get a boolean value from the storage.
-
-
-
-