Package org.apache.uima.internal.util
Class GraphNode
java.lang.Object
org.apache.uima.internal.util.GraphNode
Interface for a generic node in a graph.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPredecessor
(GraphNode pred) Add a new predecessor node.void
addSuccessor
(GraphNode succ) Add a new successor node.void
Connect this node to a new node.Get the element contained in the node.int
Get the number of predecessor node.int
Get the number of successor node.getPredecessor
(int i) Get a specific predecessor node.getSuccessor
(int i) Get a specific successor node.void
setElement
(Object element) Set the element in the node.
-
Field Details
-
element
-
successors
-
predecessors
-
-
Constructor Details
-
GraphNode
-
-
Method Details
-
getElement
Get the element contained in the node.- Returns:
- The object contained in the node.
-
setElement
Set the element in the node.- Parameters:
element
- The element.
-
getNbrSucc
public int getNbrSucc()Get the number of successor node.- Returns:
- The number of successor nodes.
-
getSuccessor
Get a specific successor node. As usual, the count is 0-based.- Parameters:
i
- The number of the successor to be retrieved.- Returns:
- The successor node.
-
addSuccessor
Add a new successor node.- Parameters:
succ
- The node to be added.
-
getNbrPred
public int getNbrPred()Get the number of predecessor node.- Returns:
- The number of predecessor nodes.
-
getPredecessor
Get a specific predecessor node. As usual, the count is 0-based.- Parameters:
i
- The number of the predecessor to be retrieved.- Returns:
- The predecessor node.
-
addPredecessor
Add a new predecessor node.- Parameters:
pred
- The node to be added.
-
connect
Connect this node to a new node.- Parameters:
node
- The node to be connected to.
-