Class WorkflowNode

    • Constructor Detail

      • WorkflowNode

        public WorkflowNode()
    • Method Detail

      • addChild

        public void addChild​(int index,
                             WorkflowNode child)
        Adds a child node to the tail of the existing children, and sets the parent of the given node to this node. Each child may have children of its own, forming a tree structure representing the syntax tree of a structured program.
        Parameters:
        index - Position at which to add the child. When smaller than 0, the (current length of the children + 1) is added (-1 appends the item to the end of the list, -2 inserts the item as the second to last position etc.). Afterward, the index is clamped to the range [0, children.size()], so that no index out of bound exceptions can occur.
        child - The child node to add.
      • addChild

        public void addChild​(WorkflowNode child)
        Adds a child node to the tail of the existing children, and sets the parent of the given node to this node. Each child may have children of its own, forming a tree structure representing the syntax tree of a structured program.
        Parameters:
        child - The child node to add.
      • getChildren

        public List<WorkflowNode> getChildren()
        Gets the list of child nodes, i.e. the nodes that have this node set as their parent. Which and how many children a node must or can have depends on the type of this node. See EWorkflowNodeKind for a list of built-in nodes. Each child may have children of its own, forming a tree structure representing the syntax tree of a structured program.
        Returns:
        The children of this node.
        See Also:
        getParent()
      • getId

        public Long getId()
        Specified by:
        getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
        Specified by:
        getId in interface IIdProviding<Long>
        Returns:
        The ID that identifies this instance.
      • getParent

        public WorkflowNode getParent()
        Gets parent of this node, i.e. the node that contains this node in its children. The parent may be null if and only if it is the root node, i.e. the node pointed to by WorkflowTask.getRootNode().

        Each parent may have another parent, forming a tree structure representing the syntax tree of a structured program.

        Returns:
        The parent of this node, or null if this node is a root node.
        See Also:
        getChildren()
      • setChildren

        public void setChildren​(List<WorkflowNode> children)
        Sets the list of child nodes, i.e. the nodes that have this node set as their parent. Which and how many children a node must or can have depends on the type of this node. See EWorkflowNodeKind for a list of built-in nodes. Each child may have children of its own, forming a tree structure representing the syntax tree of a structured program.
        Parameters:
        children - A list of child nodes.
        See Also:
        getParent()
      • setParent

        public void setParent​(WorkflowNode parent)
        Sets parent of this node, i.e. the node that contains this node in its children. The parent may be null if and only if it is the root node, i.e. the node pointed to by WorkflowTask.getRootNode(). Each parent may have another parent, forming a tree structure representing the syntax tree of a structured program.
        Parameters:
        parent - The parent of this node.