Bridges-Java-2.3.2  2.3.2
Bridges(JavaAPI)
Public Member Functions | List of all members
bridges.base.AVLTreeElement< K, E > Class Template Reference

This class extends the BSTElement class for use in building AVL trees. AVL tree elements include a 'height' and a 'balFactor' value, representing the height and balance factor of the AVL tree at that node, respectively. This is useful in representing AVL trees. More...

Inheritance diagram for bridges.base.AVLTreeElement< K, E >:
bridges.base.BSTElement< K, E > bridges.base.BinTreeElement< E > bridges.base.TreeElement< E > bridges.base.Element< E > bridges.base.DataStruct

Public Member Functions

 AVLTreeElement ()
 
 AVLTreeElement (K k, E e)
 
String getDataStructType ()
 
int getHeight ()
 
void setHeight (int h)
 
int getBalanceFactor ()
 
void setBalanceFactor (int bf)
 
AVLTreeElement< K, E > getLeft ()
 
AVLTreeElement< K, E > getRight ()
 
- Public Member Functions inherited from bridges.base.BSTElement< K, E >
 BSTElement ()
 
 BSTElement (E e, BSTElement< K, E > left, BSTElement< K, E > right)
 
 BSTElement (K key, E e, BSTElement< K, E > left, BSTElement< K, E > right)
 
 BSTElement (E e)
 
String getDataStructType ()
 
 BSTElement (K key, E e)
 
 BSTElement (String label, E e)
 
 BSTElement (String label, K key, E e)
 
 BSTElement (BSTElement< K, E > left, BSTElement< K, E > right)
 
getKey ()
 
void setKey (K key)
 
BSTElement< K, E > getLeft ()
 
BSTElement< K, E > getRight ()
 
- Public Member Functions inherited from bridges.base.BinTreeElement< E >
 BinTreeElement ()
 
 BinTreeElement (E e)
 
 BinTreeElement (String label, E e)
 
 BinTreeElement (BinTreeElement< E > left, BinTreeElement< E > right)
 
 BinTreeElement (E e, BinTreeElement< E > left, BinTreeElement< E > right)
 
String getDataStructType ()
 
BinTreeElement< E > getLeft ()
 
void setLeft (BinTreeElement< E > left)
 
BinTreeElement< E > getRight ()
 
void setRight (BinTreeElement< E > right)
 
- Public Member Functions inherited from bridges.base.TreeElement< E >
 TreeElement ()
 
 TreeElement (E e)
 
 TreeElement (String label, E e)
 
 TreeElement (TreeElement< E > left, TreeElement< E > right)
 
 TreeElement (E e, TreeElement< E > left, TreeElement< E > right)
 
String getDataStructType ()
 
void addChild (TreeElement< E > child)
 
int getNumberOfChildren ()
 
void setChild (int index, TreeElement< E > child)
 
TreeElement< E > getChild (int index)
 
- Public Member Functions inherited from bridges.base.Element< E >
 Element ()
 
 Element (E val)
 
 Element (String label, E val)
 
 Element (Element< E > original)
 
String getIdentifier ()
 
ElementVisualizer getVisualizer ()
 
void setVisualizer (ElementVisualizer visualizer)
 
LinkVisualizer getLinkVisualizer (Element< E > el)
 
String getClassName ()
 
int compareTo (Element< E > e1)
 
boolean equals (Element< E > e1)
 
String getRepresentation ()
 
String getLabel ()
 
void setLabel (String label)
 
String arrangeLabel (String label, int wordNumber)
 
getValue ()
 
void setValue (E value)
 
String toString ()
 

Additional Inherited Members

- Protected Member Functions inherited from bridges.base.Element< E >
String getDataStructType ()
 
void validateVal (E value)
 
- Protected Member Functions inherited from bridges.base.DataStruct
abstract String getDataStructType ()
 
- Protected Attributes inherited from bridges.base.DataStruct
String QUOTE = "\""
 

Detailed Description

This class extends the BSTElement class for use in building AVL trees. AVL tree elements include a 'height' and a 'balFactor' value, representing the height and balance factor of the AVL tree at that node, respectively. This is useful in representing AVL trees.

Generic paramaters: K - key value, E - appl dependent data component

Author
Kalpathi Subramanian
Date
8/8/16

Constructor & Destructor Documentation

Construct an AVLTreeElement with default values

bridges.base.AVLTreeElement< K, E >.AVLTreeElement ( k,
e 
)

Construct an AVLTreeElement holding a key value "k" and an object "e"

Parameters
kthe search key
ethe appl specific object that Element is holding

Member Function Documentation

int bridges.base.AVLTreeElement< K, E >.getBalanceFactor ( )

This method returns the balance factor of the tree at this node

Returns
balance factor
String bridges.base.AVLTreeElement< K, E >.getDataStructType ( )

This method gets the data structure type

Returns
The date structure type as a string
int bridges.base.AVLTreeElement< K, E >.getHeight ( )

This method returns the height of the tree at this node

Returns
height
AVLTreeElement<K, E> bridges.base.AVLTreeElement< K, E >.getLeft ( )

This method returns the left child of the tree node

Returns
the left child of this node
AVLTreeElement<K, E> bridges.base.AVLTreeElement< K, E >.getRight ( )

This method returns the right child of tree node

Returns
the right child of this node
void bridges.base.AVLTreeElement< K, E >.setBalanceFactor ( int  bf)

This method sets the balance factor of the tree at this node

Parameters
balancefactor bf
void bridges.base.AVLTreeElement< K, E >.setHeight ( int  h)

This method sets the height of the tree at this node

Parameters
heighth

The documentation for this class was generated from the following file: