src/main/java/com/infilos/DAGraph.java
/**
     * whether the graph has a ring
     *
     * @return true if has cycle, else return false.
     */
whether the graph has a ring
@return true if has cycle, else return false.
whether the graph has a ring @return true if has cycle else return false .
public boolean hasCycle() {
        lock.readLock().lock();
        try {
            return !topologicalSortImpl().getKey();
        } finally {
            lock.readLock().unlock();
        }
    }
public boolean hasCycle ( ) { lock . readLock ( ) . lock ( ) ; try { return ! topologicalSortImpl ( ) . getKey ( ) ; } finally { lock . readLock ( ) . unlock ( ) ; } }
whether the graph has a ring
 @return true if has cycle, else return false.
whether the graph has a ring @return true if has cycle else return false .