Compare commits
No commits in common. "78dfa848fa6ce3f9dcab3dc5805d689a9da5e45b" and "2562126caa466084104ef95bad1a9d2e7503a025" have entirely different histories.
78dfa848fa
...
2562126caa
@ -1,25 +0,0 @@
|
|||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class GebietsDatei {
|
|
||||||
|
|
||||||
private String dateiName;
|
|
||||||
|
|
||||||
public GebietsDatei(String dateiName) {
|
|
||||||
this.dateiName = dateiName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArrayList<Gebiet> getGebiete() {
|
|
||||||
ArrayList<Gebiet> gebiete = new ArrayList<>();
|
|
||||||
try {
|
|
||||||
Files.readAllLines(Paths.get(dateiName)).forEach(line -> {
|
|
||||||
String[] parts = line.split(";");
|
|
||||||
gebiete.add(new Gebiet(Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), parts[2], Long.parseLong(parts[3]), Integer.parseInt(parts[4])));
|
|
||||||
});
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return gebiete;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user