+ public void loadCSVOneCountry(String name) {
+ Scanner scanner = null;
+ try {
+ scanner = new Scanner(new File(csvFile));
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ while (scanner.hasNext()) {
+ List<String> line = CSVUtils.parseLine(scanner.nextLine());
+ String countryList = line.get(0);
+ String[] countryArray = countryList.split(",");
+ String latLng = line.get(16);
+ String[] latLngArray = latLng.split(",");
+
+
+ if (countryArray[1].equals(name)) {
+ setRegion(line.get(12));
+ setLat(Double.parseDouble(latLngArray[0]));
+ setLng(Double.parseDouble(latLngArray[1]));
+ }
+ }
+ scanner.close();
+ /*Utils.displayArrayList(countryArrayListOceania);
+ Utils.displayArrayList(countryArrayListAfrica);
+ Utils.displayArrayList(countryArrayListAmericas);
+ Utils.displayArrayList(countryArrayListAsia);
+ Utils.displayArrayList(countryArrayListEurope);*/
+ }
+
+