Lines Matching refs:Key
189 function GetItem(const Key: TKey): TValue; in GetItem()
190 procedure SetItem(const Key: TKey; const Value: TValue);
194 procedure Add(const Key: TKey; const Value: TValue);
195 procedure Remove(const Key: TKey);
198 function TryGetValue(const Key: TKey; out Value: TValue): Boolean; in TryGetValue()
199 procedure AddOrSetValue(const Key: TKey; const Value: TValue);
200 function ContainsKey(const Key: TKey): Boolean; in ContainsKey()
205 property Items[const Key: TKey]: TValue read GetItem write SetItem; default;
243 Key: TKey;
256 function GetBucketIndex(const Key: TKey; HashCode: Integer): Integer; in GetBucketIndex()
257 function Hash(const Key: TKey): Integer; in Hash()
258 procedure RehashAdd(HashCode: Integer; const Key: TKey; const Value: TValue);
259 procedure DoAdd(HashCode, Index: Integer; const Key: TKey; const Value: TValue);
292 function GetItem(const Key: TKey): TValue; in GetItem()
293 procedure SetItem(const Key: TKey; const Value: TValue);
296 procedure Add(const Key: TKey; const Value: TValue);
297 procedure Remove(const Key: TKey);
300 function TryGetValue(const Key: TKey; out Value: TValue): Boolean; in TryGetValue()
301 procedure AddOrSetValue(const Key: TKey; const Value: TValue);
302 function ContainsKey(const Key: TKey): Boolean; in ContainsKey()
568 RehashAdd(oldItems[i].HashCode, oldItems[i].Key, oldItems[i].Value);
599 function TDictionary<TKey,TValue>.GetBucketIndex(const Key: TKey; HashCode: Integer): Integer; in TDictionary()
617 if (hc = HashCode) and FComparer.Equals(FItems[Result].Key, Key) then
631 function TDictionary<TKey,TValue>.Hash(const Key: TKey): Integer; in TDictionary()
638 Result := PositiveMask and ((PositiveMask and FComparer.GetHashCode(Key)) + 1);
641 function TDictionary<TKey,TValue>.GetItem(const Key: TKey): TValue; in GetItem()
645 index := GetBucketIndex(Key, Hash(Key));
651 procedure TDictionary<TKey,TValue>.SetItem(const Key: TKey; const Value: TValue);
656 index := GetBucketIndex(Key, Hash(Key));
664 procedure TDictionary<TKey,TValue>.RehashAdd(HashCode: Integer; const Key: TKey; const Value: TValu…
668 index := not GetBucketIndex(Key, HashCode);
670 FItems[index].Key := Key;
725 AddOrSetValue(item.Key, item.Value);
736 AddOrSetValue(item.Key, item.Value);
745 procedure TDictionary<TKey,TValue>.Add(const Key: TKey; const Value: TValue);
752 hc := Hash(Key);
753 index := GetBucketIndex(Key, hc);
757 DoAdd(hc, not index, Key, Value);
767 procedure TDictionary<TKey,TValue>.Remove(const Key: TKey);
772 hc := Hash(Key);
773 index := GetBucketIndex(Key, hc);
817 FItems[gap].Key := Default(TKey);
836 function TDictionary<TKey,TValue>.TryGetValue(const Key: TKey; out Value: TValue): Boolean; in TryGetValue()
840 index := GetBucketIndex(Key, Hash(Key));
848 procedure TDictionary<TKey,TValue>.DoAdd(HashCode, Index: Integer; const Key: TKey; const Value: TV…
851 FItems[Index].Key := Key;
861 procedure TDictionary<TKey,TValue>.AddOrSetValue(const Key: TKey; const Value: TValue);
863 if ContainsKey(Key) then
864 SetItem(Key,Value)
866 Add(Key,Value);
869 function TDictionary<TKey,TValue>.ContainsKey(const Key: TKey): Boolean; in TDictionary()
871 Result := GetBucketIndex(Key, Hash(Key)) >= 0;
913 Result.Key := FDictionary.FItems[FIndex].Key;