java.lang.Object
is.codion.common.model.UserPreferences
A utility class for working with user preferences
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Flushes the preferences to diskstatic String
getUserPreference
(String key, String defaultValue) static void
Removes the preference associated with the given keystatic void
setUserPreference
(String key, String value)
-
Method Details
-
getUserPreference
- Parameters:
key
- the key identifying the preferencedefaultValue
- the default value if no preference is available- Returns:
- the user preference associated with the given key
-
setUserPreference
- Parameters:
key
- the key to use to identify the preferencevalue
- the preference value to associate with the given key
-
removeUserPreference
Removes the preference associated with the given key- Parameters:
key
- the key to use to identify the preference to remove
-
flushUserPreferences
Flushes the preferences to disk- Throws:
BackingStoreException
- in case of a backing store failure
-