public class PreferencesImpl extends java.lang.Object implements Preferences.IPreferences
Constructor and Description |
---|
PreferencesImpl(org.omegat.util.PreferencesImpl.IPrefsPersistence backing) |
Modifier and Type | Method and Description |
---|---|
boolean |
existsPreference(java.lang.String key) |
java.lang.String |
getPreference(java.lang.String key) |
int |
getPreferenceDefault(java.lang.String key,
int defaultValue) |
java.lang.String |
getPreferenceDefault(java.lang.String key,
java.lang.String defaultValue) |
<T extends java.lang.Enum<T>> |
getPreferenceEnumDefault(java.lang.String key,
T defaultValue) |
boolean |
isPreference(java.lang.String key) |
boolean |
isPreferenceDefault(java.lang.String key,
boolean defaultValue) |
void |
save() |
java.lang.Object |
setPreference(java.lang.String name,
java.lang.Object value)
Return the old value, or null if not set
|
public PreferencesImpl(org.omegat.util.PreferencesImpl.IPrefsPersistence backing)
public java.lang.String getPreference(java.lang.String key)
getPreference
in interface Preferences.IPreferences
public boolean existsPreference(java.lang.String key)
existsPreference
in interface Preferences.IPreferences
public boolean isPreference(java.lang.String key)
isPreference
in interface Preferences.IPreferences
public boolean isPreferenceDefault(java.lang.String key, boolean defaultValue)
isPreferenceDefault
in interface Preferences.IPreferences
public java.lang.String getPreferenceDefault(java.lang.String key, java.lang.String defaultValue)
getPreferenceDefault
in interface Preferences.IPreferences
public <T extends java.lang.Enum<T>> T getPreferenceEnumDefault(java.lang.String key, T defaultValue)
getPreferenceEnumDefault
in interface Preferences.IPreferences
public int getPreferenceDefault(java.lang.String key, int defaultValue)
getPreferenceDefault
in interface Preferences.IPreferences
public java.lang.Object setPreference(java.lang.String name, java.lang.Object value)
Preferences.IPreferences
setPreference
in interface Preferences.IPreferences
public void save()
save
in interface Preferences.IPreferences