回答編集履歴
1
まぎらわしい変数名をわかりやすく変更
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
CSVReader reader=new CSVReader(new FileReader(new File("tatemono.csv")));
|
20
20
|
|
21
|
-
List<String[]> tatemono
|
21
|
+
List<String[]> tatemonocsv=reader.readAll();
|
22
22
|
|
23
23
|
```
|
24
24
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
|
32
32
|
|
33
|
-
あとはご自分の`tatemonoData`たちにfor文などでリスト`tatemono
|
33
|
+
あとはご自分の`tatemonoData`たちにfor文などでリスト`tatemonocsv`から読み込んでいけばいいです。
|
34
34
|
|
35
35
|
|
36
36
|
|
@@ -40,15 +40,15 @@
|
|
40
40
|
|
41
41
|
for(int index=0; index < num_tatemono; index++){
|
42
42
|
|
43
|
-
tatemonoData[index].setKey(tatemono
|
43
|
+
tatemonoData[index].setKey(tatemonocsv.get(index)[0]);
|
44
44
|
|
45
|
-
tatemonoData[index].setAreaCode(tatemono
|
45
|
+
tatemonoData[index].setAreaCode(tatemonocsv.get(index)[1]);
|
46
46
|
|
47
|
-
tatemonoData[index].setKindCode(tatemono
|
47
|
+
tatemonoData[index].setKindCode(tatemonocsv.get(index)[2]);
|
48
48
|
|
49
|
-
tatemonoData[index].setNorthLat(Double.parseDouble(tatemono
|
49
|
+
tatemonoData[index].setNorthLat(Double.parseDouble(tatemonocsv.get(index)[3]) );
|
50
50
|
|
51
|
-
tatemonoData[index].setEastLong(Double.parseDouble(tatemono
|
51
|
+
tatemonoData[index].setEastLong(Double.parseDouble(tatemonocsv.get(index)[4]) );
|
52
52
|
|
53
53
|
}
|
54
54
|
|