private int getDistance( Vertex<T> vertex,Map<Vertex<T>,Integer> distance){
        return distance.containsKey(vertex) ? distance.get(vertex) : 1000;
    }
http://www.geeksforgeeks.org/shortest-path-for-directed-acyclic-graphs/
src/com/interview/graph/DAGShortestPathTopological.java