Edge.java (632B)
1 package osm.common; 2 3 import osm.message.Node; 4 import osm.routing.RoutingEdge; 5 6 public class Edge implements RoutingEdge<Node> { 7 public final Node destination; 8 public final long distance; 9 public final double time; 10 11 public Edge(Node destination, long distance, double time) { 12 this.destination = destination; 13 this.distance = distance; 14 this.time = time; 15 } 16 17 @Override 18 public Node getDestination() { 19 return destination; 20 } 21 22 @Override 23 public long getDistance() { 24 return distance; 25 } 26 27 @Override 28 public double getTime() { 29 return time; 30 } 31 }