Lines Matching refs:Index
135 function GetItem(Index: Integer): T;
136 procedure SetItem(Index: Integer; const Value: T);
148 procedure Insert(Index: Integer; const Value: T);
150 procedure InsertRange(Index: Integer; const Values: array of T); overload;
151 procedure InsertRange(Index: Integer; const Collection: IEnumerable<T>); overload;
152 procedure InsertRange(Index: Integer; const Collection: TEnumerable<T>); overload;
153 procedure InsertRange(Index: Integer; const List: IList<T>); overload;
156 procedure Delete(Index: Integer);
170 function BinarySearch(const Item: T; out Index: Integer): Boolean; overload;
171 function BinarySearch(const Item: T; out Index: Integer; const AComparer: IComparer<T>): Boolean; overload;
175 function GetRange(const Index, Count: Integer): IList<T>;
181 property Items[Index: Integer]: T read GetItem write SetItem; default;
224 function GetItem(Index: Integer): T;
225 procedure SetItem(Index: Integer; const Value: T);
228 function GetRange(const Index, Count: Integer): IList<T>;
230 procedure InsertRange(Index: Integer; const List: IList<T>); overload;
259 procedure DoAdd(HashCode, Index: Integer; const Key: TKey; const Value: TValue);
478 function TList<T>.GetItem(Index: Integer): T;
480 Result := inherited Items[Index];
488 function TList<T>.GetRange(const Index, Count: Integer): IList<T>;
494 for I := Index to Index + Count - 1 do
498 procedure TList<T>.InsertRange(Index: Integer; const List: IList<T>);
504 Insert(Index, Item);
505 Inc(Index);
527 procedure TList<T>.SetItem(Index: Integer; const Value: T);
529 inherited Items[Index] := Value;
643 index: Integer;
645 index := GetBucketIndex(Key, Hash(Key));
646 if index < 0 then
648 Result := FItems[index].Value;
653 index: Integer;
656 index := GetBucketIndex(Key, Hash(Key));
657 if index < 0 then
660 oldValue := FItems[index].Value;
661 FItems[index].Value := Value;
666 index: Integer;
668 index := not GetBucketIndex(Key, HashCode);
669 FItems[index].HashCode := HashCode;
670 FItems[index].Key := Key;
671 FItems[index].Value := Value;
747 index, hc: Integer;
753 index := GetBucketIndex(Key, hc);
754 if index >= 0 then
757 DoAdd(hc, not index, Key, Value);
769 gap, index, hc, bucket: Integer;
773 index := GetBucketIndex(Key, hc);
774 if index < 0 then
785 // index searches for items that have been probed out of their slot,
787 // our gap and our index (so that they'd be moved before their bucket).
788 // We move the item at index into the gap, whereupon the new gap is
789 // at the index. If the index hits a hole, then we're done.
793 FItems[index].HashCode := 0;
795 gap := index;
798 Inc(index);
799 if index = Length(FItems) then
800 index := 0;
802 hc := FItems[index].HashCode;
807 if not InCircularRange(gap, bucket, index) then
809 FItems[gap] := FItems[index];
810 gap := index;
838 index: Integer;
840 index := GetBucketIndex(Key, Hash(Key));
841 Result := index >= 0;
843 Value := FItems[index].Value
848 procedure TDictionary<TKey,TValue>.DoAdd(HashCode, Index: Integer; const Key: TKey; const Value: TValue);
850 FItems[Index].HashCode := HashCode;
851 FItems[Index].Key := Key;
852 FItems[Index].Value := Value;