1HashMap<String, List<String>>
2//csv file has 3 columns first column can be used as key
1if you have a lot of holes in you CSV use the comparable as your coordinate
2public class Coordinate implements Comparable<Coordinate> {
3 public int row;
4 public int column;
5 public Coordinate(int r, int c) {
6 row = r;
7 column = c;
8 }
9
10 @Override
11 public int compareTo(Coordinate o) {
12 int r = Integer.compare(row, o.row);
13 if(r == 0) {
14 r = Integer.compare(column, o.column);
15 }
16 return r;
17 }
18
19 public boolean equals(Object o) {
20 if(o instanceof Coordinate) {
21 Coordinate c = (Coordinate)o;
22 return row == c.row && column == c.column;
23 }
24 return false;
25 }
26}
27