public static void visitVertex(DirectedGraph graph, Vertex vertex, TimeRecorder recorder, LinkedList<Vertex> sortedList) {
        recorder.time += 1;
        vertex.color = Vertex.Color.GRAY;
        vertex.discover = recorder.time;

        Map<Vertex, List<Vertex>> edgeMap = graph.getAdjacencys();
        List<Vertex> adjacencys = edgeMap.get(vertex);
        if (adjacencys != null && adjacencys.size() > 0) {
            for (Vertex adjacency : adjacencys) {
                if (adjacency.color == Vertex.Color.WHITE) {
                    adjacency.parent = vertex;
                    visitVertex(graph, adjacency, recorder, sortedList);
                }
            }
        }

        recorder.time += 1;
        vertex.color = Vertex.Color.BLACK;
        vertex.finish = recorder.time;
        sortedList.addLast(vertex);
    }