Revision 11
Config.java | ||
---|---|---|
8 | 8 |
* @author Andrej Cimpersek |
9 | 9 |
*/ |
10 | 10 |
public class Config { |
11 |
|
|
11 | 12 |
private static XMLConfiguration configuration; |
12 | 13 |
|
13 |
public static XMLConfiguration getConfiguration(){ |
|
14 |
if(configuration == null){
|
|
14 |
public static XMLConfiguration getConfiguration() {
|
|
15 |
if (configuration == null) {
|
|
15 | 16 |
try { |
16 | 17 |
configuration = new XMLConfiguration("/etc/lidar/config.xml"); |
17 | 18 |
configuration.setAutoSave(true); |
... | ... | |
23 | 24 |
return configuration; |
24 | 25 |
} |
25 | 26 |
|
26 |
public static void save(){ |
|
27 |
public static void save() {
|
|
27 | 28 |
try { |
28 | 29 |
configuration.save("/etc/lidar/config.xml"); |
29 | 30 |
} catch (Exception e) { |
Also available in: Unified diff