All Implemented Interfaces:
A node in a directed graph. In addition to an arbitrary
containing user data associated with the node,
each node maintains a
s of nodes which are pointed
to by the current node (available from
The in-degree of the node (that is, number of nodes that point to
the current node) may be queried.
|protected Object ||data ||The data associated with this node. |
|protected Set ||outNodes ||A |
Set of neighboring nodes pointed to by this
|protected int ||inDegree ||The in-degree of the node. |
|Methods from java.lang.Object:|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait|
|Method from javax.imageio.spi.DigraphNode Detail:|
public boolean addEdge(DigraphNode node)
Adds a directed edge to the graph. The outNodes list of this
node is updated and the in-degree of the other node is incremented.
public void dispose()
Removes this node from the graph, updating neighboring nodes
public Object getData()
Object referenced by this node.
public int getInDegree()
Returns the in-degree of this node.
public Iterator getOutNodes()
Iterator containing the nodes pointed
to by this node.
public boolean hasEdge(DigraphNode node)
true if an edge exists between this node
and the given node.
public boolean removeEdge(DigraphNode node)
Removes a directed edge from the graph. The outNodes list of this
node is updated and the in-degree of the other node is decremented.