Compare commits
1 Commits
2562126caa
...
readfile
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a1827ac6a4 |
10
.idea/runConfigurations.xml
generated
10
.idea/runConfigurations.xml
generated
@@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RunConfigurationProducerService">
|
|
||||||
<option name="ignoredProducers">
|
|
||||||
<set>
|
|
||||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
|
||||||
</set>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
25
src/GebietsDatei.java
Normal file
25
src/GebietsDatei.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,34 +1,3 @@
|
|||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class GebietsListe {
|
public class GebietsListe {
|
||||||
private List<GebietMock> gebietListe = new ArrayList<>();
|
|
||||||
|
|
||||||
public GebietsListe(){
|
|
||||||
this.gebietListe = gebietListe;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Gebiet getGebietMinDurchschnittEinkommen(){
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Gebiet getGebietMaxEinwohner(){
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getAnzahlGesamt(){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getAnzahlUnvollstaendig(){
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Gebiet> getGebietNachNamen(String namensanfang){
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user