Class Node

    • Method Detail

      • getParent

        public Node getParent()
      • setParent

        public void setParent​(Node parent)
      • setType

        public void setType​(Node.Type type)
      • getChildren

        public List<Node> getChildren()
        Return the children of Node. The Tree is represented by a single root Node whose children are represented by a List<Node>. Each of these Node elements in the List can have children. The getChildren() method will return the children of a Node.
        Returns:
        the children of Node
      • getNumberOfChildren

        public int getNumberOfChildren()
        Returns the number of immediate children of this Node.
        Returns:
        the number of immediate children.
      • addChild

        public Node addChild​(Node child)
        Adds a child to the list of children for this Node. The addition of the first child will create a new List<Node>.
        Parameters:
        child - a Node object to set.
        Returns:
        Child node just added
      • addChildCategory

        public Node addChildCategory​(String categoryName)
      • addChildColumnIndexes

        public void addChildColumnIndexes​(int... columnIndexes)
      • insertChildAt

        public void insertChildAt​(int index,
                                  Node child)
        Inserts a Node at the specified position in the child list. Will throw an ArrayIndexOutOfBoundsException if the index does not exist.
        Parameters:
        index - the position to insert at.
        child - the Node object to insert.
      • removeChildAt

        public void removeChildAt​(int index)
        Remove the Node element at index index of the List<Node>.
        Parameters:
        index - the index of the element to delete.
      • getData

        public String getData()
      • setData

        public void setData​(String data)