| Index: test/generated_sdk/lib/collection/hash_map.dart
|
| diff --git a/test/generated_sdk/lib/collection/hash_map.dart b/test/generated_sdk/lib/collection/hash_map.dart
|
| index 591686d245ce90a8df5dc008c73a7ccf34c39bf2..5ee7926124ca4952040f83261832ab991f2980d3 100644
|
| --- a/test/generated_sdk/lib/collection/hash_map.dart
|
| +++ b/test/generated_sdk/lib/collection/hash_map.dart
|
| @@ -33,7 +33,39 @@ typedef int _Hasher<K>(K object);
|
| * will give matching key and value pairs.
|
| */
|
| abstract class HashMap<K, V> implements Map<K, V> {
|
| - @patch
|
| + /**
|
| + * Creates an unordered hash-table based [Map].
|
| + *
|
| + * The created map is not ordered in any way. When iterating the keys or
|
| + * values, the iteration order is unspecified except that it will stay the
|
| + * same as long as the map isn't changed.
|
| + *
|
| + * If [equals] is provided, it is used to compare the keys in the table with
|
| + * new keys. If [equals] is omitted, the key's own [Object.operator==] is used
|
| + * instead.
|
| + *
|
| + * Similar, if [hashCode] is provided, it is used to produce a hash value
|
| + * for keys in order to place them in the hash table. If it is omitted, the
|
| + * key's own [Object.hashCode] is used.
|
| + *
|
| + * If using methods like [operator[]], [remove] and [containsKey] together
|
| + * with a custom equality and hashcode, an extra `isValidKey` function
|
| + * can be supplied. This function is called before calling [equals] or
|
| + * [hashCode] with an argument that may not be a [K] instance, and if the
|
| + * call returns false, the key is assumed to not be in the set.
|
| + * The [isValidKey] function defaults to just testing if the object is a
|
| + * [K] instance.
|
| + *
|
| + * The used `equals` and `hashCode` method should always be consistent,
|
| + * so that if `equals(a, b)` then `hashCode(a) == hashCode(b)`. The hash
|
| + * of an object, or what it compares equal to, should not change while the
|
| + * object is in the table. If it does change, the result is unpredictable.
|
| + *
|
| + * 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 [HashMap.identity]).
|
| + */
|
| factory HashMap({ bool equals(K key1, K key2),
|
| int hashCode(K key),
|
| bool isValidKey(potentialKey) }) {
|
| @@ -63,7 +95,13 @@ abstract class HashMap<K, V> implements Map<K, V> {
|
| return new _CustomHashMap<K, V>(equals, hashCode, isValidKey);
|
| }
|
|
|
| - @patch
|
| + /**
|
| + * Creates an unordered identity-based map.
|
| + *
|
| + * Effectively a shorthand for:
|
| + *
|
| + * new HashMap(equals: identical, hashCode: identityHashCodeOf)
|
| + */
|
| factory HashMap.identity() = _IdentityHashMap<K, V>;
|
|
|
| /**
|
|
|