public class TrieNode
extends java.lang.Object
History:
Constructor and Description |
---|
TrieNode()
Create an object of trie node (default).
|
TrieNode(char key,
int level)
Create an object of trie node, using key and level for the node.
|
TrieNode(char key,
int level,
java.util.Vector<InflectionRule> rule,
java.util.Vector<TrieNode> child)
Create an object of trie node, using key, level, rules and child of the
node.
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector<TrieNode> |
GetChild()
Get the child of the current node.
|
char |
GetKey()
Get the key of the current node.
|
int |
GetLevel()
Get the level of the current node.
|
java.util.Vector<InflectionRule> |
GetRules()
Get rules of the current node.
|
static void |
main(java.lang.String[] args)
A test driver for this class.
|
void |
PrintNode()
Print out the detail information of a trie node.
|
void |
SetChild(java.util.Vector<TrieNode> child)
Set the child of the current node.
|
void |
SetRules(java.util.Vector<InflectionRule> rules)
Set rules of the current node.
|
public TrieNode()
public TrieNode(char key, int level)
key
- key of current tree nodelevel
- level of current tree nodepublic TrieNode(char key, int level, java.util.Vector<InflectionRule> rule, java.util.Vector<TrieNode> child)
key
- key of current tree nodelevel
- level of current tree noderule
- a vector of InflectionRule - rule of current nodechild
- a vector of TrieNode - child of current nodepublic void SetChild(java.util.Vector<TrieNode> child)
child
- the child of the current nodepublic void SetRules(java.util.Vector<InflectionRule> rules)
rules
- rules of the current nodepublic java.util.Vector<InflectionRule> GetRules()
public java.util.Vector<TrieNode> GetChild()
public char GetKey()
public int GetLevel()
public void PrintNode()
public static void main(java.lang.String[] args)
args
- arguments