public interface LpConfig
The format of the configuration file is a .ini like format: - sections are defined in [] - each section contains a sequence of key=value pairs. Example: [sound] echocanceler=1 playback_dev=ALSA: Default device [video] enabled=1}
Modifier and Type | Method and Description |
---|---|
boolean |
getBool(String section,
String key,
boolean defaultValue)
Gets a boolean from the config
|
float |
getFloat(String section,
String key,
float defaultValue)
Gets a float from the config
|
int |
getInt(String section,
String key,
int defaultValue)
Gets a int from the config
|
int[] |
getIntRange(String section,
String key,
int defaultMin,
int defaultMax)
Gets a int range from the config
|
String |
getString(String section,
String key,
String defaultValue)
Gets a string from the config
|
void |
setBool(String section,
String key,
boolean value)
Sets an boolean config item
|
void |
setFloat(String section,
String key,
float value)
Sets an float config item
|
void |
setInt(String section,
String key,
int value)
Sets an integer config item
|
void |
setIntRange(String section,
String key,
int min,
int max)
Sets an integer range config item
|
void |
setString(String section,
String key,
String value)
Sets an string config item
|
void |
sync()
Synchronize LpConfig with file
|
void setInt(String section, String key, int value)
section
- the section in the lpconfigkey
- the name of the settingvalue
- the value of the settingvoid setFloat(String section, String key, float value)
section
- the section in the lpconfigkey
- the name of the settingvalue
- the value of the settingvoid setBool(String section, String key, boolean value)
section
- the section in the lpconfigkey
- the name of the settingvalue
- the value of the settingvoid setString(String section, String key, String value)
section
- the section in the lpconfigkey
- the name of the settingvalue
- the value of the settingvoid setIntRange(String section, String key, int min, int max)
section
- the section in the lpconfigkey
- the name of the settingmin
- the min of the rangemax
- the max of the rangeint getInt(String section, String key, int defaultValue)
section
- the section in the lpconfigkey
- the name of the settingdefaultValue
- the default value if not setfloat getFloat(String section, String key, float defaultValue)
section
- the section in the lpconfigkey
- the name of the settingdefaultValue
- the default value if not setboolean getBool(String section, String key, boolean defaultValue)
section
- the section in the lpconfigkey
- the name of the settingdefaultValue
- the default value if not setString getString(String section, String key, String defaultValue)
section
- the section in the lpconfigkey
- the name of the settingdefaultValue
- the default value if not setint[] getIntRange(String section, String key, int defaultMin, int defaultMax)
section
- the section in the lpconfigkey
- the name of the settingvoid sync()