| 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.dev; | 5 part of dart._collection.dev; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Base implementation of a [List] class. | 8 * Base implementation of a [List] class. |
| 9 * | 9 * |
| 10 * This class can be used as a mixin. | 10 * This class can be used as a mixin. |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 void set length(int newLength) { | 452 void set length(int newLength) { |
| 453 throw new UnsupportedError( | 453 throw new UnsupportedError( |
| 454 "Cannot change the length of a fixed-length list"); | 454 "Cannot change the length of a fixed-length list"); |
| 455 } | 455 } |
| 456 | 456 |
| 457 void add(E value) { | 457 void add(E value) { |
| 458 throw new UnsupportedError( | 458 throw new UnsupportedError( |
| 459 "Cannot add to a fixed-length list"); | 459 "Cannot add to a fixed-length list"); |
| 460 } | 460 } |
| 461 | 461 |
| 462 void addLast(E value) { | |
| 463 throw new UnsupportedError( | |
| 464 "Cannot add to a fixed-length list"); | |
| 465 } | |
| 466 | |
| 467 void insert(int index, E value) { | 462 void insert(int index, E value) { |
| 468 throw new UnsupportedError( | 463 throw new UnsupportedError( |
| 469 "Cannot add to a fixed-length list"); | 464 "Cannot add to a fixed-length list"); |
| 470 } | 465 } |
| 471 | 466 |
| 472 void addAll(Iterable<E> iterable) { | 467 void addAll(Iterable<E> iterable) { |
| 473 throw new UnsupportedError( | 468 throw new UnsupportedError( |
| 474 "Cannot add to a fixed-length list"); | 469 "Cannot add to a fixed-length list"); |
| 475 } | 470 } |
| 476 | 471 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 void set length(int newLength) { | 537 void set length(int newLength) { |
| 543 throw new UnsupportedError( | 538 throw new UnsupportedError( |
| 544 "Cannot change the length of an unmodifiable list"); | 539 "Cannot change the length of an unmodifiable list"); |
| 545 } | 540 } |
| 546 | 541 |
| 547 void add(E value) { | 542 void add(E value) { |
| 548 throw new UnsupportedError( | 543 throw new UnsupportedError( |
| 549 "Cannot add to an unmodifiable list"); | 544 "Cannot add to an unmodifiable list"); |
| 550 } | 545 } |
| 551 | 546 |
| 552 void addLast(E value) { | |
| 553 throw new UnsupportedError( | |
| 554 "Cannot add to an unmodifiable list"); | |
| 555 } | |
| 556 | |
| 557 E insert(int index, E value) { | 547 E insert(int index, E value) { |
| 558 throw new UnsupportedError( | 548 throw new UnsupportedError( |
| 559 "Cannot add to an unmodifiable list"); | 549 "Cannot add to an unmodifiable list"); |
| 560 } | 550 } |
| 561 | 551 |
| 562 void addAll(Iterable<E> iterable) { | 552 void addAll(Iterable<E> iterable) { |
| 563 throw new UnsupportedError( | 553 throw new UnsupportedError( |
| 564 "Cannot add to an unmodifiable list"); | 554 "Cannot add to an unmodifiable list"); |
| 565 } | 555 } |
| 566 | 556 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 } | 723 } |
| 734 | 724 |
| 735 E remove(int key) { | 725 E remove(int key) { |
| 736 throw new UnsupportedError("Cannot modify an unmodifiable map"); | 726 throw new UnsupportedError("Cannot modify an unmodifiable map"); |
| 737 } | 727 } |
| 738 | 728 |
| 739 void clear() { | 729 void clear() { |
| 740 throw new UnsupportedError("Cannot modify an unmodifiable map"); | 730 throw new UnsupportedError("Cannot modify an unmodifiable map"); |
| 741 } | 731 } |
| 742 } | 732 } |
| OLD | NEW |