public class

StaticSharedSettings

extends Object
java.lang.Object
   ↳ com.davidluoye.support.util.StaticSharedSettings

Summary

Public Methods
static boolean getBoolean(String key, boolean defValue)
Retrieve a boolean value from the preferences.
static float getFloat(String key, float defValue)
Retrieve a float value from the preferences.
static int getInt(String key, int defValue)
Retrieve a integer value from the preferences.
static long getLong(String key, long defValue)
Retrieve a long value from the preferences.
static String getString(String key, String defValue)
Retrieve a string value from the preferences.
static Set<String> getStringSet(String key)
Retrieve a string list value from the preferences.
synchronized static StaticSharedSettings init(Context context, String name)
synchronized static StaticSharedSettings init(SharedPreferences sp)
synchronized static StaticSharedSettings init(Context context)
static boolean setBoolean(String key, boolean value)
Set a boolean value in the setting preferences
static boolean setFloat(String key, float value)
Set a float value in the setting preferences
static boolean setInt(String key, int value)
Set a integer value in the setting preferences
static boolean setLong(String key, long value)
Set a long value in the setting preferences
static boolean setString(String key, String value)
Set a string value in the setting preferences
static boolean setStringSet(String key, Set<String> value)
Set a string list value in the setting preferences
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static boolean getBoolean (String key, boolean defValue)

Retrieve a boolean value from the preferences.

public static float getFloat (String key, float defValue)

Retrieve a float value from the preferences.

public static int getInt (String key, int defValue)

Retrieve a integer value from the preferences.

public static long getLong (String key, long defValue)

Retrieve a long value from the preferences.

public static String getString (String key, String defValue)

Retrieve a string value from the preferences.

public static Set<String> getStringSet (String key)

Retrieve a string list value from the preferences.

public static synchronized StaticSharedSettings init (Context context, String name)

public static synchronized StaticSharedSettings init (SharedPreferences sp)

public static synchronized StaticSharedSettings init (Context context)

public static boolean setBoolean (String key, boolean value)

Set a boolean value in the setting preferences

public static boolean setFloat (String key, float value)

Set a float value in the setting preferences

public static boolean setInt (String key, int value)

Set a integer value in the setting preferences

public static boolean setLong (String key, long value)

Set a long value in the setting preferences

public static boolean setString (String key, String value)

Set a string value in the setting preferences

public static boolean setStringSet (String key, Set<String> value)

Set a string list value in the setting preferences