|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TrieNode
Define the behaviors of a node in a trie.
| Method Summary | |
|---|---|
int |
compareKey(java.lang.CharSequence aKey)
Compare a string to this node's key. |
TrieNode |
createChild(int index)
Create a new child node at the specified array index. |
TrieNode[] |
createChildren()
Allocate memory for a node's child node array. |
TrieNode[] |
getChildren()
Return a node's child node array. |
int |
getDegree()
Return the degree of this trie (size of the trie's alphabet). |
int |
getIndex(char c)
Return the index of a character in this node's child array. |
int |
getIndex(char[] key)
|
int |
getIndex(java.lang.CharSequence key)
|
char[] |
getKey()
Return a node's key. |
java.lang.String |
getKeyString()
|
TrieNode |
getParent()
|
java.lang.Object |
getValue()
Return a node's attached value. |
boolean |
isCaseSensitive()
|
void |
printIndexMapping()
|
void |
removeChild(int index)
|
void |
removeChildren()
|
void |
setKey(char[] k)
Set a node's key. |
void |
setParent(TrieNode parent)
|
void |
setValue(java.lang.Object obj)
Attach a value to the node. |
java.lang.String |
supportedCharacters()
Return supported characters by this TrieNode. |
| Method Detail |
|---|
int getIndex(char c)
c - the character of interest.
int getIndex(char[] key)
int getIndex(java.lang.CharSequence key)
int getDegree()
java.lang.Object getValue()
void setValue(java.lang.Object obj)
obj - the value.char[] getKey()
java.lang.String getKeyString()
void setKey(char[] k)
k - the key.TrieNode[] getChildren()
TrieNode getParent()
void setParent(TrieNode parent)
TrieNode[] createChildren()
TrieNode createChild(int index)
index - the position in the array for the child node.
void removeChild(int index)
void removeChildren()
int compareKey(java.lang.CharSequence aKey)
aKey - the string to be compared.
= 0, complete match; > 0, the string is a superset of the key; < 0, matched portion is a subset of the key. The absolute value of the return value is the number of characters matched, if return != 0.
java.lang.String supportedCharacters()
void printIndexMapping()
boolean isCaseSensitive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||