public boolean findAndReportCycles ( DependencyGraph graph ) { this . graph = graph ; cycleDetected = false ; visitedEdge = new LinkedHashMap < Key < ? > , Dependency > ( graph . size ( ) ) ; for ( Key < ? > key : graph . getAllKeys ( ) ) { visit ( key , null ) ; } return cycleDetected ; }
Detects cycles in the given graph .