private boolean DFSCycle(Vertex a, Hashtable<Vertex,Color> color){       
        color.put(a,Color.GREY);
        LinkedList<Vertex> adjacencyVertices=graph.getAdjacencyVertices(a);
        Iterator<Vertex> i = new Iterator<Vertex>(adjacencyVertices);
        while(i.hasNext()){
            Vertex u = i.getNext();
            if(color.get(u)==Color.GREY){
                return true;
            }
            if(color.get(u)==Color.WHITE){
                if(DFSCycle(u,color)==true){
                    return true;
                }
            }
        }
        color.put(a,Color.BLACK);
        return false;
    }