public int getRow() { return row; }
public Location(int col, int row) { this.row = row; this.col = col; }
public int compareTo(Input.Location loc) throws ClassCastException {
- if (!(loc instanceof Cartesian)) throw new ClassCastException();
+ if (!(loc instanceof Cartesian.Location)) throw new ClassCastException(loc.getClass().getName());
Location<Tok> c = (Location<Tok>)loc;
if (row < c.row) return -1;
if (row > c.row) return 1;