类 Settings
- java.lang.Object
-
- cc.chungkwong.mathocr.Settings
-
public class Settings extends Object
Global settings
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclearPreference()Restore saved preference to original settingBooleangetBoolean(String key)Get the value of a boolean propertySet<String>getBooleanKeySet()Get the keys of the boolean propertiesDoublegetDouble(String key)Get the value of a doubleing point propertySet<String>getDoubleKeySet()Get the keys of the doubleing point propertiesIntegergetInteger(String key)Get the value of a integer propertySet<String>getIntegerKeySet()Get the keys of the integer propertiesStringgetString(String key)Get the value of a string propertySet<String>getStringKeySet()Get the keys of the string propertiesStringgetTranslation(String code)Get the local name corresponding to a codevoidsaveAsPreference()Save settings as preferencevoidsetBoolean(String key, Boolean val)Set the value of a boolean propertyvoidsetDouble(String key, Double val)Set the value of a doubleing point propertyvoidsetInteger(String key, Integer val)Set the value of a integer propertyvoidsetString(String key, String val)Set the value of a string property
-
-
-
字段详细资料
-
DEFAULT
public static final Settings DEFAULT
Environment that contains currrent global settings
-
-
方法详细资料
-
getTranslation
public String getTranslation(String code)
Get the local name corresponding to a code- 参数:
code- the code- 返回:
- the local name
-
getBooleanKeySet
public Set<String> getBooleanKeySet()
Get the keys of the boolean properties- 返回:
- the keys
-
getBoolean
public Boolean getBoolean(String key)
Get the value of a boolean property- 参数:
key- the key- 返回:
- the value
-
setBoolean
public void setBoolean(String key, Boolean val)
Set the value of a boolean property- 参数:
key- the keyval- the value
-
getIntegerKeySet
public Set<String> getIntegerKeySet()
Get the keys of the integer properties- 返回:
- the keys
-
getInteger
public Integer getInteger(String key)
Get the value of a integer property- 参数:
key- the key- 返回:
- the value
-
setInteger
public void setInteger(String key, Integer val)
Set the value of a integer property- 参数:
key- the keyval- the value
-
getDoubleKeySet
public Set<String> getDoubleKeySet()
Get the keys of the doubleing point properties- 返回:
- the keys
-
getDouble
public Double getDouble(String key)
Get the value of a doubleing point property- 参数:
key- the key- 返回:
- the value
-
setDouble
public void setDouble(String key, Double val)
Set the value of a doubleing point property- 参数:
key- the keyval- the value
-
getStringKeySet
public Set<String> getStringKeySet()
Get the keys of the string properties- 返回:
- the keys
-
getString
public String getString(String key)
Get the value of a string property- 参数:
key- the key- 返回:
- the value
-
setString
public void setString(String key, String val)
Set the value of a string property- 参数:
key- the keyval- the value
-
clearPreference
public void clearPreference() throws BackingStoreExceptionRestore saved preference to original setting
-
saveAsPreference
public void saveAsPreference()
Save settings as preference
-
-