- String file;
-
- try {
- file = readConfigFile();
- } catch (IOException e) {
- e.printStackTrace();
- populateDefaults();
- return;
- }
-
- try {
- Arrays.stream(file.split("\n"))
- .map(line -> line.split(" "))
- .forEach((action) -> {
- double speed = Double.parseDouble(action[0]);
- double time = Double.parseDouble(action[1]);
- String name = action[2];
-
- speeds.put(name, speed);
- times.put(name, time);
- });
- } catch (Exception e) {
- e.printStackTrace();
- populateDefaults();
- }