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

Unified Diff: test/generated_sdk/lib/collection/linked_hash_set.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/generated_sdk/lib/collection/linked_hash_map.dart ('k') | test/generated_sdk/lib/convert/json.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/generated_sdk/lib/collection/linked_hash_set.dart
diff --git a/test/generated_sdk/lib/collection/linked_hash_set.dart b/test/generated_sdk/lib/collection/linked_hash_set.dart
index 4d1154ccbbd828557b0a7593d5649c6a21c6b683..f475b0d8bd4276fcc5739109228e8b1844bd5129 100644
--- a/test/generated_sdk/lib/collection/linked_hash_set.dart
+++ b/test/generated_sdk/lib/collection/linked_hash_set.dart
@@ -30,7 +30,28 @@ part of dart.collection;
* codes of objects are well distributed..
*/
abstract class LinkedHashSet<E> implements HashSet<E> {
- @patch
+ /**
+ * Create an insertion-ordered hash set using the provided
+ * [equals] and [hashCode].
+ *
+ * The provided [equals] must define a stable equivalence relation, and
+ * [hashCode] must be consistent with [equals]. If the [equals] or [hashCode]
+ * methods won't work on all objects, but only to instances of E, the
+ * [isValidKey] predicate can be used to restrict the keys that they are
+ * applied to. Any key for which [isValidKey] returns false is automatically
+ * assumed to not be in the set.
+ *
+ * If [equals] or [hashCode] are omitted, the set uses
+ * the objects' intrinsic [Object.operator==] and [Object.hashCode],
+ *
+ * If [isValidKey] is omitted, it defaults to testing if the object is an
+ * [E] instance.
+ *
+ * If you supply one of [equals] and [hashCode],
+ * you should generally also to supply the other.
+ * An example would be using [identical] and [identityHashCode],
+ * which is equivalent to using the shorthand [LinkedSet.identity]).
+ */
factory LinkedHashSet({ bool equals(E e1, E e2),
int hashCode(E e),
bool isValidKey(potentialKey) }) {
@@ -60,7 +81,13 @@ abstract class LinkedHashSet<E> implements HashSet<E> {
return new _LinkedCustomHashSet<E>(equals, hashCode, isValidKey);
}
- @patch
+ /**
+ * Creates an insertion-ordered identity-based set.
+ *
+ * Effectively a shorthand for:
+ *
+ * new LinkedHashSet(equals: identical, hashCode: identityHashCodeOf)
+ */
factory LinkedHashSet.identity() = _LinkedIdentityHashSet<E>;
/**
« no previous file with comments | « test/generated_sdk/lib/collection/linked_hash_map.dart ('k') | test/generated_sdk/lib/convert/json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698