public class RTrieTree
extends java.lang.Object
History:
Constructor and Description |
---|
RTrieTree()
Create an object of trie tree (default).
|
RTrieTree(java.lang.String fName)
Create an object of trie tree by specifying pattern rule file anme.
|
Modifier and Type | Method and Description |
---|---|
boolean |
FindPattern(java.lang.String term)
Find if there is a matched pattern in the term to the reverse trie tree.
|
java.lang.String |
GetFoundRule()
Get the detail information (rule) of found pattern
|
void |
LoadRTrieTreeFromFile(java.lang.String fName)
Read in removeS trie rules from a specified file.
|
static void |
main(java.lang.String[] args)
A test driver for this class.
|
void |
PrintRTrieTree(RTrieNode node)
Print the detail informatin of reverse trie tree
|
public RTrieTree()
public RTrieTree(java.lang.String fName)
fName
- the file name of the removeS pattern trie rule filepublic void LoadRTrieTreeFromFile(java.lang.String fName)
fName
- the file name of the removeS pattern trie rule filepublic boolean FindPattern(java.lang.String term)
term
- a string is used to find nodes with matching patternpublic void PrintRTrieTree(RTrieNode node)
node
- The top node fo the trie tree to be printedpublic java.lang.String GetFoundRule()
public static void main(java.lang.String[] args)
args
- arguments