Class SuchBaum

java.lang.Object
  extended by VerweisBaum
      extended by SuchBaum
All Implemented Interfaces:
Baum, Menge
Direct Known Subclasses:
AVLBaum

public class SuchBaum
extends VerweisBaum
implements Menge

Implementation eines binaeren Suchbaums ueber Comparable-Objekten. Bereitgestellt werden die im Interface Menge angekuendigten Methoden lookup, insert und delete als oeffentliche Methoden. Die Methode delete verwendet zusaetzlich noch die private Methode findMax.


Field Summary
 
Fields inherited from class VerweisBaum
wurzel
 
Constructor Summary
SuchBaum()
           
 
Method Summary
 boolean delete(java.lang.Comparable x)
           
private  Knoten findMax(Knoten t)
           
 boolean insert(java.lang.Comparable x)
           
 java.lang.Comparable lookup(java.lang.Comparable x)
           
 
Methods inherited from class VerweisBaum
empty, left, right, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuchBaum

public SuchBaum()
Method Detail

lookup

public java.lang.Comparable lookup(java.lang.Comparable x)
Specified by:
lookup in interface Menge

insert

public boolean insert(java.lang.Comparable x)
Specified by:
insert in interface Menge

delete

public boolean delete(java.lang.Comparable x)
Specified by:
delete in interface Menge

findMax

private Knoten findMax(Knoten t)