TernarySearchTree3public class TernarySearchTree3 extends Object
Fields Summary |
---|
TernarySearchTreeNode3 | root | char[] | buff |
Constructors Summary |
---|
public TernarySearchTree3()
buff = new char[5000];
|
Methods Summary |
---|
public static void | dummy()TernarySearchTreeNode3.dummy();
| public java.lang.Object | get(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.Object | put(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 void | release()
if(root != null)
{
root.clean();
root = null;
}
|
|