[This is preliminary documentation and is subject to change.]
Specialized data structure for partial-matching of large sparse sets of words.
Used as a searchable index of players for PlayerDB.
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.3.1 (0.6.3.1)
Syntax
| C# |
public class Trie<T> : IDictionary<string, T>, ICollection<KeyValuePair<string, T>>, IEnumerable<KeyValuePair<string, T>>, IDictionary, ICollection, IEnumerable, ICloneable where T : class
Type Parameters
- T
- Payload type (reference types only).
Members
| All Members | Constructors | Properties | Methods |
| Member | Description | |
|---|---|---|
| Trie<(Of <(<'T>)>)>()()()() | Creates a new empty trie. | |
| Trie<(Of <(<'T>)>)>(IEnumerable<(Of <<'(KeyValuePair<(Of <<'(String, T>)>>)>)>>)) | Creates a new trie from an existing dictionary. Values are shallowly copied. | |
| Add(KeyValuePair<(Of <<'(String, T>)>>)) | ||
| Add(String, T) | Adds a new object by key. If an entry for this key already exists, it is NOT overwritten. | |
| Add(String, T, Boolean) | Adds a new object by key. | |
| CanonicizeChar(Char) | ||
| CanonicizeKey(String) | ||
| CharToCode(Char) | ||
| Clear()()()() | Removes all keys/values from the trie, making it empty. | |
| Clone()()()() | ||
| CodeToChar(Int32) | ||
| Contains(KeyValuePair<(Of <<'(String, T>)>>)) | ||
| ContainsKey(String) | Checks whether the trie contains a given full key. | |
| ContainsValue(T) | Checks whether the trie contains a given value.
This method uses the value enumerator and runs in O(n). | |
| CopyTo(Array, Int32) | ||
| CopyTo(array<KeyValuePair<(Of <<'(String, T>)>>)>[]()[][], Int32) | ||
| Count | ||
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| Get(String) | Get payload for an exact key (no autocompletion). | |
| GetEnumerator()()()() | ||
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetList(String, Int32) | Finds a list of payloads with keys that start with keyPart, up to a specified limit. Autocompletes. | |
| GetOneMatch(String, T%) | Searches for payloads with keys that start with keyPart, returning just one or none of the matches. | |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| IsFixedSize | ||
| IsReadOnly | ||
| IsSynchronized | ||
| Item[([( String])]) | ||
| JoinToString<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Joins all items in a collection into one comma-separated string.
If the items are not strings, .ToString() is called on them. (Inherited from EnumerableUtil.) | |
| JoinToString<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), String) | Joins all items in a collection into one string separated with the given separator.
If the items are not strings, .ToString() is called on them. (Inherited from EnumerableUtil.) | |
| JoinToString<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Func<(Of <<'(T, String>)>>)) | Joins all items in a collection into one string separated with the given separator.
A specified string conversion function is called on each item before contactenation. (Inherited from EnumerableUtil.) | |
| JoinToString<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), String, Func<(Of <<'(T, String>)>>)) | Joins all items in a collection into one string separated with the given separator.
A specified string conversion function is called on each item before contactenation. (Inherited from EnumerableUtil.) | |
| Keys | ||
| KeysStartingWith(String) | Finds a subset of keys that start with a given prefix. | |
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| Remove(KeyValuePair<(Of <<'(String, T>)>>)) | ||
| Remove(String) | Removes an entry by key. | |
| StartingWith(String) | Finds a subset of key/value pairs that start with a given prefix. | |
| SyncRoot | ||
| ToString()()()() | (Inherited from Object.) | |
| TryGetValue(String, T%) | Tries to get a value by full key. | |
| Values | ||
| ValuesStartingWith(String) | Finds a subset of values whose keys start with a given prefix. |