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

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

Issue 12391046: Add List.asMap(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 9 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
OLDNEW
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 dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * A [List] is an indexable collection with a length. 8 * A [List] is an indexable collection with a length.
9 * 9 *
10 * A `List` implementation can be choose not to support all methods 10 * A `List` implementation can be choose not to support all methods
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 * Throws an [UnsupportedError] if the list is 250 * Throws an [UnsupportedError] if the list is
251 * not extendable. 251 * not extendable.
252 * If [length] is 0, this method does not do anything. 252 * If [length] is 0, this method does not do anything.
253 * If [start] is the length of the list, this method inserts the 253 * If [start] is the length of the list, this method inserts the
254 * range at the end of the list. 254 * range at the end of the list.
255 * Throws an [ArgumentError] if [length] is negative. 255 * Throws an [ArgumentError] if [length] is negative.
256 * Throws an [RangeError] if [start] is negative or if 256 * Throws an [RangeError] if [start] is negative or if
257 * [start] is greater than the length of the list. 257 * [start] is greater than the length of the list.
258 */ 258 */
259 void insertRange(int start, int length, [E fill]); 259 void insertRange(int start, int length, [E fill]);
260
261 /**
262 * Returns an unmodifiable [Map] view of `this`.
263 *
264 * It has the indices of this list as keys, and the corresponding elements
265 * as values.
266 */
267 Map<int, E> asMap();
260 } 268 }
OLDNEW
« no previous file with comments | « sdk/lib/collection/collections.dart ('k') | sdk/lib/html/html_common/filtered_element_list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698