class Station implements Comparable { // stations.csv: "id","latitude","longitude","name","display_name","zone","total_lines","rail" int id; double lat,lon; String name; String displayName; float zone; int totalLines, rail; float screenx,screeny; float mapx,mapy; float targetx, targety; Vector conns = new Vector(); // for path finding int timeToCentre = 0; Station pathParent = null; Station(int id, double lon, double lat, String name, String displayName, float zone, int totalLines, int rail) { this.id = id; this.lon = lon; this.lat = lat; this.name = name; this.displayName = displayName; this.zone = zone; this.totalLines = totalLines; this.rail = rail; } public int compareTo(Object o) { Station other = (Station)o; return this.timeToCentre - other.timeToCentre; } void animate() { if (abs(screenx-targetx)>1.0) { screenx += (targetx-screenx)/5.0; } if (abs(screeny-targety)>1.0) { screeny += (targety-screeny)/5.0; } } }