RetroArch
|
Public Member Functions | |
ConfigFile () | |
ConfigFile (String filePath) | |
void | append (InputStream stream) throws IOException |
void | open (String configPath) throws IOException |
void | clear () |
void | write (String path) throws IOException |
boolean | keyExists (String key) |
void | setString (String key, String value) |
void | setBoolean (String key, boolean value) |
void | setInt (String key, int value) |
void | setDouble (String key, double value) |
void | setFloat (String key, float value) |
String | getString (String key) |
int | getInt (String key) |
double | getDouble (String key) |
float | getFloat (String key) |
boolean | getBoolean (String key) |
Private Member Functions | |
void | parseLine (String line) |
Private Attributes | |
final HashMap< String, String > | map = new HashMap<String, String>() |
Represents a configuration file that works off of a key-value pair in the form [key name] = "[value]".
|
inline |
Constructor
|
inline |
Constructor
filePath | The path to the configuration file to open. |
|
inline |
Parses a configuration file from the given stream and appends the parsed values to the key-value map.
stream | The InputStream containing the configuration file to parse. |
|
inline |
Clears the key-value map of all currently set keys and values.
|
inline |
Gets the boolean value associated with the given key.
key | The key to get the boolean value from. |
|
inline |
Gets the double value associated with the given key.
key | The key to get the double value from. |
|
inline |
Gets the float value associated with the given key.
key | The key to get the float value from. |
|
inline |
Gets the Integer value associated with the given key.
key | The key to get the Integer value from. |
|
inline |
Gets the String value associated with the given key.
key | The key to get the String value from. |
|
inline |
Checks if a key exists in the HashMap backing this ConfigFile instance.
key | The key to check for. |
|
inline |
Opens a configuration file given by configPath and parses all of its key-value pairs, adding them to the key-value map.
configPath | Path to the configuration file to parse. |
|
inlineprivate |
|
inline |
Sets a key to the given boolean value.
key | The key to set the boolean value to. |
value | The boolean value to set to the key. |
|
inline |
Sets a key to the given double value.
key | The key to set the double value to. |
value | The double value to set to the key. |
|
inline |
Sets a key to the given float value.
key | The key to set the float value to. |
value | The float value to set to the key. |
|
inline |
Sets a key to the given Integer value.
key | The key to set the Integer value to. |
value | The Integer value to set to the key. |
|
inline |
Sets a key to the given String value.
key | The key to set the String value to. |
value | The String value to set to the key. |
|
inline |
Writes the currently set key-value pairs to
path | The path to save the |
IOException |
|
private |