Class GraphNode

java.lang.Object
org.apache.uima.internal.util.GraphNode

public class GraphNode extends Object
Interface for a generic node in a graph.
See Also:
  • Field Details

  • Constructor Details

    • GraphNode

      public GraphNode(Object element)
  • Method Details

    • getElement

      public Object getElement()
      Get the element contained in the node.
      Returns:
      The object contained in the node.
    • setElement

      public void setElement(Object element)
      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

      public GraphNode getSuccessor(int i)
      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

      public void addSuccessor(GraphNode succ)
      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

      public GraphNode getPredecessor(int i)
      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

      public void addPredecessor(GraphNode pred)
      Add a new predecessor node.
      Parameters:
      pred - The node to be added.
    • connect

      public void connect(GraphNode node)
      Connect this node to a new node.
      Parameters:
      node - The node to be connected to.