|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.util.graph.Graph
Implements the graph interface
org.globus.ogce.util.Graph,
org.globus.ogce.util.GraphEdge,
org.globus.ogce.util.GraphNode| Constructor Summary | |
Graph()
Constructs a new Graph object without any nodes or edges |
|
| Method Summary | |
Edge |
addEdge(Node FromNode,
Node ToNode,
Object contents)
Adds an edge from FromNode to ToNode |
void |
addGraphListener(GraphListener l)
Adds a listener to listen for structural changes in the graph |
Node |
addNode()
Creates a new node in the graph |
Node |
addNode(Object Contents)
Creates a new node storing Contents in it |
void |
clear()
Removes all nodes and edges from this graph |
Object |
clone()
Returns a shallow copy of the graph. |
int |
edgeCount()
Returns No of edges in the graph |
boolean |
equals(Object o)
Determines if the specified graph is structurally equivalen to the specified graph. |
Edge |
findEdge(Object contents)
|
Node |
findNode(Object contents)
Finds the node that has the specified contents |
EdgeIterator |
getEdgesIterator()
Returns an iterator with the edges in the graph |
Set |
getEdgesSet()
Returns a list with the edges in the graph. |
NodeIterator |
getNodesIterator()
Returns an iterator with all the nodes in the graph |
Set |
getNodesSet()
Returns a list with the nodes in the graph. |
int |
hashCode()
|
int |
nodeCount()
Returns No of nodes in the graph |
void |
removeEdge(Edge edge)
Removes an edge from the graph |
void |
removeEdge(Node fromNode,
Node toNode)
Removes an edge going from FromNode to ToNode |
void |
removeGraphListener(GraphListener l)
Removes a listener |
void |
removeNode(Node node)
Removes the specified node from the graph It will also remove all the edges connected to the node |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Graph()
Graph object without any nodes or edges
| Method Detail |
public void addGraphListener(GraphListener l)
GraphInterface
addGraphListener in interface GraphInterfacel - the listener to be addedpublic void removeGraphListener(GraphListener l)
GraphInterface
removeGraphListener in interface GraphInterfacel - public void clear()
GraphInterface
clear in interface GraphInterfacepublic Node addNode()
addNode in interface GraphInterfacepublic Node addNode(Object Contents)
Contents in it
addNode in interface GraphInterfaceContents - The feature to be added to the Node attribute
public Edge addEdge(Node FromNode,
Node ToNode,
Object contents)
throws NodeNotFoundException
FromNode to ToNode
addEdge in interface GraphInterfaceFromNode - the node the edge starts fromToNode - the node the edge goes tocontents - The object to be stored in the edge
NodeNotFoundException - If one of the specified nodes is not foundpublic int edgeCount()
edgeCount in interface GraphInterfacepublic int nodeCount()
nodeCount in interface GraphInterfacepublic NodeIterator getNodesIterator()
getNodesIterator in interface GraphInterfacepublic Set getNodesSet()
GraphInterface
getNodesSet in interface GraphInterfacepublic EdgeIterator getEdgesIterator()
getEdgesIterator in interface GraphInterfacepublic Set getEdgesSet()
GraphInterface
getEdgesSet in interface GraphInterface
public void removeNode(Node node)
throws NodeNotFoundException
removeNode in interface GraphInterfacenode - Description of the Parameter
NodeNotFoundException - thrown if the node was not found in this graph
public void removeEdge(Node fromNode,
Node toNode)
throws NodeNotFoundException,
EdgeNotFoundException
FromNode to ToNode
removeEdge in interface GraphInterfacefromNode - Description of the ParametertoNode - Description of the Parameter
NodeNotFoundException - Description of the Exception
EdgeNotFoundException - Description of the Exception
public void removeEdge(Edge edge)
throws EdgeNotFoundException
removeEdge in interface GraphInterfaceedge - Description of the Parameter
EdgeNotFoundException - Description of the Exceptionpublic Edge findEdge(Object contents)
findEdge in interface GraphInterfacepublic Node findNode(Object contents)
GraphInterface
findNode in interface GraphInterfacepublic Object clone()
clone in interface GraphInterfacepublic boolean equals(Object o)
o - The object to be compared to this graph
public int hashCode()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||