java.lang.Object
is.codion.common.model.UserPreferences
A utility class for working with user preferences
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidFlushes the preferences to diskstatic StringgetUserPreference(String key, String defaultValue) static voidRemoves the preference associated with the given keystatic voidsetUserPreference(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
-