Class: Node

Node

Datas structure of tree

new Node ()

Properties:
Name Type Description
data Object Data of the node
parent Node Parent of the node
firstChild Node The first child of the node
lastChild Node The last child of the node
next Node The next parent child

Methods

add (data)Node

Add a new child
Name Type Description
data Object Data of the new child
Returns:
Type Description
Node The new child

isRoot ()boolean

Check if this node is the root of the tree
Returns:
Type Description
boolean

getNext ()Node

Get the next parent child
Returns:
Type Description
Node