Свойство | Тип | Описание | |
---|---|---|---|
_isCaseSensitive | bool | ||
_rootNode |
Метод | Описание | |
---|---|---|
Add ( String item ) : void |
Add an additional word to the collection of words represented by the Trie
|
|
Contains ( String item ) : bool |
Searches for a node that corresponds to the requires item. If such a node is found in the Trie - returns true.
|
|
GetCompletionList ( String prefix ) : List |
Returns all words contained in the Trie that match the prefix
|
|
GetCompletionList ( String prefix, int completionSetCount ) : List |
Returns the requested amount of words contained in the Trie that match the prefix. Note that there is no specific order for the returned words.
|
|
Trie ( ) : System |
Trie Consructor
|
|
Trie ( bool isCaseSensitive ) : System |
Trie Consructor
|
Метод | Описание | |
---|---|---|
AddRecursive ( |
Performs the actual recursive insertion of the characters in the item into the Trie nodes
|
|
FindPrefixRecursive ( |
Performs the actual recursive lookup of the characters in the item
|
|
GetCompletionsRecursive ( |
Performs the actual lookup for the all words contained in the subtree.
|
protected AddRecursive ( |
||
node | ||
item | String | |
index | int | |
Результат | void |
public Contains ( String item ) : bool | ||
item | String | a string to search for in the Trie |
Результат | bool |
protected FindPrefixRecursive ( |
||
node | node to search for matches | |
item | string | string to be looked-up |
Результат |
public GetCompletionList ( String prefix ) : List |
||
prefix | String | |
Результат | List |
public GetCompletionList ( String prefix, int completionSetCount ) : List |
||
prefix | String | |
completionSetCount | int | maximum number of words to return |
Результат | List |
protected GetCompletionsRecursive ( |
||
node | root node of a subtree to look for contained words | |
wordBuilder | StringBuilder | a StringBuilder to perform fast character appending |
completionSetCount | int | maximum number of words to return |
completions | List |
A list to contain all the words that are found |
Результат | void |
public Trie ( bool isCaseSensitive ) : System | ||
isCaseSensitive | bool | true - if case sensitivity is required from the Trie |
Результат | System |