+ 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 (line.get(12).equals("Europe")) {
+ Country c = new Country(countryArray[1], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
+ countryArrayListEurope.add(c);
+ } else if (line.get(12).equals("Africa")) {
+ Country c = new Country(countryArray[1], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
+ countryArrayListAfrica.add(c);
+ } else if (line.get(12).equals("Americas")) {
+ Country c = new Country(countryArray[1], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
+ countryArrayListAmericas.add(c);
+ } else if (line.get(12).equals("Asia")) {
+ Country c = new Country(countryArray[1], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
+ countryArrayListAsia.add(c);
+ } else if (line.get(12).equals("Oceania")) {
+ Country c = new Country(countryArray[1], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
+ countryArrayListOceania.add(c);