|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the preference value typepublic interface SinglePreference<T>
Generic interface for a single preference with a default value.
A single preference has a value type, a preference key, a default value and
can extract it's configuration value from the shared preferences.
Method Summary | |
---|---|
T |
getConfiguration(SharedPreferences sharedPreferences)
Getter for the current value in the shared preferences |
T |
getDefault()
Getter for the default value |
String |
getKey()
Getter for the preference key |
void |
setDefault(T defaultValue)
Setter for the default value |
boolean |
testForKey(String key)
Method to test for a preferences key support |
Method Detail |
---|
String getKey()
T getConfiguration(SharedPreferences sharedPreferences)
sharedPreferences
- the shared application preferences
T getDefault()
void setDefault(T defaultValue)
defaultValue
- the default value to setboolean testForKey(String key)
key
- the key to test for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |