org.jutil.collections
Class TernarySearchTree
java.lang.Object
org.jutil.collections.TernarySearchTree
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable
public class TernarySearchTree
- extends java.lang.Object
- implements java.io.Externalizable
This is the interface that an object store implements.
- See Also:
- Serialized Form
|
Method Summary |
static int |
compareCharsAlphabetically(char cCompare,
char cRef)
Returns an int value that is negative if cCompare comes before cRef in the alphabet, zero if
the two are equal, and positive if cCompare comes after cRef in the alphabet. |
protected java.lang.String |
encodeKey(java.lang.String key)
|
java.lang.Object |
get(java.lang.String key)
|
java.lang.Object |
put(java.lang.String key,
java.lang.Object object)
|
void |
readExternal(java.io.ObjectInput in)
|
protected TernarySearchTreeNode |
readNode(java.lang.String key,
boolean create)
|
java.lang.Object |
remove(java.lang.String key)
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rootNode
protected TernarySearchTreeNode rootNode
TernarySearchTree
public TernarySearchTree()
put
public java.lang.Object put(java.lang.String key,
java.lang.Object object)
remove
public java.lang.Object remove(java.lang.String key)
get
public java.lang.Object get(java.lang.String key)
readNode
protected TernarySearchTreeNode readNode(java.lang.String key,
boolean create)
encodeKey
protected java.lang.String encodeKey(java.lang.String key)
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
compareCharsAlphabetically
public static int compareCharsAlphabetically(char cCompare,
char cRef)
- Returns an int value that is negative if cCompare comes before cRef in the alphabet, zero if
the two are equal, and positive if cCompare comes after cRef in the alphabet.