Implement and modify to display JTree with countries
[Persons_Comparator.git] / src / Region.java
index b20d0cb02cede1fbd3c7376759ec9c2bf0bc6247..eac5c9561839d29a74ce91efd0768c24b236616a 100644 (file)
@@ -7,6 +7,7 @@ import java.util.Scanner;
 public class Region {
 
     private String csvFile = "data/countries.csv";
+    private String[] continents = {"Africa", "Americas", "Asia", "Europe", "Oceania"};
     private ArrayList<Country> countryArrayListEurope = new ArrayList<>();
     private ArrayList<Country> countryArrayListAfrica = new ArrayList<>();
     private ArrayList<Country> countryArrayListAmericas = new ArrayList<>();
@@ -15,9 +16,34 @@ public class Region {
 
 
     public Region() {
+        this.loadCSVCountries();
     }
 
-    public void getCsvFile() {
+    public String[] getContinents() {
+        return continents;
+    }
+
+    public ArrayList<Country> getCountryArrayListAfrica() {
+        return countryArrayListAfrica;
+    }
+
+    public ArrayList<Country> getCountryArrayListAsia() {
+        return countryArrayListAsia;
+    }
+
+    public ArrayList<Country> getCountryArrayListAmericas() {
+        return countryArrayListAmericas;
+    }
+
+    public ArrayList<Country> getCountryArrayListEurope() {
+        return countryArrayListEurope;
+    }
+
+    public ArrayList<Country> getCountryArrayListOceania() {
+        return countryArrayListOceania;
+    }
+
+    public void loadCSVCountries() {
         CSVUtils csvUtils = new CSVUtils();
         Scanner scanner = null;
         try {
@@ -59,6 +85,7 @@ public class Region {
         Utils.displayArrayList(countryArrayListAmericas);
         Utils.displayArrayList(countryArrayListAsia);
         Utils.displayArrayList(countryArrayListEurope);*/
+
     }
 
 }
\ No newline at end of file