TernarySearchTree1public class TernarySearchTree1 extends Object
Fields Summary |
---|
TernarySearchTreeNode1 | root | char[] | buff |
Methods Summary |
---|
public java.lang.Object | get(java.lang.String key)
key.getChars(0, key.length(), buff, 0);
return TernarySearchTreeNode1.search(root, buff, 0, key.length()-1);
| public java.lang.Object | put(java.lang.String key, java.lang.Object value)
key.getChars(0, key.length(), buff, 0);
root = TernarySearchTreeNode1.insert(root, buff, 0, key.length()-1, value);
return null; //fake it for now
| public void | release()if (root != null) {root.clean(); root = null;}
|
|