The PositiveWeightedGraph class provides three public methods:
public boolean pathExists(Object origin, Object destination); public int shortestPathLength(Object origin, Object destination); public Enumeration shortestPath(Object origin, Object destination);Each of these calls the basic dijkstra method in Figure 13.3 which determines the shortest paths, and their lengths, to every node reachable from origin.