|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.util.dag.DAG
public class DAG
DAG = Directed Acyclic Graph
Constructor Summary | |
---|---|
DAG()
|
Method Summary | |
---|---|
void |
addEdge(String from,
String to)
|
void |
addEdge(Vertex from,
Vertex to)
|
Vertex |
addVertex(String label)
Adds vertex to DAG. |
Object |
clone()
|
List |
getChildLabels(String label)
|
Set |
getLabels()
|
List |
getParentLabels(String label)
|
List |
getSuccessorLabels(String label)
Return the list of labels of successor in order decided by topological sort |
Vertex |
getVertex(String label)
|
List |
getVerticies()
|
boolean |
hasEdge(String label1,
String label2)
|
boolean |
isConnected(String label)
Indicates if there is at least one edge leading to or from vertex of given label |
void |
removeEdge(String from,
String to)
|
void |
removeEdge(Vertex from,
Vertex to)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DAG()
Method Detail |
---|
public List getVerticies()
public Set getLabels()
public Vertex addVertex(String label)
label
- The lable of the Vertex
public void addEdge(String from, String to) throws CycleDetectedException
CycleDetectedException
public void addEdge(Vertex from, Vertex to) throws CycleDetectedException
CycleDetectedException
public void removeEdge(String from, String to)
public void removeEdge(Vertex from, Vertex to)
public Vertex getVertex(String label)
public boolean hasEdge(String label1, String label2)
public List getChildLabels(String label)
label
-
public List getParentLabels(String label)
label
-
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Object.clone()
public boolean isConnected(String label)
true if this vertex is connected with other vertex,false
otherwise
public List getSuccessorLabels(String label)
label
- The label of the vertex whose predessors are serched
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |