Package hudson.util
Class CyclicGraphDetector<N>
java.lang.Object
hudson.util.CyclicGraphDetector<N>
Traverses a directed graph and if it contains any cycle, throw an exception.
- Author:
- Kohsuke Kawaguchi
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionList up edges from the given node (by listing nodes that those edges point to.)Returns all the nodes in the topologically sorted order.protected voidreactOnCycle(N q, List<N> cycle) React on detected cycles - default implementation throws an exception.void
- 
Constructor Details- 
CyclicGraphDetectorpublic CyclicGraphDetector()
 
- 
- 
Method Details- 
run
- 
getSortedReturns all the nodes in the topologically sorted order. That is, if there's an edge a → b, b always come earlier than a.
- 
getEdgesList up edges from the given node (by listing nodes that those edges point to.)- Returns:
- Never null.
 
- 
reactOnCycleReact on detected cycles - default implementation throws an exception.
 
-