The goog.structs.AvlTree.Node Class

goog.structs.AvlTree.Node(value, opt_parent)

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.

value {*}
Value to store in the node.
opt_parent {goog.structs.AvlTree.Node=}
Optional parent node.

.height {number}

The height of the tree rooted at this node.

.isLeftChild()

Returns true iff the specified node has a parent and is the left child of its parent.

returns {boolean}
Whether the specified node has a parent and is the left child of its parent.

.isRightChild()

Returns true iff the specified node has a parent and is the right child of its parent.

returns {boolean}
Whether the specified node has a parent and is the right child of its parent.

.left {goog.structs.AvlTree.Node?}

The node's left child. Null if the node does not have a left child.

.parent {goog.structs.AvlTree.Node}

The node's parent. Null if the node is the root.

The node's right child. Null if the node does not have a right child.

.value {*}

The value stored by the node.