Changeset 313 for trunk/Include
- Timestamp:
- Aug 27, 2007, 12:50:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Collections/Generic/Dictionary.ab
r312 r313 8 8 9 9 Namespace Detail 10 Class Pair <TKey, T>10 Class Pair 11 11 Public 12 Sub Pair(key As TKey, value As T)12 Sub Pair(key As Object, value As Object) 13 13 Key = key 14 14 Value = value 15 15 End Sub 16 16 17 Key As TKey18 Value As T17 Key As Object 18 Value As Object 19 19 End Class 20 20 End Namespace 'Detail … … 53 53 Dim i As Long 54 54 For i = 0 To ELM(a.Count) 55 Dim pair = a[i] As Pair <T, Key>55 Dim pair = a[i] As Pair 56 56 If pair.Key.Equals(key) Then 57 57 Return pair.Value … … 81 81 Dim i As Long 82 82 For i = 0 To ELM(a.Count) 83 Dim pair = a[i] As Pair <T, Key>83 Dim pair = a[i] As Pair 84 84 If pair.Key.Equals(key) Then 85 85 pair.Value = value … … 88 88 End If 89 89 90 a.Add(New Pair <T, Key>(key, value))90 a.Add(New Pair(key, value)) 91 91 End Sub 92 92 … … 95 95 /* 96 96 'Operators 97 Function Operator [](key As Key) As T 97 ' Function Operator [](key As Key) As T 98 Function Operator [](key As Key) As Object 98 99 Return Item[key] 99 100 End Function … … 121 122 Dim i As Long 122 123 For i = 0 To ELM(a.Count) 123 Dim pair = a[i] As Pair <T, Key>124 Dim pair = a[i] As Pair 124 125 If pair.Key.Equals(key) Then 125 126 'Throw ArgumentError … … 128 129 End If 129 130 130 a.Add(New Pair <T, Key>(key, value))131 a.Add(New Pair(key, value)) 131 132 End Sub 132 133 … … 161 162 Dim e = al[0] 162 163 Dim p = ObjPtr(e) As ULONG_PTR 163 OutputDebugString(ToTCStr(Str$(p)))164 164 End Sub 165 165
Note:
See TracChangeset
for help on using the changeset viewer.