public class TrieStructure extends Object
Constructor and Description |
---|
TrieStructure() |
Modifier and Type | Method and Description |
---|---|
void |
addWord(String aWord)
Adds a word to the tree.
|
static TrieStructure |
createForDict(Dictionary aDict)
Creates a Trie object for a SimpleDictionary
|
static TrieStructure |
createForDictReverse(Dictionary aDict)
Creates a Trie object for a SimpleDictionary with all words reversed
|
KeyValueNode<String,Integer> |
findWord(String aWord)
Finds a not with a given string.
|
Integer |
getSuccessors(String aWord)
Returns the number of successor for a node.
|
public void addWord(String aWord)
public KeyValueNode<String,Integer> findWord(String aWord)
public Integer getSuccessors(String aWord)
public static TrieStructure createForDict(Dictionary aDict)
public static TrieStructure createForDictReverse(Dictionary aDict)
Copyright © 2011–2015. All rights reserved.