structs.AvlTree.Node Extends Object
Constructs an AVL-Tree node with the specified value. If no parent is specified, the node's parent is assumed to be null. The node's height defaults to 1 and its children default to null.

Inheritance

Constructor

goog.structs.AvlTree.Node(valueopt_parent)

Parameters

value :
*
Value to store in the node.
opt_parent :
(goog.structs.AvlTree.Node | null | undefined)
Optional parent node.

Instance Methods

Public Protected Private
isLeftChild()
Returns true iff the specified node has a parent and is the left child of its parent.
Returns:   Whether the specified node has a parent and is the left child of its parent.
code »
isRightChild()
Returns true iff the specified node has a parent and is the right child of its parent.
Returns:   Whether the specified node has a parent and is the right child of its parent.
code »

Instance Properties

height :
The height of the tree rooted at this node.
Code »
left :
The node's left child. Null if the node does not have a left child.
Code »
parent :
The node's parent. Null if the node is the root.
Code »
right :
The node's right child. Null if the node does not have a right child.
Code »
value :
*
The value stored by the node.
Code »

Package structs.AvlTree

Package Reference