/** * A Connection between two places. Equivalent to an edge in the graph */ public class Connection { private double lon1; private double lat1; private double lon2; private double lat2; private String label; public Connection(double lat1, double lon1, double lat2, double lon2, String label) { this.lon1 = lon1; this.lat1 = lat1; this.lon2 = lon2; this.lat2 = lat2; this.label = label; } public Connection(Place place1, Place place2, String label) { lat1 = place1.getLat(); lon1 = place1.getLon(); lat2 = place2.getLat(); lon2 = place2.getLon(); this.label = label; } public String getLabel() { return label; } public double getLat1() { return lat1; } public double getLat2() { return lat2; } public double getLon1() { return lon1; } public double getLon2() { return lon2; } }