Class Trie
Trie-based dictionary (associative array) that can use any type as a key. No hash functions are required.
class Trie(T, K)
;
Methods
Name | Description |
---|---|
clear
()
|
Remove all elements. |
free
()
|
Trie must be manually freed when it's no longer needed. |
get
(k)
|
Get value by key. Returns null if the element does not exist in trie. |
opBinaryRight
(k)
|
|
opIndex
(k)
|
Get value by key. It's an error to access non-existing key. |
opIndexAssign
(v, k)
|
Set value by key |
remove
(k)
|
Remove element by key. |
set
(k, v)
|
Set value by key. |