public class Config
extends java.lang.Object
Constructor and Description |
---|
Config()
Hidden default constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
get(Key key) |
static boolean |
getBoolean(Key key) |
static float |
getFloat(Key key) |
static Config |
getInstance() |
static int |
getInt(Key key) |
static java.lang.String |
getPreference(java.lang.String key)
Use preferences to store configuration that changes during runtime
and need to be persisted.
|
java.lang.String |
readPreference(java.lang.String preferenceKey) |
static void |
set(Key key,
java.lang.String value)
Sets a configuration value to use during the runtime of the application.
|
static void |
setPreference(java.lang.String key,
java.lang.String value)
Use preferences to store configuration that changes during runtime
and need to be persisted.
|
void |
writePreference(java.lang.String preferenceKey,
java.lang.String value) |
public Config()
public void writePreference(java.lang.String preferenceKey, java.lang.String value)
public java.lang.String readPreference(java.lang.String preferenceKey)
public static Config getInstance()
public static java.lang.String get(Key key)
public static int getInt(Key key)
public static float getFloat(Key key)
public static boolean getBoolean(Key key)
public static void set(Key key, java.lang.String value)
key
- The key to set.value
- The value to use.public static void setPreference(java.lang.String key, java.lang.String value)
key
- The key to store.value
- The value to storepublic static java.lang.String getPreference(java.lang.String key)
key
- The key to store.