dijkstra’s shortest path algorithm in java