Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Properties | Protected Member Functions | List of all members
Loyc.Collections.CPStringTrie< TValue >.Enumerator Class Reference

Enumerates key-value pairs in a CPStringTrie. More...


Source file:
Inheritance diagram for Loyc.Collections.CPStringTrie< TValue >.Enumerator:
Loyc.Collections.CPStringTrie< TValue > Loyc.Collections.CPStringTrie< TValue > Loyc.Collections.CPTrie< T > Loyc.Collections.CPTrie< T >

Remarks

Enumerates key-value pairs in a CPStringTrie.

Reading the key is more expensive than reading the value because the key must be decoded from the bytes it is made up of. If you call CurrentValue instead of Current or CurrentKey, the work of decoding the key will be avoided. If you only need to enumerate the values, enumerate the Values collection instead of the trie class itself.

Properties

new KeyValuePair< string, TValue > Current [get]
 
new TValue CurrentValue [get]
 
new string CurrentKey [get]
 
- Properties inherited from Loyc.Collections.CPStringTrie< TValue >
TValue this[string key, TValue defaultValue] [get]
 
TValue this[string key] [get, set]
 
KeyCollection Keys [get]
 
CPValueCollection< TValue > Values [get]
 
new int Count [get]
 
bool IsReadOnly [get]
 
bool IsEmpty [get]
 

Protected Member Functions

 Enumerator (CPTrie< TValue > trie)
 
- Protected Member Functions inherited from Loyc.Collections.CPTrie< T >
bool Find (ref KeyWalker key, CPEnumerator< T > e)
 
bool Find (ref KeyWalker key, ref T value)
 Retrieves the value associated with the specified key; does nothing if the key does not exist. More...
 
bool ContainsKey (ref KeyWalker key)
 
bool Set (ref KeyWalker key, ref T value, CPMode mode)
 Associates the specified value with the specified key. More...
 
bool Remove (ref KeyWalker key, ref T value)
 Removes the specified key and associated value. More...
 
bool Remove (ref KeyWalker key)
 
void Clear ()
 
int CountMemoryUsage (int sizeOfT)
 Calculates the memory usage of this object, assuming a 32-bit architecture. More...
 

Additional Inherited Members

- Public Member Functions inherited from Loyc.Collections.CPStringTrie< TValue >
 CPStringTrie (CPStringTrie< TValue > clone)
 
new int CountMemoryUsage (int sizeOfT)
 
void Add (string key, TValue value)
 
bool TryAdd (string key, TValue value)
 Adds the specified key-value pair only if the specified key is not already present in the trie. More...
 
bool TryAdd (string key, ref TValue value)
 Adds the specified key-value pair only if the specified key is not already present in the trie. More...
 
bool ContainsKey (string key)
 
bool Remove (string key)
 
bool Remove (string key, ref TValue value)
 
bool TryGetValue (string key, out TValue value)
 
void Add (KeyValuePair< string, TValue > item)
 
new void Clear ()
 
bool Contains (KeyValuePair< string, TValue > item)
 
void CopyTo (KeyValuePair< string, TValue >[] array, int arrayIndex)
 
bool Remove (KeyValuePair< string, TValue > item)
 
Enumerator GetEnumerator ()
 
Enumerator FindAtLeast (string key)
 
Enumerator FindExact (string key)
 
bool Find (string key, out Enumerator e)
 
CPStringTrie< TValue > Clone ()
 
- Public Member Functions inherited from Loyc.Collections.CPTrie< T >
 CPTrie (CPTrie< T > copy)
 
- Static Protected Member Functions inherited from Loyc.Collections.CPTrie< T >
static StringBuilder BytesToStringBuilder (byte[] key, int keyLength)
 
- Protected static fields inherited from Loyc.Collections.CPTrie< T >
static Comparer< T > DefaultComparer = Comparer<T>.Default