structs.AvlTree.Node Extends
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 : T
Value to store in the node.
opt_parent : goog.structs.AvlTree.Node.<T>>
Optional parent node.

Instance Methods

Public Protected Private
isLeftChild() boolean
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.
code »
isRightChild() boolean
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.
code »

Instance Properties

count :
The number of nodes in the subtree rooted at this node.
Code »
height :
The height of the tree rooted at this node.
Code »
The node's left child. Null if the node does not have a left child.
Code »
The node's parent. Null if the node is the root.
Code »
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