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

Unified Diff: sdk/lib/collection/collections.dart

Issue 1510043002: Improve comment in UnmodifiableListView. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/collections.dart
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart
index fb9a94b8832dcbfb685b08ca6d39ab0750444a8e..5756544177f7794c6aff1e312845bd94e741a02f 100644
--- a/sdk/lib/collection/collections.dart
+++ b/sdk/lib/collection/collections.dart
@@ -12,7 +12,13 @@ part of dart.collection;
*/
class UnmodifiableListView<E> extends UnmodifiableListBase<E> {
final Iterable<E> _source;
- /** Create an unmodifiable list backed by [source]. */
+
+ /**
+ * Creates an unmodifiable list backed by [source].
+ *
+ * The [source] of the elements may be a [List] or any [Iterable] with
+ * efficient [Iterable.length] and [Iterable.elementAt].
+ */
UnmodifiableListView(Iterable<E> source) : _source = source;
int get length => _source.length;
E operator[](int index) => _source.elementAt(index);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698