comp • gb.data • trieprefix

TriePrefix (gb.data)

This class provides a read-only view of part of a Trie. It lets you examine keys with a common prefix.

This class is not creatable.
This class acts like a
Look up a key relative to the prefix.
read-only
array.
This class is
Iterate through all keys in the prefix range, in lexicographic order.
enumerable
with the FOR EACH keyword.

Properties

Methods
Return the relative key of the last enumerated object.
Key  
Return the prefix string of this object.
Prefix  
Add bytes to the prefix. If the extended prefix does not exist within the Trie, an error is raised.
Add  
Return if the given key exists relative to the prefix. This returns the same as hTrie.Exist(hTriePrefix.Prefix & RelKey).
Exist  
Remove bytes from the end of the prefix.
Remove  

Searches begin in the middle of the Trie and are thus faster (compared to repeated lookups under the same prefix).

TriePrefix objects are invalidated when you change the Trie, so be careful if you store them persistently.