Compare commits

2 Commits

Author SHA1 Message Date
pbs2h21asc
2562126caa Gebietliste 2022-12-02 15:10:14 +01:00
9c6592fbff GebietsListe Methoden 2022-12-02 15:07:08 +01:00
3 changed files with 42 additions and 26 deletions

10
.idea/runConfigurations.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?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>

View File

@@ -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;
}
}

View File

@@ -1,3 +1,34 @@
public class GebietsListe {
import java.util.ArrayList;
import java.util.List;
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;
}
}