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 "internal.dart"; | 5 part of "dart:_internal"; |
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. |
11 */ | 11 */ |
12 abstract class FixedLengthListMixin<E> { | 12 abstract class FixedLengthListMixin<E> { |
13 /** This operation is not supported by a fixed length list. */ | 13 /** This operation is not supported by a fixed length list. */ |
14 set length(int newLength) { | 14 set length(int newLength) { |
15 throw new UnsupportedError( | 15 throw new UnsupportedError( |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 * or as returned by [makeListFixedLength]. | 351 * or as returned by [makeListFixedLength]. |
352 * | 352 * |
353 * The operation is efficient. It doesn't copy the elements, but converts | 353 * The operation is efficient. It doesn't copy the elements, but converts |
354 * the existing list directly to a fixed length list. | 354 * the existing list directly to a fixed length list. |
355 * That means that it is a destructive conversion. | 355 * That means that it is a destructive conversion. |
356 * The original list should not be used afterwards. | 356 * The original list should not be used afterwards. |
357 * | 357 * |
358 * The unmodifiable list type is similar to the one used by const lists. | 358 * The unmodifiable list type is similar to the one used by const lists. |
359 */ | 359 */ |
360 external List makeFixedListUnmodifiable(List fixedLengthList); | 360 external List makeFixedListUnmodifiable(List fixedLengthList); |
OLD | NEW |