|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.graph.Graph
A graph object which is either a CFG or PDG.
| Field Summary | |
protected GraphElementSet |
edges
Edges of this graph. |
protected GraphElementSet |
nodes
Nodes of this graph. |
| Constructor Summary | |
protected |
Graph()
Creates a new, empty objects. |
| Method Summary | |
void |
add(GraphEdge edge)
Adds a given edge to this graph. |
void |
add(GraphNode node)
Adds a given node to this graph. |
void |
clear()
Clears nodes and edges of this graph. |
boolean |
contains(GraphEdge edge)
Tests if this graph contains a given edge. |
boolean |
contains(GraphNode node)
Tests if this graph contains a given node. |
boolean |
equals(Graph graph)
Tests if this graph equals to a given graph. |
GraphElementSet |
getEdges()
Returns all edges of this graph. |
GraphElementSet |
getNodes()
Returns all nodes of this graph. |
void |
print()
Displays information about this graph. |
void |
printEdges(java.lang.StringBuffer buf)
Collects information about edges of this graph for printing. |
void |
printNodes(java.lang.StringBuffer buf)
Collects information about nodes of this graph for printing. |
void |
remove(GraphEdge edge)
Removes a given edge from this graph. |
void |
remove(GraphNode node)
Removes a given node from this graph. |
void |
setEdges(GraphElementSet set)
Sets edges of this graph. |
void |
setNodes(GraphElementSet set)
Sets nodes of this graph. |
void |
setSrcDstNodes()
Calculates source and destination nodes for each of the edges of this graph. |
void |
writeEdges(java.lang.StringBuffer buf)
Collects information about edges of this graph for writing an XML document. |
void |
writeNodes(java.lang.StringBuffer buf)
Collects information about nodes of this graph for writing an XML document. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected GraphElementSet nodes
protected GraphElementSet edges
| Constructor Detail |
protected Graph()
| Method Detail |
public void setNodes(GraphElementSet set)
set - The collection of nodes.public GraphElementSet getNodes()
public void setEdges(GraphElementSet set)
set - The collection of edges.public GraphElementSet getEdges()
public void clear()
public void add(GraphNode node)
node - A node to be added.public void add(GraphEdge edge)
edge - An edge to be added.public void remove(GraphNode node)
node - A node to be removed.public void remove(GraphEdge edge)
edge - An edge to be removed.public boolean contains(GraphNode node)
node - A node to be checked.
true if this graph contains the node, otherwise false.public boolean contains(GraphEdge edge)
edge - An edge to be checked.
true if this graph contains the edge, otherwise false.public void setSrcDstNodes()
public boolean equals(Graph graph)
graph - A graph to be checked.
true if the graphs are equal, otherwise false.public void print()
public void printNodes(java.lang.StringBuffer buf)
buf - The information about the nodes.public void printEdges(java.lang.StringBuffer buf)
buf - The information about the edges.public void writeNodes(java.lang.StringBuffer buf)
buf - The information about the nodes.public void writeEdges(java.lang.StringBuffer buf)
buf - The information about the edges.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||