Package org.codehaus.plexus.util.dag
Class CycleDetector
java.lang.Object
org.codehaus.plexus.util.dag.CycleDetector
- Version:
- $Id$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
introducesCycle
(Vertex vertex) introducesCycle
(Vertex vertex, Map<Vertex, Integer> vertexStateMap) This method will be called when an edge leading to given vertex was added and we want to check if introduction of this edge has not resulted in apparition of cycle in the graphprivate static boolean
isNotVisited
(Vertex vertex, Map<Vertex, Integer> vertexStateMap) private static boolean
isVisiting
(Vertex vertex, Map<Vertex, Integer> vertexStateMap)
-
Field Details
-
NOT_VISITED
-
VISITING
-
VISITED
-
-
Constructor Details
-
CycleDetector
public CycleDetector()
-
-
Method Details
-
hasCycle
-
introducesCycle
This method will be called when an edge leading to given vertex was added and we want to check if introduction of this edge has not resulted in apparition of cycle in the graph- Parameters:
vertex
-vertexStateMap
-- Returns:
-
introducesCycle
-
isNotVisited
- Parameters:
vertex
-vertexStateMap
-- Returns:
-
isVisiting
- Parameters:
vertex
-vertexStateMap
-- Returns:
-
dfsVisit
-