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

Side by Side Diff: sdk/lib/collection/linked_hash_map.dart

Issue 1922083002: Fix documentation for identity collections. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « sdk/lib/collection/hash_set.dart ('k') | sdk/lib/collection/linked_hash_set.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; 5 part of dart.collection;
6 6
7 /** 7 /**
8 * A hash-table based implementation of [Map]. 8 * A hash-table based implementation of [Map].
9 * 9 *
10 * The insertion order of keys is remembered, 10 * The insertion order of keys is remembered,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 external factory LinkedHashMap({bool equals(K key1, K key2), 73 external factory LinkedHashMap({bool equals(K key1, K key2),
74 int hashCode(K key), 74 int hashCode(K key),
75 bool isValidKey(potentialKey)}); 75 bool isValidKey(potentialKey)});
76 76
77 /** 77 /**
78 * Creates an insertion-ordered identity-based map. 78 * Creates an insertion-ordered identity-based map.
79 * 79 *
80 * Effectively a shorthand for: 80 * Effectively a shorthand for:
81 * 81 *
82 * new LinkedHashMap(equals: identical, 82 * new LinkedHashMap(equals: identical,
83 * hashCode: identityHashCodeOf) 83 * hashCode: identityHashCode)
84 */ 84 */
85 external factory LinkedHashMap.identity(); 85 external factory LinkedHashMap.identity();
86 86
87 /** 87 /**
88 * Creates a [LinkedHashMap] that contains all key value pairs of [other]. 88 * Creates a [LinkedHashMap] that contains all key value pairs of [other].
89 */ 89 */
90 factory LinkedHashMap.from(Map other) { 90 factory LinkedHashMap.from(Map other) {
91 LinkedHashMap<K, V> result = new LinkedHashMap<K, V>(); 91 LinkedHashMap<K, V> result = new LinkedHashMap<K, V>();
92 other.forEach((k, v) { result[k] = v; }); 92 other.forEach((k, v) { result[k] = v; });
93 return result; 93 return result;
(...skipping 29 matching lines...) Expand all
123 * overwrites the previous value. 123 * overwrites the previous value.
124 * 124 *
125 * It is an error if the two [Iterable]s don't have the same length. 125 * It is an error if the two [Iterable]s don't have the same length.
126 */ 126 */
127 factory LinkedHashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { 127 factory LinkedHashMap.fromIterables(Iterable<K> keys, Iterable<V> values) {
128 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>(); 128 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>();
129 Maps._fillMapWithIterables(map, keys, values); 129 Maps._fillMapWithIterables(map, keys, values);
130 return map; 130 return map;
131 } 131 }
132 } 132 }
OLDNEW
« no previous file with comments | « sdk/lib/collection/hash_set.dart ('k') | sdk/lib/collection/linked_hash_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698