uk.ac.sanger.psu.gfmerge.util.algotools._old
Class SearchTree

java.lang.Object
  |
  +--uk.ac.sanger.psu.gfmerge.util.algotools._old.Tree
        |
        +--uk.ac.sanger.psu.gfmerge.util.algotools._old.SearchTree

public class SearchTree
extends Tree

implementation of binary search tree over comparable objects


Field Summary
 
Fields inherited from class uk.ac.sanger.psu.gfmerge.util.algotools._old.Tree
EMPTY
 
Constructor Summary
SearchTree()
           
 
Method Summary
 boolean delete(java.lang.Comparable x)
          deletes x in search tree: returns true, if successfully deleted, otherwise false
 boolean insert(java.lang.Comparable x, java.lang.Object f)
          adds x in search tree: returns true, if successful, otherwise false
 java.lang.Comparable lookup(java.lang.Comparable x)
          Search for x in search tree: returns null, if nothing was found otherwise comparable-object x
 
Methods inherited from class uk.ac.sanger.psu.gfmerge.util.algotools._old.Tree
empty, features, left, right, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchTree

public SearchTree()
Method Detail

lookup

public java.lang.Comparable lookup(java.lang.Comparable x)
Search for x in search tree: returns null, if nothing was found otherwise comparable-object x


insert

public boolean insert(java.lang.Comparable x,
                      java.lang.Object f)
adds x in search tree: returns true, if successful, otherwise false


delete

public boolean delete(java.lang.Comparable x)
deletes x in search tree: returns true, if successfully deleted, otherwise false