Changeset 396 for trunk/Include/Classes/System/Collections/Generic/List.ab
- Timestamp:
- Dec 18, 2007, 2:55:40 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Collections/Generic/List.ab
r387 r396 4 4 Namespace Generic 5 5 6 Interface IEnumerable<T> 7 ' Method 8 Function GetEnumerator() As IEnumerator<T> 9 End Interface 10 11 Interface IEnumerator<T> 12 ' Methods 13 Function MoveNext() As Boolean 14 Sub Reset() 15 ' Property 16 Function Current() As T 17 End Interface 18 6 19 Class List<T> 7 Implements IEnumerable , IEnumerator20 Implements IEnumerable<T>, IEnumerator<T> 8 21 items As *T 9 22 size As Long … … 138 151 @return IEnumeratorインターフェイスが返る 139 152 */ 140 Function GetEnumerator() As IEnumerator 153 Function GetEnumerator() As IEnumerator<T> 141 154 Return This 142 155 End Function … … 173 186 @return カレントオブジェクトが返る 174 187 */ 175 Function Current() As Object188 Function Current() As T 176 189 If currentIndexForEnumerator = -1 Then 177 190 ' MoveNextメソッドがReset後、一度も呼び出されなかった 178 191 Return Nothing 179 192 End If 180 Return items[currentIndexForEnumerator] As Object193 Return items[currentIndexForEnumerator] 181 194 End Function 182 195 End Class
Note:
See TracChangeset
for help on using the changeset viewer.