Package com.inmobi.commons.core.storage
Class KeyValueStore
-
- All Implemented Interfaces:
public final class KeyValueStore
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classKeyValueStore.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static KeyValueStore.CompanionCompanion
-
Method Summary
Modifier and Type Method Description final UnitputString(String key, String value, Boolean commit)final StringgetString(String key, String defaultValue)final UnitputStringSet(String key, Set<String> value)final Set<String>getStringSet(String key, Set<String> defaultValue)get Set from the preferences. final UnitputInt(String key, Integer value, Boolean commit)final IntegergetInt(String key, Integer defaultValue)final UnitputFloat(String key, Float value)final FloatgetFloat(String key, Float defaultValue)final UnitputLong(String key, Long value, Boolean commit)final LonggetLong(String key, Long defaultValue)final UnitputBoolean(String key, Boolean value, Boolean commit)final BooleangetBoolean(String key, Boolean defaultValue)final Booleancontains(String key)final Booleanremove(String key)final UnitclearAll()final static KeyValueStoregetInstance(Context context, String fileKey)-
-
Method Detail
-
putStringSet
final Unit putStringSet(String key, Set<String> value)
-
getStringSet
final Set<String> getStringSet(String key, Set<String> defaultValue)
get Set from the preferences. Note: You must not edit the set returned by this. Refer to android.content.SharedPreferences.getStringSet for more
-
putBoolean
final Unit putBoolean(String key, Boolean value, Boolean commit)
-
getBoolean
final Boolean getBoolean(String key, Boolean defaultValue)
-
getInstance
final static KeyValueStore getInstance(Context context, String fileKey)
-
-
-
-