| java.lang.Object prefuse.data.search.Trie
Trie | public class Trie (Code) | | A trie data structure for fast-lookup of words based on their
prefixes. The name "Trie" is a play on the words "tree" and
"retrieval". This class builds a tree structure representing a set of
words by their prefixes. It is useful for performing prefix-based
searches over large amounts of text in an efficient manner.
version: 1.0 author: jeffrey heer See Also: PrefixSearchTupleSet |
Inner Class :public class TrieNode | |
Inner Class :public class TrieBranch extends TrieNode | |
Inner Class :public class TrieLeaf extends TrieNode | |
Inner Class :public class TrieIterator implements Iterator | |
Constructor Summary | |
public | Trie(boolean caseSensitive) Create a new Trie with the specified case-sensitivity. |
Method Summary | |
public void | addString(String word, Tuple t) Add a new word to the trie, associated with the given Tuple. | public TrieNode | find(String word) Look up the given word in this Trie. | public boolean | isCaseSensitive() Indicates if this Trie's index takes the case of letters
into account. | public void | removeString(String word, Tuple t) Remove a word/Tuple pair from the trie. |
Trie | public Trie(boolean caseSensitive)(Code) | | Create a new Trie with the specified case-sensitivity.
Parameters: caseSensitive - true if the index should be case sensitive forindexed words, false otherwise. |
addString | public void addString(String word, Tuple t)(Code) | | Add a new word to the trie, associated with the given Tuple.
Parameters: word - the word to add to the Trie Parameters: t - the Tuple associated with the word |
find | public TrieNode find(String word)(Code) | | Look up the given word in this Trie. If a match is found, a TrieNode
is returned. This node is the root of a subtree containing all the
matches to the query.
Parameters: word - the word to lookup the TrieNode root of the subtree containing all matches. Anull value is returned if no match is found. |
isCaseSensitive | public boolean isCaseSensitive()(Code) | | Indicates if this Trie's index takes the case of letters
into account.
true if the index is case-sensitive, false otherwise |
removeString | public void removeString(String word, Tuple t)(Code) | | Remove a word/Tuple pair from the trie.
Parameters: word - the word to remove Parameters: t - the associate Tuple to remove |
|
|