All Implemented Interfaces:

public class Node extends Object implements Serializable
Represents a node of the Tree class.
See Also:
  • Constructor Details

  • Method Details

    • getParent

      public Node getParent()
    • setParent

      public void setParent(Node parent)
    • setType

      public void setType(Node.Type type)
    • getType

      public Node.Type getType()
    • 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.
      the children of Node
    • getNumberOfChildren

      public int getNumberOfChildren()
      Returns the number of immediate children of this Node.
      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>.
      child - a Node object to set.
      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.
      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>.
      index - the index of the element to delete.
    • getData

      public String getData()
    • setData

      public void setData(String data)
    • toString

      public String toString()
      toString in class Object