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

Side by Side Diff: tool/input_sdk/lib/collection/linked_hash_set.dart

Issue 1987043002: Updates to collection_patch.dart (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Created 4 years, 7 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
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 [LinkedHashSet] is a hash-table based [Set] implementation. 8 * A [LinkedHashSet] is a hash-table based [Set] implementation.
9 * 9 *
10 * The `LinkedHashSet` also keep track of the order that elements were inserted 10 * The `LinkedHashSet` also keep track of the order that elements were inserted
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 * The default equality and hashcode operations are assumed to work on all 69 * The default equality and hashcode operations are assumed to work on all
70 * objects. 70 * objects.
71 * 71 *
72 * Likewise, if `equals` is [identical], `hashCode` is [identityHashCode] 72 * Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
73 * and `isValidKey` is omitted, the resulting set is identity based, 73 * and `isValidKey` is omitted, the resulting set is identity based,
74 * and the `isValidKey` defaults to accepting all keys. 74 * and the `isValidKey` defaults to accepting all keys.
75 * Such a map can be created directly using [LinkedHashSet.identity]. 75 * Such a map can be created directly using [LinkedHashSet.identity].
76 */ 76 */
77 external factory LinkedHashSet({bool equals(E e1, E e2), 77 external factory LinkedHashSet({bool equals(E e1, E e2),
78 int hashCode(E e), 78 int hashCode(E e),
79 bool isValidKey(potentialKey)}); 79 bool isValidKey(Object potentialKey)});
80 80
81 /** 81 /**
82 * Creates an insertion-ordered identity-based set. 82 * Creates an insertion-ordered identity-based set.
83 * 83 *
84 * Effectively a shorthand for: 84 * Effectively a shorthand for:
85 * 85 *
86 * new LinkedHashSet(equals: identical, 86 * new LinkedHashSet(equals: identical,
87 * hashCode: identityHashCode) 87 * hashCode: identityHashCode)
88 */ 88 */
89 external factory LinkedHashSet.identity(); 89 external factory LinkedHashSet.identity();
(...skipping 26 matching lines...) Expand all
116 * 116 *
117 * The elements are iterated in insertion order. 117 * The elements are iterated in insertion order.
118 */ 118 */
119 void forEach(void action(E element)); 119 void forEach(void action(E element));
120 120
121 /** 121 /**
122 * Provides an iterator that iterates over the elements in insertion order. 122 * Provides an iterator that iterates over the elements in insertion order.
123 */ 123 */
124 Iterator<E> get iterator; 124 Iterator<E> get iterator;
125 } 125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698