Package org.omegat.util
Class PreferencesImpl
- java.lang.Object
-
- org.omegat.util.PreferencesImpl
-
- All Implemented Interfaces:
Preferences.IPreferences
public class PreferencesImpl extends java.lang.Object implements Preferences.IPreferences
-
-
Constructor Summary
Constructors Constructor Description PreferencesImpl(org.omegat.util.PreferencesImpl.IPrefsPersistence backing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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>>
TgetPreferenceEnumDefault(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
-
-
-
Method Detail
-
getPreference
public java.lang.String getPreference(java.lang.String key)
- Specified by:
getPreference
in interfacePreferences.IPreferences
-
existsPreference
public boolean existsPreference(java.lang.String key)
- Specified by:
existsPreference
in interfacePreferences.IPreferences
-
isPreference
public boolean isPreference(java.lang.String key)
- Specified by:
isPreference
in interfacePreferences.IPreferences
-
isPreferenceDefault
public boolean isPreferenceDefault(java.lang.String key, boolean defaultValue)
- Specified by:
isPreferenceDefault
in interfacePreferences.IPreferences
-
getPreferenceDefault
public java.lang.String getPreferenceDefault(java.lang.String key, java.lang.String defaultValue)
- Specified by:
getPreferenceDefault
in interfacePreferences.IPreferences
-
getPreferenceEnumDefault
public <T extends java.lang.Enum<T>> T getPreferenceEnumDefault(java.lang.String key, T defaultValue)
- Specified by:
getPreferenceEnumDefault
in interfacePreferences.IPreferences
-
getPreferenceDefault
public int getPreferenceDefault(java.lang.String key, int defaultValue)
- Specified by:
getPreferenceDefault
in interfacePreferences.IPreferences
-
setPreference
public java.lang.Object setPreference(java.lang.String name, java.lang.Object value)
Description copied from interface:Preferences.IPreferences
Return the old value, or null if not set- Specified by:
setPreference
in interfacePreferences.IPreferences
-
save
public void save()
- Specified by:
save
in interfacePreferences.IPreferences
-
-