FileDocCategorySizeDatePackage
TernarySearchTree3.javaAPI DocExample4095Wed Jun 09 17:52:46 BST 1999tuning.struct

TernarySearchTree3

public class TernarySearchTree3 extends Object

Fields Summary
TernarySearchTreeNode3
root
char[]
buff
Constructors Summary
public TernarySearchTree3()

        buff = new char[5000];
    
Methods Summary
public static voiddummy()

TernarySearchTreeNode3.dummy();
public java.lang.Objectget(java.lang.String s)

        if(root == null)
        {
            return null;
        }
        else
        {
            s.getChars(0, s.length(), buff, 0);
            return root.search(buff, 0, s.length() - 1);
        }
    
public java.lang.Objectput(java.lang.String s, java.lang.Object obj)

        s.getChars(0, s.length(), buff, 0);
        if(root == null)
            root = TernarySearchTreeNode3.newNode(buff[0]);
        return root.insert(buff, 0, s.length() - 1, obj);
    
public voidrelease()

        if(root != null)
        {
            root.clean();
            root = null;
        }