TDictionary<TKey,TValue> Class

Represents a collection of keys and values.

Namespace: Spring.Collections.Dictionaries
TInterfacedObject
  Spring.TInterfacedObjectEx
    Spring.Collections.Base.TEnumerableBase
      Spring.Collections.Base.TEnumerableBase<T>
        Spring.Collections.Base.TCollectionBase<T>
          Spring.Collections.Base.TMapBase<TKey,T>
            Spring.Collections.Dictionaries.TDictionary<TKey,TValue>
              Spring.Collections.Dictionaries.TContainedDictionary<TKey,TValue>
type
 TDictionary<TKey, TValue> = class(TMapBase<TKey, TValue>,
 IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>)
 end;

Type Parameters

TKey
The type of the keys in the dictionary.
TValue
The type of the values in the dictionary.

The TDictionary<TKey,TValue> type exposes the following members.

Show:
 NameDescription
Create

Overloaded. Initializes a new instance of the TDictionary<TKey,TValue> class. (Overrides TMapBase<TKey,T>.Create.)

Create(IComparer)

Overloaded. Initializes a new instance of the TEnumerableBase<T> class. (Inherited from TEnumerableBase<T>.)

Create(IEnumerable<T>)

Overloaded. Initializes a new instance of the TCollectionBase<T> class. (Inherited from TCollectionBase<T>.)

Create(IEqualityComparer)

Overloaded. Initializes a new instance of the TDictionary<TKey,TValue> class.

Create(Integer)

Overloaded. Initializes a new instance of the TDictionary<TKey,TValue> class.

Create(Integer,IEqualityComparer)

Overloaded. Initializes a new instance of the TDictionary<TKey,TValue> class.

Create(TComparison)

Overloaded. Initializes a new instance of the TEnumerableBase<T> class. (Inherited from TEnumerableBase<T>.)

Create(TGenericDictionary,TOwnershipType)

Overloaded. Initializes a new instance of the TDictionary<TKey,TValue> class.

Create(T[])

Overloaded. Initializes a new instance of the TCollectionBase<T> class. (Inherited from TCollectionBase<T>.)

Destroy

Represents the destructor of the TDictionary<TKey,TValue> class.

Top
Show:
 NameDescription
Comparer

Gets the assigned comparer. If not comparer was assigned it returns the default comparer. (Inherited from TEnumerableBase<T>.)

Count

Returns the number of elements in a countable. (Inherited from TEnumerableBase.)

ElementType

Returns the type of the elements in the sequence. (Inherited from TEnumerableBase.)

EqualityComparer

Represents property EqualityComparer. (Inherited from TEnumerableBase<T>.)

IsEmpty

Determines whether a countable contains no elements. (Inherited from TEnumerableBase.)

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only. (Inherited from TCollectionBase<T>.)

Items[TKey]

Represents property Items[TKey].

Keys

Represents property Keys.

KeyType

Represents property KeyType. (Inherited from TMapBase<TKey,T>.)

OnChanged

Represents property OnChanged. (Inherited from TCollectionBase<T>.)

OnKeyChanged

Represents property OnKeyChanged. (Inherited from TMapBase<TKey,T>.)

OnValueChanged

Represents property OnValueChanged. (Inherited from TMapBase<TKey,T>.)

RefCount

Represents property RefCount. (Inherited from TInterfacedObjectEx.)

Values

Represents property Values.

ValueType

Represents property ValueType. (Inherited from TMapBase<TKey,T>.)

Top
Show:
 NameDescription
Add(TKey,TValue)

Adds an element with the provided key and value to the IMap<TKey,TValue>. (Overrides TMapBase<TKey,T>.Add(TKey,T).)

AddInternal(TGenericPair)

Represents method AddInternal(TGenericPair). (Inherited from TMapBase<TKey,T>.)

AddOrSetValue(TKey,TValue)

Adds an element with the provided key and value to the IDictionary<TKey,TValue>. If it already exists in the dictionary the provided value for the specified key is set.

AddRange(IEnumerable<T>)

Overloaded. Represents method AddRange(IEnumerable<T>). (Inherited from TCollectionBase<T>.)

AddRange(T[])

Overloaded. Represents method AddRange(T[]). (Inherited from TCollectionBase<T>.)

Aggregate(TFunc)

Applies an accumulator function over a sequence. (Inherited from TEnumerableBase<T>.)

All(TPredicate<T>)

Determines whether all elements of a sequence satisfy a condition. (Inherited from TEnumerableBase<T>.)

Any(TPredicate<T>)

Overloaded. Determines whether any element of a sequence satisfies a condition. (Inherited from TEnumerableBase<T>.)

AsObject

Returns the reference to this instance. (Inherited from TEnumerableBase.)

AsReadOnlyDictionary

Returns the dictionary as read-only dictionary.

BeforeDestruction

Represents method BeforeDestruction. (Inherited from TInterfacedObjectEx.)

Changed(T,TCollectionChangedAction)

Represents method Changed(T,TCollectionChangedAction). (Inherited from TCollectionBase<T>.)

Clear

Removes all items from the ICollection<T>. (Overrides TCollectionBase<T>.Clear.)

Concat(IEnumerable<T>)

Represents method Concat(IEnumerable<T>). (Inherited from TEnumerableBase<T>.)

Contains(T)

Overloaded. Determines whether a sequence contains a specified element by using the default equality comparer. (Inherited from TEnumerableBase<T>.)

Contains(T,IEqualityComparer)

Overloaded. Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>. (Inherited from TEnumerableBase<T>.)

Contains(T,TEqualityComparison)

Overloaded. Represents method Contains(T,TEqualityComparison). (Inherited from TEnumerableBase<T>.)

Contains(TGenericPair)

Overloaded. Represents method Contains(TGenericPair). (Inherited from TMapBase<TKey,T>.)

Contains(TGenericPair,IEqualityComparer)

Represents method Contains(TGenericPair,IEqualityComparer).

Contains(TKey,TValue)

Determines whether the IMap<TKey,TValue> contains the specified key/value pair. (Overrides TMapBase<TKey,T>.Contains(TKey,T).)

ContainsKey(TKey)

Determines whether the IMap<TKey, TValue> contains an element with the specified key. (Overrides TMapBase<TKey,T>.ContainsKey(TKey).)

ContainsValue(TValue)

Determines whether the IMap<TKey, TValue> contains an element with the specified value. (Overrides TMapBase<TKey,T>.ContainsValue(T).)

CopyTo(TArray,Integer)

Copies the elements of the ICollection<T> to an array, starting at a particular array index. (Inherited from TCollectionBase<T>.)

DoKeyNotify(TObject,TKey,TCollectionNotification)

Represents method DoKeyNotify(TObject,TKey,TCollectionNotification).

DoValueNotify(TObject,TValue,TCollectionNotification)

Represents method DoValueNotify(TObject,TValue,TCollectionNotification).

ElementAt(Integer)

Returns the element at a specified index in a sequence. (Inherited from TEnumerableBase<T>.)

ElementAtOrDefault(Integer)

Overloaded. Returns the element at a specified index in a sequence or a default value if the index is out of range. (Inherited from TEnumerableBase<T>.)

ElementAtOrDefault(Integer,T)

Overloaded. Returns the element at a specified index in a sequence or the specified default value if the index is out of range. (Inherited from TEnumerableBase<T>.)

EqualsTo(IEnumerable<T>)

Overloaded. Represents method EqualsTo(IEnumerable<T>). (Inherited from TEnumerableBase<T>.)

EqualsTo(IEnumerable<T>,IEqualityComparer)

Overloaded. Represents method EqualsTo(IEnumerable<T>,IEqualityComparer). (Inherited from TEnumerableBase<T>.)

EqualsTo(T[])

Overloaded. Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type. (Inherited from TEnumerableBase<T>.)

Extract(TGenericPair)

Overloaded. Represents method Extract(TGenericPair). (Inherited from TMapBase<TKey,T>.)

Extract(TKey)

Overloaded. Removes the value for a specified key without triggering lifetime management for objects.

Extract(TKey,TValue)

Represents method Extract(TKey,TValue). (Overrides TMapBase<TKey,T>.Extract(TKey,T).)

ExtractAll(TPredicate<T>)

Represents method ExtractAll(TPredicate<T>). (Inherited from TCollectionBase<T>.)

ExtractPair(TKey)

Overloaded. Removes the value for a specified key without triggering lifetime management for objects.

ExtractRange(IEnumerable<T>)

Overloaded. Represents method ExtractRange(IEnumerable<T>). (Inherited from TCollectionBase<T>.)

ExtractRange(T[])

Overloaded. Represents method ExtractRange(T[]). (Inherited from TCollectionBase<T>.)

First

Overloaded. Returns the first element of a sequence. (Inherited from TEnumerableBase<T>.)

First(TPredicate<T>)

Overloaded. Returns the first element in a sequence that satisfies a specified condition. (Inherited from TEnumerableBase<T>.)

FirstOrDefault

Overloaded. Returns the first element of a sequence, or a default value if the sequence contains no elements. (Inherited from TEnumerableBase<T>.)

FirstOrDefault(T)

Overloaded. Returns the first element of a sequence, or the specified default value if the sequence contains no elements. (Inherited from TEnumerableBase<T>.)

FirstOrDefault(TPredicate<T>)

Overloaded. Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. (Inherited from TEnumerableBase<T>.)

FirstOrDefault(TPredicate<T>,T)

Overloaded. Returns the first element of the sequence that satisfies a condition or the specified default value if no such element is found. (Inherited from TEnumerableBase<T>.)

ForEach(TAction<T>)

Overloaded. Performs the specified action on each element of a sequence. (Inherited from TEnumerableBase<T>.)

GetComparer

Returns the specified comparer for this instance. (Inherited from TEnumerableBase<T>.)

GetCount

Represents method GetCount. (Overrides TEnumerableBase.GetCount.)

GetElementType

Represents method GetElementType. (Overrides TEnumerableBase.GetElementType.)

GetEnumerator

Returns an enumerator that iterates through a collection. (Overrides TEnumerableBase.GetEnumerator.)

GetEqualityComparer

Represents method GetEqualityComparer. (Inherited from TEnumerableBase<T>.)

GetIsEmpty

Represents method GetIsEmpty. (Inherited from TEnumerableBase.)

GetIsReadOnly

Represents method GetIsReadOnly. (Inherited from TCollectionBase<T>.)

GetItem(TKey)

Represents method GetItem(TKey).

GetKeys

Represents method GetKeys. (Overrides TMapBase<TKey,T>.GetKeys.)

GetKeyType

Represents method GetKeyType. (Inherited from TMapBase<TKey,T>.)

GetOnChanged

Represents method GetOnChanged. (Inherited from TCollectionBase<T>.)

GetValueOrDefault(TKey)

Overloaded. Gets the value for a given key if a matching key exists in the dictionary; returns the default value otherwise.

GetValueOrDefault(TKey,TValue)

Overloaded. Gets the value for a given key if a matching key exists in the dictionary; returns the given default value otherwise.

GetValues

Represents method GetValues. (Overrides TMapBase<TKey,T>.GetValues.)

GetValueType

Represents method GetValueType. (Inherited from TMapBase<TKey,T>.)

KeyChanged(TKey,TCollectionChangedAction)

Represents method KeyChanged(TKey,TCollectionChangedAction). (Inherited from TMapBase<TKey,T>.)

Last

Overloaded. Returns the last element of a sequence. (Inherited from TEnumerableBase<T>.)

Last(TPredicate<T>)

Overloaded. Returns the last element of a sequence that satisfies a specified condition. (Inherited from TEnumerableBase<T>.)

LastOrDefault

Overloaded. Returns the last element of a sequence, or a default value if the sequence contains no elements. (Inherited from TEnumerableBase<T>.)

LastOrDefault(T)

Overloaded. Returns the last element of a sequence, or the specified default value if the sequence contains no elements. (Inherited from TEnumerableBase<T>.)

LastOrDefault(TPredicate<T>)

Overloaded. Returns the last element of a sequence that satisfies a condition or a default value if no such element is found. (Inherited from TEnumerableBase<T>.)

LastOrDefault(TPredicate<T>,T)

Overloaded. Returns the last element of a sequence that satisfies a condition or the specified default value if no such element is found. (Inherited from TEnumerableBase<T>.)

Max

Overloaded. Returns the maximum value in a sequence. (Inherited from TEnumerableBase<T>.)

Max(IComparer)

Overloaded. Returns the maximum value in a sequence by using the specified IComparer<T> . (Inherited from TEnumerableBase<T>.)

Max(TComparison)

Overloaded. Represents method Max(TComparison). (Inherited from TEnumerableBase<T>.)

Max(TFunc)

Overloaded. Represents method Max(TFunc). (Inherited from TEnumerableBase<T>.)

Min

Overloaded. Returns the minimum value in a sequence. (Inherited from TEnumerableBase<T>.)

Min(IComparer)

Overloaded. Returns the minimum value in a sequence by using the specified IComparer<T> . (Inherited from TEnumerableBase<T>.)

Min(TComparison)

Overloaded. Represents method Min(TComparison). (Inherited from TEnumerableBase<T>.)

Min(TFunc)

Overloaded. Represents method Min(TFunc). (Inherited from TEnumerableBase<T>.)

MoveTo(ICollection<T>)

Overloaded. Represents method MoveTo(ICollection<T>). (Inherited from TCollectionBase<T>.)

MoveTo(ICollection<T>,TPredicate<T>)

Overloaded. Represents method MoveTo(ICollection<T>,TPredicate<T>). (Inherited from TCollectionBase<T>.)

Ordered

Sorts the elements of a sequence in ascending order using the default comparer for their type. (Overrides TEnumerableBase<T>.Ordered.)

Ordered(IComparer)

Overloaded. Sorts the elements of a sequence in ascending order using the specified IComparer<T>. (Inherited from TEnumerableBase<T>.)

Ordered(TComparison)

Overloaded. Represents method Ordered(TComparison). (Inherited from TEnumerableBase<T>.)

QueryInterface(TGUID,Void)

Represents method QueryInterface(TGUID,Void). (Inherited from TEnumerableBase.)

Remove(TGenericPair)

Overloaded. Represents method Remove(TGenericPair). (Inherited from TMapBase<TKey,T>.)

Remove(TKey)

Removes the element with the specified key from the IMap<TKey, TValue>. (Overrides TMapBase<TKey,T>.Remove(TKey).)

Remove(TKey,TValue)

Removes the specified key/value pair from the IMap<TKey, TValue>. (Overrides TMapBase<TKey,T>.Remove(TKey,T).)

RemoveAll(TPredicate<T>)

Represents method RemoveAll(TPredicate<T>). (Inherited from TCollectionBase<T>.)

RemoveRange(IEnumerable<T>)

Overloaded. Represents method RemoveRange(IEnumerable<T>). (Inherited from TCollectionBase<T>.)

RemoveRange(T[])

Overloaded. Represents method RemoveRange(T[]). (Inherited from TCollectionBase<T>.)

Reversed

Inverts the order of the elements in a sequence. (Inherited from TEnumerableBase<T>.)

SetItem(TKey,TValue)

Represents method SetItem(TKey,TValue).

Shuffled

Returns the sequence in a shuffled order. (Inherited from TEnumerableBase<T>.)

Single

Overloaded. Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. (Inherited from TEnumerableBase<T>.)

Single(TPredicate<T>)

Overloaded. Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. (Inherited from TEnumerableBase<T>.)

SingleOrDefault

Overloaded. Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. (Inherited from TEnumerableBase<T>.)

SingleOrDefault(T)

Overloaded. Returns the only element of a sequence, or the specified default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. (Inherited from TEnumerableBase<T>.)

SingleOrDefault(TPredicate<T>)

Overloaded. Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition. (Inherited from TEnumerableBase<T>.)

SingleOrDefault(TPredicate<T>,T)

Overloaded. Returns the only element of a sequence that satisfies a specified condition or the specified default value if no such element exists; this method throws an exception if more than one element satisfies the condition. (Inherited from TEnumerableBase<T>.)

Skip(Integer)

Bypasses a specified number of elements in a sequence and then returns the remaining elements. (Inherited from TEnumerableBase<T>.)

SkipWhile(TFunc)

Overloaded. Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function. (Inherited from TEnumerableBase<T>.)

SkipWhile(TPredicate<T>)

Overloaded. Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. (Inherited from TEnumerableBase<T>.)

Sum

Overloaded. Computes the sum of the sequence. (Inherited from TEnumerableBase<T>.)

Take(Integer)

Returns a specified number of contiguous elements from the start of a sequence. (Inherited from TEnumerableBase<T>.)

TakeWhile(TFunc)

Overloaded. Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function. (Inherited from TEnumerableBase<T>.)

TakeWhile(TPredicate<T>)

Overloaded. Returns elements from a sequence as long as a specified condition is true. (Inherited from TEnumerableBase<T>.)

ToArray

Creates a new array which is filled with the elements in the collection. (Overrides TEnumerableBase<T>.ToArray.)

TryGetElementAt(T,Integer)

Represents method TryGetElementAt(T,Integer). (Inherited from TEnumerableBase<T>.)

TryGetFirst(T)

Overloaded. Try getting the first element in a sequence. (Inherited from TEnumerableBase<T>.)

TryGetFirst(T,TPredicate<T>)

Overloaded. Try getting the first element in a sequence that satisfies a specified condition. (Inherited from TEnumerableBase<T>.)

TryGetLast(T)

Overloaded. Try getting the last element in a sequence. (Inherited from TEnumerableBase<T>.)

TryGetLast(T,TPredicate<T>)

Overloaded. Try getting the last element in a sequence that satisfies a specified condition. (Inherited from TEnumerableBase<T>.)

TryGetSingle(T)

Overloaded. Try getting the only element in a sequence. (Inherited from TEnumerableBase<T>.)

TryGetSingle(T,TPredicate<T>)

Overloaded. Try getting the only element in a sequence that satisfies a specified condition. (Inherited from TEnumerableBase<T>.)

TryGetValue(TKey,TValue)

Gets the value associated with the specified key.

ValueChanged(T,TCollectionChangedAction)

Represents method ValueChanged(T,TCollectionChangedAction). (Inherited from TMapBase<TKey,T>.)

Where(TPredicate<T>)

Filters a sequence of values based on a predicate. (Inherited from TEnumerableBase<T>.)

_AddRef

Represents method _AddRef. (Inherited from TEnumerableBase.)

_Release

Represents method _Release. (Inherited from TEnumerableBase.)

Top
Show:
 NameDescription
fComparer

Represents field fComparer. (Inherited from TEnumerableBase<T>.)

fDictionary

Represents field fDictionary.

fKeys

Represents field fKeys.

fOnChanged

Represents field fOnChanged. (Inherited from TCollectionBase<T>.)

fOnKeyNotify

Represents field fOnKeyNotify.

fOnValueNotify

Represents field fOnValueNotify.

fOwnership

Represents field fOwnership.

fValues

Represents field fValues.

Top