Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSCommon > RSGenerics.Collections > Classes

TRSStringHashTable<TValue> Class

Scroll Prev Top Next More

Provides a hash table or dictionary where the keys are strings. This class mimics the TGStringHashTable class using the TRSDictionary<TKey,TValue> generic collection, allowing an easier transition for old code.


You can copy this class (at least the keys) to and from a TStrings object by using the Assign method.


For a small numbers of items, this class may be slower than a TStringList because its retrieval time constant is larger. It also consumes more memory than a TStringList.

Namespace: RSGenerics.Collections

Type Parameters


 (Overrides RSGenerics.Collections.TRSDictionary<TKey,TValue>.KeyNotify(TKey,TCollectionNotification).)

public method


Stores the Value defined type at the specified hash key. It returns the old value at that hash key if there was one. (Inherited from RSGenerics.Collections.TRSHashTable<TKey,TValue>.)

public method


Remove key-value pair.

Remove removes the given key and its associated value from the dictionary. No exception is thrown if the key is not in the dictionary. This is an O(1) operation.

An     OnKeyNotify event and an     OnValueNotify event occur indicating an entry was removed from the dictionary.

public method


Returns the content of the dictionary as an array.
 (Overrides RSGenerics.Collections.TRSEnumerable<T>.ToArray.)

protected method


Converts the enumerable container's items into an equivalent TArray of items. (Inherited from RSGenerics.Collections.TRSEnumerable<T>.)

public method


Reduce capacity to current number of entries.

TrimExcess changes the capacity to the number of dictionary entries, held in Count.

This method rehashes the internal hash table to save space. This is only useful after a lot of items have been deleted from the dictionary.

public method


Try to get value for key.

TryGetValue returns true if the given key is in the dictionary and provides its value in Value. Otherwise, it returns false and Value is set to the default value type of TValue. No exception is raised if the key is not in the dictionary. This is an O(1) operation.

protected method


Triggers an     OnValueNotify event with the given parameters.

Call ValueNotify to trigger an OnValueNotify event with the given parameters.

The meaning of the parameters is given in the following table:


The Value that is added, removed or extracted.


The action that the Value undergoes, which is of type TCollectionNotification.


RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb