de.unikassel.android.sdcframework.preferences
Class LogLevelPreferenceImpl

Package class diagram package LogLevelPreferenceImpl
java.lang.Object
  extended by de.unikassel.android.sdcframework.preferences.LogLevelPreferenceImpl
All Implemented Interfaces:
SinglePreference<LogLevelConfiguration>

public final class LogLevelPreferenceImpl
extends Object
implements SinglePreference<LogLevelConfiguration>

Implementation of the preference for the LogLevel type, which is a single preference bounded to the LogLevelConfiguration.


Field Summary
static LogLevel DEFAULT
          The log level default value
static String KEY
          Identifier log level key
private  StringPreference logLevelPreference
          The log level preference
 
Constructor Summary
LogLevelPreferenceImpl()
          Constructor
 
Method Summary
 LogLevelConfiguration getConfiguration(SharedPreferences sharedPreferences)
          Getter for the current value in the shared preferences
 LogLevelConfiguration getDefault()
          Getter for the default value
 String getKey()
          Getter for the preference key
 void setDefault(LogLevelConfiguration defaultValue)
          Setter for the default value
 boolean testForKey(String key)
          Method to test for a preferences key support
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logLevelPreference

private final StringPreference logLevelPreference
The log level preference


KEY

public static final String KEY
Identifier log level key

See Also:
Constant Field Values

DEFAULT

public static final LogLevel DEFAULT
The log level default value

Constructor Detail

LogLevelPreferenceImpl

public LogLevelPreferenceImpl()
Constructor

Method Detail

getConfiguration

public final LogLevelConfiguration getConfiguration(SharedPreferences sharedPreferences)
Description copied from interface: SinglePreference
Getter for the current value in the shared preferences

Specified by:
getConfiguration in interface SinglePreference<LogLevelConfiguration>
Parameters:
sharedPreferences - the shared application preferences
Returns:
the current value

getKey

public String getKey()
Description copied from interface: SinglePreference
Getter for the preference key

Specified by:
getKey in interface SinglePreference<LogLevelConfiguration>
Returns:
the preference key

getDefault

public LogLevelConfiguration getDefault()
Description copied from interface: SinglePreference
Getter for the default value

Specified by:
getDefault in interface SinglePreference<LogLevelConfiguration>
Returns:
the default value

setDefault

public void setDefault(LogLevelConfiguration defaultValue)
Description copied from interface: SinglePreference
Setter for the default value

Specified by:
setDefault in interface SinglePreference<LogLevelConfiguration>
Parameters:
defaultValue - the default value to set

testForKey

public boolean testForKey(String key)
Description copied from interface: SinglePreference
Method to test for a preferences key support

Specified by:
testForKey in interface SinglePreference<LogLevelConfiguration>
Parameters:
key - the key to test for
Returns:
true if this key is supported, false otherwise