public void ordered ( Consumer < T > action ) { TopoSorter < T > sorter = new TopoSorter <> ( this ) ; sorter . ordered ( action ) ; }
Traverse this graph and performs the given action in topological order