|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.util.graph.Node
A generic node object that contains lists for edges connected to it and wraps an object
| Constructor Summary | |
Node()
Creates a new node object |
|
Node(Object contents)
Creates a new node object storing contents in it |
|
| Method Summary | |
void |
addInEdge(Edge edge)
Add an in-edge to this node |
void |
addOutEdge(Edge edge)
Adds an out-edge to this node |
int |
degree()
Determines the total number of edges connected to this node |
Object |
getContents()
Gets the contents of the node |
List |
getInEdges()
|
EdgeIterator |
getInEdgesIterator()
Returns an iterator with the in-edges of this node It is advisable for multi-threaded applications to synchronize on this Node
object when using the Iterator |
List |
getOutEdges()
|
EdgeIterator |
getOutEdgesIterator()
Returns an iterator with the out-edges of this node It is advisable for multi-threaded applications to synchronize on this Node
object when using the Iterator |
int |
inDegree()
Determines the number of in-edges for this node |
int |
outDegree()
Determines the number of out-edges for this node |
void |
removeEdge(Edge edge)
Removes an edge regardless of its orientation |
void |
removeInEdge(Edge edge)
Removes an in-edge |
void |
removeOutEdge(Edge edge)
Removes an out-edge |
void |
setContents(Object contents)
Stores an object to this node |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Node()
public Node(Object contents)
contents in it
contents - | Method Detail |
public Object getContents()
nullpublic void setContents(Object contents)
contents - the object to be addedpublic void addInEdge(Edge edge)
edge - The feature to be added to the InEdge attributepublic void addOutEdge(Edge edge)
edge - The feature to be added to the OutEdge attribute
public void removeInEdge(Edge edge)
throws EdgeNotFoundException
edge - the edge to be removed
EdgeNotFoundException - in case the edge does not exist
public void removeOutEdge(Edge edge)
throws EdgeNotFoundException
edge - the edge to be removed
EdgeNotFoundException - if the edge is not found
public void removeEdge(Edge edge)
throws EdgeNotFoundException
edge - The edge to be removed
EdgeNotFoundExceptionpublic int inDegree()
public int outDegree()
public int degree()
public EdgeIterator getInEdgesIterator()
Node
object when using the Iterator
public EdgeIterator getOutEdgesIterator()
Node
object when using the Iterator
public List getOutEdges()
public List getInEdges()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||