public class Settings extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearPreference()
Restore saved preference to original setting
|
Boolean |
getBoolean(String key)
Get the value of a boolean property
|
Set<String> |
getBooleanKeySet()
Get the keys of the boolean properties
|
Double |
getDouble(String key)
Get the value of a doubleing point property
|
Set<String> |
getDoubleKeySet()
Get the keys of the doubleing point properties
|
Integer |
getInteger(String key)
Get the value of a integer property
|
Set<String> |
getIntegerKeySet()
Get the keys of the integer properties
|
String |
getString(String key)
Get the value of a string property
|
Set<String> |
getStringKeySet()
Get the keys of the string properties
|
String |
getTranslation(String code)
Get the local name corresponding to a code
|
void |
saveAsPreference()
Save settings as preference
|
void |
setBoolean(String key,
Boolean val)
Set the value of a boolean property
|
void |
setDouble(String key,
Double val)
Set the value of a doubleing point property
|
void |
setInteger(String key,
Integer val)
Set the value of a integer property
|
void |
setString(String key,
String val)
Set the value of a string property
|
public static final Settings DEFAULT
public String getTranslation(String code)
code - the codepublic Set<String> getBooleanKeySet()
public Boolean getBoolean(String key)
key - the keypublic void setBoolean(String key, Boolean val)
key - the keyval - the valuepublic Set<String> getIntegerKeySet()
public Integer getInteger(String key)
key - the keypublic void setInteger(String key, Integer val)
key - the keyval - the valuepublic Set<String> getDoubleKeySet()
public Double getDouble(String key)
key - the keypublic void setDouble(String key, Double val)
key - the keyval - the valuepublic Set<String> getStringKeySet()
public String getString(String key)
key - the keypublic void setString(String key, String val)
key - the keyval - the valuepublic void clearPreference()
throws BackingStoreException
public void saveAsPreference()
Copyright © 2019. All rights reserved.