TrieDictionary
November 15, 2020 ยท View on GitHub
Implements: IDictionary<string, T> IReadOnlyDictionary<string, T>
Represents a dictionary in which the key/value coupling is implemented via a Trie.
Constructors
TrieDictionary() Initializes a new instance of TrieDictionary
TrieDictionary(IEnumerable<KeyValuePair<string, T>> collection) Initializes a new instance of TrieDictionary
Properties
int Count Gets the number of elements in the TrieDictionary
ICollection<string> Keys Gets an ICollection containing the keys of the TrieDictionary
ICollection<T> Values Gets an ICollection
T this[string key] Gets or sets the element with the specified key.
Methods
void Add(string key, T value) Adds a key/value pair to the TrieDictionary
void Add(KeyValuePair<string, T> item) Adds a key/value pair to the TrieDictionary
void AddAll(IEnumerable<KeyValuePair<string, T>> collection) Adds a collection of key/value pairs to the TrieDictionary
void Clear() Removes all elements from the TrieDictionary
bool Contains(KeyValuePair<string, T> item) Determines whether the TrieDictionary
bool ContainsAll(IEnumerable<KeyValuePair<string, T>> collection) Determines whether the TrieDictionary
void CopyTo(KeyValuePair<string, T>[] array, int arrayIndex) Copies the key/value pairs of the TrieDictionary
bool Remove(KeyValuePair<string, T> item) Removes a specific key/value pair from the TrieDictionary
bool ContainsKey(string key) Determines whether the TrieDictionary
KeyValuePair<string, T>[] GetWithPrefix(string prefix) Gets the key/value pairs stored in the TrieDictionary
bool Remove(string key) Removes a specific key from the TrieDictionary
bool TryGetValue(string key, out T value) Gets the value associated with the specified key. Complexity: O(L)