Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: sdk/lib/_collection_dev/list.dart

Issue 27300003: Change "typedef" to "class" in core library and related tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update some dart2js tests and unparser. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart._collection.dev; 5 part of dart._collection.dev;
6 6
7 /** 7 /**
8 * Mixin that throws on the length changing operations of [List]. 8 * Mixin that throws on the length changing operations of [List].
9 * 9 *
10 * Intended to mix-in on top of [ListMixin] for fixed-length lists. 10 * Intended to mix-in on top of [ListMixin] for fixed-length lists.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 "Cannot modify an unmodifiable list"); 180 "Cannot modify an unmodifiable list");
181 } 181 }
182 } 182 }
183 183
184 /** 184 /**
185 * Abstract implementation of a fixed-length list. 185 * Abstract implementation of a fixed-length list.
186 * 186 *
187 * All operations are defined in terms of `length`, `operator[]` and 187 * All operations are defined in terms of `length`, `operator[]` and
188 * `operator[]=`, which need to be implemented. 188 * `operator[]=`, which need to be implemented.
189 */ 189 */
190 typedef FixedLengthListBase<E> = ListBase<E> with FixedLengthListMixin<E>; 190 abstract class FixedLengthListBase<E> =
191 ListBase<E> with FixedLengthListMixin<E>;
191 192
192 /** 193 /**
193 * Abstract implementation of an unmodifiable list. 194 * Abstract implementation of an unmodifiable list.
194 * 195 *
195 * All operations are defined in terms of `length` and `operator[]`, 196 * All operations are defined in terms of `length` and `operator[]`,
196 * which need to be implemented. 197 * which need to be implemented.
197 */ 198 */
198 typedef UnmodifiableListBase<E> = ListBase<E> with UnmodifiableListMixin<E>; 199 abstract class UnmodifiableListBase<E> =
200 ListBase<E> with UnmodifiableListMixin<E>;
199 201
200 class _ListIndicesIterable extends ListIterable<int> { 202 class _ListIndicesIterable extends ListIterable<int> {
201 List _backedList; 203 List _backedList;
202 204
203 _ListIndicesIterable(this._backedList); 205 _ListIndicesIterable(this._backedList);
204 206
205 int get length => _backedList.length; 207 int get length => _backedList.length;
206 int elementAt(int index) { 208 int elementAt(int index) {
207 if (index < 0 || index >= length) { 209 if (index < 0 || index >= length) {
208 throw new RangeError.range(index, 0, length); 210 throw new RangeError.range(index, 0, length);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 261 }
260 262
261 class ReversedListIterable<E> extends ListIterable<E> { 263 class ReversedListIterable<E> extends ListIterable<E> {
262 Iterable<E> _source; 264 Iterable<E> _source;
263 ReversedListIterable(this._source); 265 ReversedListIterable(this._source);
264 266
265 int get length => _source.length; 267 int get length => _source.length;
266 268
267 E elementAt(int index) => _source.elementAt(_source.length - 1 - index); 269 E elementAt(int index) => _source.elementAt(_source.length - 1 - index);
268 } 270 }
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | sdk/lib/_internal/compiler/implementation/tree/unparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698