AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
aud.BinarySearchTree.Node Class Reference

Node in a BinarySearchTree. More...

+ Inheritance diagram for aud.BinarySearchTree.Node:
+ Collaboration diagram for aud.BinarySearchTree.Node:

Public Member Functions

Key getKey ()
 get key (short for getData().getKey()) More...
 
Value getValue ()
 get value (short for getData().getValue()) More...
 
void setValue (Value value)
 set value (short for getData().setValue(value)) More...
 
GraphvizDecorator getDecorator ()
 
- Public Member Functions inherited from aud.BinaryTree< Entry >
 BinaryTree (T data)
 create new root node without children More...
 
 BinaryTree (T data, BinaryTree< T > left, BinaryTree< T > right)
 create new root node with children More...
 
BinaryTree< T > setLeft (BinaryTree< T > tree)
 set left subtree More...
 
BinaryTree< T > setRight (BinaryTree< T > tree)
 set right subtree More...
 
void setData (T data)
 set node data More...
 
getData ()
 get node data More...
 
BinaryTree< T > getParent ()
 get node's parent or null for root More...
 
BinaryTree< T > getLeft ()
 get left child or null
More...
 
BinaryTree< T > getRight ()
 get right child or null) More...
 
boolean isRoot ()
 Iscode this} root? More...
 
boolean isLeaf ()
 Is this a leaf? More...
 
BinaryTree< T > getRoot ()
 traverse upwards to find root node More...
 
BinaryTreeTraversal< T >.Preorder preorder ()
 Get preorder iterator over nodes in tree . More...
 
BinaryTreeTraversal< T >.Inorder inorder ()
 Get inorder iterator over nodes in tree . More...
 
BinaryTreeTraversal< T >.Postorder postorder ()
 Get postorder iterator over nodes in tree . More...
 
BinaryTreeTraversal< T >.Levelorder levelorder ()
 Get level-order iterator over nodes in tree . More...
 
String toString ()
 Get string presentation of node data. More...
 
GraphvizDecorator getDecorator ()
 get decoration or null
More...
 
String toDot ()
 Get dot representation. More...
 
String toText ()
 get multiline text visualization More...
 
String toTikZ ()
 get TikZ code for LaTeX export More...
 

Additional Inherited Members

- Static Public Member Functions inherited from aud.BinaryTree< Entry >
static void main (String[] args)
 
- Protected Member Functions inherited from aud.BinaryTree< Entry >
String dotLabel ()
 
String textLabel ()
 Get string representation of data in toText. More...
 
String toTikZ (int level)
 
String tikzNodeStyle ()
 

Detailed Description

Node in a BinarySearchTree.

The reference to tree is not really required and provided only for convenience (visualization).

Definition at line 174 of file BinarySearchTree.java.

Member Function Documentation

◆ getDecorator()

GraphvizDecorator aud.BinarySearchTree.Node.getDecorator ( )

Definition at line 191 of file BinarySearchTree.java.

191 {
192 return tree_.getDecorator();
193 }

◆ getKey()

Key aud.BinarySearchTree.Node.getKey ( )

get key (short for getData().getKey())

Definition at line 185 of file BinarySearchTree.java.

185{ return getData().getKey(); }
T getData()
get node data
Definition: BinaryTree.java:81

References aud.BinaryTree< Entry >.getData().

+ Here is the call graph for this function:

◆ getValue()

Value aud.BinarySearchTree.Node.getValue ( )

get value (short for getData().getValue())

Definition at line 187 of file BinarySearchTree.java.

187{ return getData().getValue(); }

References aud.BinaryTree< Entry >.getData().

+ Here is the call graph for this function:

◆ setValue()

void aud.BinarySearchTree.Node.setValue ( Value  value)

set value (short for getData().setValue(value))

Definition at line 189 of file BinarySearchTree.java.

189{ getData().setValue(value); }

References aud.BinaryTree< Entry >.getData().

+ Here is the call graph for this function:

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