| OLD | NEW |
| 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; | 5 part of dart.collection; |
| 6 | 6 |
| 7 /** A reusable set used to identify cyclic lists during toString() calls. */ | 7 /** A reusable set used to identify cyclic lists during toString() calls. */ |
| 8 Set _toStringVisiting = new HashSet.identity(); | 8 Set _toStringVisiting = new HashSet.identity(); |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * Abstract implementation of a list. | 11 * Abstract implementation of a list. |
| 12 * | 12 * |
| 13 * All operations are defined in terms of `length`, `operator[]`, | 13 * All operations are defined in terms of `length`, `operator[]`, |
| 14 * `operator[]=` and `length=`, which need to be implemented. | 14 * `operator[]=` and `length=`, which need to be implemented. |
| 15 */ | 15 */ |
| 16 typedef ListBase<E> = Object with ListMixin<E>; | 16 abstract class ListBase<E> = Object with ListMixin<E>; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Base implementation of a [List] class. | 19 * Base implementation of a [List] class. |
| 20 * | 20 * |
| 21 * This class can be used as a mixin. | 21 * This class can be used as a mixin. |
| 22 * | 22 * |
| 23 * This implements all read operations using only the `length` and | 23 * This implements all read operations using only the `length` and |
| 24 * `operator[]` members. It implements write operations using those and | 24 * `operator[]` members. It implements write operations using those and |
| 25 * `length=` and `operator[]=` | 25 * `length=` and `operator[]=` |
| 26 */ | 26 */ |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 result.write('['); | 517 result.write('['); |
| 518 result.writeAll(this, ', '); | 518 result.writeAll(this, ', '); |
| 519 result.write(']'); | 519 result.write(']'); |
| 520 } finally { | 520 } finally { |
| 521 _toStringVisiting.remove(this); | 521 _toStringVisiting.remove(this); |
| 522 } | 522 } |
| 523 | 523 |
| 524 return result.toString(); | 524 return result.toString(); |
| 525 } | 525 } |
| 526 } | 526 } |
| OLD | NEW |