Changeset 387 for trunk/Include/Classes/System/Collections/Generic/List.ab
- Timestamp:
- Nov 23, 2007, 1:44:49 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Collections/Generic/List.ab
r386 r387 18 18 Sub List() 19 19 items = GC_malloc( 1 ) 20 21 ' 列挙子の位置を初期化 22 Reset() 20 23 End Sub 21 24 Sub ~List() … … 146 149 */ 147 150 Function MoveNext() As Boolean 148 If currentIndexForEnumerator >= size Then151 If currentIndexForEnumerator + 1 >= size Then 149 152 ' 上限に達した 150 153 Return False … … 161 164 */ 162 165 Sub Reset() 163 currentIndexForEnumerator = 0166 currentIndexForEnumerator = -1 164 167 End Sub 165 168 … … 171 174 */ 172 175 Function Current() As Object 176 If currentIndexForEnumerator = -1 Then 177 ' MoveNextメソッドがReset後、一度も呼び出されなかった 178 Return Nothing 179 End If 173 180 Return items[currentIndexForEnumerator] As Object 174 181 End Function
Note:
See TracChangeset
for help on using the changeset viewer.