public class Node
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.util.ArrayList<Node> |
children
Children of this node.
|
Content |
content
Contents of this node.
|
int |
indent
Indent of the node in the tree.
|
Node |
parent
Parent of this node.
|
| Constructor and Description |
|---|
Node(java.lang.String contentLine,
int indent,
Node parent,
int set)
Constructor of the node.
|
public Node parent
public Content content
public int indent
public java.util.ArrayList<Node> children
public Node(java.lang.String contentLine,
int indent,
Node parent,
int set)
contentLine - string with the node informationindent - indent level of this node, to determine its place on the tree.parent - indicates the parent of the new node, if any.public void insert(Node node)
node - new node to add.public java.lang.String toString()
toString in class java.lang.Objectpublic Node getRoot()