repositories
/
Persons_Comparator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the country name fetching from CSV.
[Persons_Comparator.git]
/
src
/
Region.java
diff --git
a/src/Region.java
b/src/Region.java
index c97b5ff19fe12ca8159d8fc70091580b069f8864..2233e557ebf64b100e1279284f15ad64ffd465fd 100644
(file)
--- a/
src/Region.java
+++ b/
src/Region.java
@@
-55,19
+55,19
@@
public class Region {
String latLng = line.get(16);
String[] latLngArray = latLng.split(",");
if (line.get(12).equals("Europe")) {
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));
+ Country c = new Country(countryArray[
0
], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
countryArrayListEurope.add(c);
} else if (line.get(12).equals("Africa")) {
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));
+ Country c = new Country(countryArray[
0
], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
countryArrayListAfrica.add(c);
} else if (line.get(12).equals("Americas")) {
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));
+ Country c = new Country(countryArray[
0
], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
countryArrayListAmericas.add(c);
} else if (line.get(12).equals("Asia")) {
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));
+ Country c = new Country(countryArray[
0
], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
countryArrayListAsia.add(c);
} else if (line.get(12).equals("Oceania")) {
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));
+ Country c = new Country(countryArray[
0
], line.get(12), Double.parseDouble(latLngArray[0]), Double.parseDouble(latLngArray[1]), line.get(21));
countryArrayListOceania.add(c);
}
}
countryArrayListOceania.add(c);
}
}