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

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

Issue 23445016: Small changes to make analyzer happy. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « runtime/lib/bool_patch.dart ('k') | sdk/lib/collection/linked_list.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 } 77 }
78 78
79 /** 79 /**
80 * Mixin for an unmodifiable [List] class. 80 * Mixin for an unmodifiable [List] class.
81 * 81 *
82 * This overrides all mutating methods with methods that throw. 82 * This overrides all mutating methods with methods that throw.
83 * This mixin is intended to be mixed in on top of [ListMixin] on 83 * This mixin is intended to be mixed in on top of [ListMixin] on
84 * unmodifiable lists. 84 * unmodifiable lists.
85 */ 85 */
86 abstract class UnmodifiableListMixin<E> { 86 abstract class UnmodifiableListMixin<E> implements List<E> {
87 87
88 void operator []=(int index, E value) { 88 void operator []=(int index, E value) {
89 throw new UnsupportedError( 89 throw new UnsupportedError(
90 "Cannot modify an unmodifiable list"); 90 "Cannot modify an unmodifiable list");
91 } 91 }
92 92
93 void set length(int newLength) { 93 void set length(int newLength) {
94 throw new UnsupportedError( 94 throw new UnsupportedError(
95 "Cannot change the length of an unmodifiable list"); 95 "Cannot change the length of an unmodifiable list");
96 } 96 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 class ReversedListIterable<E> extends ListIterable<E> { 256 class ReversedListIterable<E> extends ListIterable<E> {
257 Iterable<E> _source; 257 Iterable<E> _source;
258 ReversedListIterable(this._source); 258 ReversedListIterable(this._source);
259 259
260 int get length => _source.length; 260 int get length => _source.length;
261 261
262 E elementAt(int index) => _source.elementAt(_source.length - 1 - index); 262 E elementAt(int index) => _source.elementAt(_source.length - 1 - index);
263 } 263 }
OLDNEW
« no previous file with comments | « runtime/lib/bool_patch.dart ('k') | sdk/lib/collection/linked_list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698