src/main/java/com/infilos/DAGraph.java
/**
     * Only DAG has a topological sort
     *
     * @return topologically sorted results, returns false if the DAG result is a ring result
     *
     * @throws Exception errors
     */
Only DAG has a topological sort
@return topologically sorted results, returns false if the DAG result is a ring result

@throws Exception errors
Only DAG has a topological sort @return topologically sorted results returns false if the DAG result is a ring result @throws Exception errors
public List<Node> topologicalSort() throws Exception {
        lock.readLock().lock();
        try {
            Map.Entry<Boolean, List<Node>> entry = topologicalSortImpl();
            if (entry.getKey()) {
                return entry.getValue();
            }
            throw new Exception("Serious error: graph has cycle!");
        } finally {
            lock.readLock().unlock();
        }
    }
public List < Node > topologicalSort ( ) throws Exception { lock . readLock ( ) . lock ( ) ; try { Map . Entry < Boolean , List < Node > > entry = topologicalSortImpl ( ) ; if ( entry . getKey ( ) ) { return entry . getValue ( ) ; } throw new Exception ( "Serious error: graph has cycle!" ) ; } finally { lock . readLock ( ) . unlock ( ) ; } }
Only DAG has a topological sort
 @return topologically sorted results, returns false if the DAG result is a ring result
Only DAG has a topological sort @return topologically sorted results returns false if the DAG result is a ring result