OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 serialization; | 5 part of serialization; |
6 | 6 |
7 // TODO(alanknight): We should have an example and tests for subclassing | 7 // TODO(alanknight): We should have an example and tests for subclassing |
8 // serialization rule rather than using the hard-coded ClosureToMap rule. And | 8 // serialization rule rather than using the hard-coded ClosureToMap rule. And |
9 // possibly an abstract superclass that's designed to be subclassed that way. | 9 // possibly an abstract superclass that's designed to be subclassed that way. |
10 /** | 10 /** |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 | 537 |
538 // These operations, and other inherited methods that iterate over the whole | 538 // These operations, and other inherited methods that iterate over the whole |
539 // list will work, but may be expensive, and are probably | 539 // list will work, but may be expensive, and are probably |
540 // best avoided. | 540 // best avoided. |
541 List get _inflated => _raw.map(_reader.inflateReference); | 541 List get _inflated => _raw.map(_reader.inflateReference); |
542 Iterator get iterator => _inflated.iterator; | 542 Iterator get iterator => _inflated.iterator; |
543 indexOf(x, [pos = 0]) => _inflated.toList().indexOf(x); | 543 indexOf(x, [pos = 0]) => _inflated.toList().indexOf(x); |
544 lastIndexOf(x, [pos]) => _inflated.toList().lastIndexOf(x); | 544 lastIndexOf(x, [pos]) => _inflated.toList().lastIndexOf(x); |
545 sublist(start, [end]) => _inflated.sublist(start, end); | 545 sublist(start, [end]) => _inflated.sublist(start, end); |
546 | 546 |
547 Map<int, dynamic> asMap() => IterableMixinWorkaround.asMapList(this); | 547 Map<int, dynamic> asMap() => _inflated.asMap(); |
548 | 548 |
549 // These operations are all invalid | 549 // These operations are all invalid |
550 _throw() { | 550 _throw() { |
551 throw new UnsupportedError("Not modifiable"); | 551 throw new UnsupportedError("Not modifiable"); |
552 } | 552 } |
553 operator []=(x, y) => _throw(); | 553 operator []=(x, y) => _throw(); |
554 add(x) => _throw(); | 554 add(x) => _throw(); |
555 addAll(x) => _throw(); | 555 addAll(x) => _throw(); |
556 sort([f]) => _throw(); | 556 sort([f]) => _throw(); |
557 clear() => _throw(); | 557 clear() => _throw(); |
558 insert(x, y) => _throw(); | 558 insert(x, y) => _throw(); |
559 removeAt(x) => _throw(); | 559 removeAt(x) => _throw(); |
560 remove(x) => _throw(); | 560 remove(x) => _throw(); |
561 removeLast() => _throw(); | 561 removeLast() => _throw(); |
562 removeAll(x) => _throw(); | 562 removeAll(x) => _throw(); |
563 retainAll(x) => _throw(); | 563 retainAll(x) => _throw(); |
564 removeWhere(x) => _throw(); | 564 removeWhere(x) => _throw(); |
565 retainWhere(x) => _throw(); | 565 retainWhere(x) => _throw(); |
566 getRange(x, y) => _throw(); | 566 getRange(x, y) => _throw(); |
567 setRange(x, y, z, [a]) => _throw(); | 567 setRange(x, y, z, [a]) => _throw(); |
568 removeRange(x, y) => _throw(); | 568 removeRange(x, y) => _throw(); |
569 insertRange(x, y, [z]) => _throw(); | 569 insertRange(x, y, [z]) => _throw(); |
570 get reversed => _throw(); | 570 get reversed => _throw(); |
571 void set length(x) => _throw(); | 571 void set length(x) => _throw(); |
572 } | 572 } |
OLD | NEW |