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

Side by Side Diff: corelib/src/map.dart

Issue 8549033: Update comments in core lib showing proper factory syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « corelib/src/implementation/queue.dart ('k') | corelib/src/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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 5 /**
6 * A [Map] is an associative container, mapping a key to a value. 6 * A [Map] is an associative container, mapping a key to a value.
7 * Null values are supported. 7 * Null values are supported.
8 */ 8 */
9 interface Map<K, V> factory HashMapImplementation/* <K, V> */ { 9 interface Map<K, V> factory HashMapImplementation/*<K extends Hashable, V>*/ {
10 // Bug 5408808: Factory should be HashMapImplementation<K, V>. 10 // See issue 417. Works in the vm, fails in dartc and frog.
11 11
12 /** 12 /**
13 * Creates a map with the default implementation. 13 * Creates a map with the default implementation.
14 */ 14 */
15 Map(); 15 Map();
16 16
17 /** 17 /**
18 * Creates a [Map] that contains all key value pairs of [other]. 18 * Creates a [Map] that contains all key value pairs of [other].
19 */ 19 */
20 Map.from(Map<K, V> other); 20 Map.from(Map<K, V> other);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 */ 88 */
89 bool isEmpty(); 89 bool isEmpty();
90 } 90 }
91 91
92 /** 92 /**
93 * Hash map version of the [Map] interface. A [HashMap] does not 93 * Hash map version of the [Map] interface. A [HashMap] does not
94 * provide any guarantees on the order of keys and values in [getKeys] 94 * provide any guarantees on the order of keys and values in [getKeys]
95 * and [getValues]. 95 * and [getValues].
96 */ 96 */
97 interface HashMap<K extends Hashable, V> extends Map<K, V> 97 interface HashMap<K extends Hashable, V> extends Map<K, V>
98 factory HashMapImplementation/* <K, V> */ { 98 factory HashMapImplementation/*<K extends Hashable, V>*/ {
99 // Bug 5408808: Factory should be HashMapImplementation<K, V>. 99 // See issue 417. Works in the vm, fails in dartc and frog.
100 100
101 /** 101 /**
102 * Creates a map with the default implementation. 102 * Creates a map with the default implementation.
103 */ 103 */
104 HashMap(); 104 HashMap();
105 105
106 /** 106 /**
107 * Creates a [HashMap] that contains all key value pairs of [other]. 107 * Creates a [HashMap] that contains all key value pairs of [other].
108 */ 108 */
109 HashMap.from(Map<K, V> other); 109 HashMap.from(Map<K, V> other);
110 } 110 }
111 111
112 /** 112 /**
113 * Hash map version of the [Map] interface that preserves insertion 113 * Hash map version of the [Map] interface that preserves insertion
114 * order. 114 * order.
115 */ 115 */
116 interface LinkedHashMap<K extends Hashable, V> extends HashMap<K, V> 116 interface LinkedHashMap<K extends Hashable, V> extends HashMap<K, V>
117 factory LinkedHashMapImplementation /* <K, V> */ { 117 factory LinkedHashMapImplementation/*<K extends Hashable, V>*/ {
118 // Bug 5408808: Factory should be LinkedHashMapImplementation<K, V>. 118 // See issue 417. Works in the vm, fails in dartc and frog.
119 119
120 /** 120 /**
121 * Creates a map with the default implementation. 121 * Creates a map with the default implementation.
122 */ 122 */
123 LinkedHashMap(); 123 LinkedHashMap();
124 124
125 /** 125 /**
126 * Creates a [LinkedHashMap] that contains all key value pairs of [other]. 126 * Creates a [LinkedHashMap] that contains all key value pairs of [other].
127 */ 127 */
128 LinkedHashMap.from(Map<K, V> other); 128 LinkedHashMap.from(Map<K, V> other);
129 } 129 }
OLDNEW
« no previous file with comments | « corelib/src/implementation/queue.dart ('k') | corelib/src/set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698