question: public boolean containsCycle ( ) { for ( Iterator < EdgeType > i = graph . edgeIterator ( ) ; i . hasNext ( ) ; ) { EdgeType edge = i . next ( ) ; if ( getDFSEdgeType ( edge ) == BACK_EDGE ) { return true ; } } return false ; }
target:  Return whether or not the graph contains a cycle: i.e., whether it contains any back edges. This should only be called after search() has been called (since that method actually executes the search).