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

Side by Side Diff: pkg/yaml/lib/src/yaml_map.dart

Issue 16097013: Make my pkg packages warning-clean. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library yaml_map; 5 library yaml_map;
6 6
7 import 'deep_equals.dart'; 7 import 'deep_equals.dart';
8 import 'utils.dart'; 8 import 'utils.dart';
9 9
10 /// This class wraps behaves almost identically to the normal Dart Map 10 /// This class wraps behaves almost identically to the normal Dart Map
(...skipping 18 matching lines...) Expand all
29 operator []=(key, value) { _map[_wrapKey(key)] = value; } 29 operator []=(key, value) { _map[_wrapKey(key)] = value; }
30 putIfAbsent(key, ifAbsent()) => _map.putIfAbsent(_wrapKey(key), ifAbsent); 30 putIfAbsent(key, ifAbsent()) => _map.putIfAbsent(_wrapKey(key), ifAbsent);
31 remove(key) => _map.remove(_wrapKey(key)); 31 remove(key) => _map.remove(_wrapKey(key));
32 void clear() => _map.clear(); 32 void clear() => _map.clear();
33 void forEach(void f(key, value)) => 33 void forEach(void f(key, value)) =>
34 _map.forEach((k, v) => f(_unwrapKey(k), v)); 34 _map.forEach((k, v) => f(_unwrapKey(k), v));
35 Iterable get keys => _map.keys.map(_unwrapKey); 35 Iterable get keys => _map.keys.map(_unwrapKey);
36 Iterable get values => _map.values; 36 Iterable get values => _map.values;
37 int get length => _map.length; 37 int get length => _map.length;
38 bool get isEmpty => _map.isEmpty; 38 bool get isEmpty => _map.isEmpty;
39 bool get isNotEmpty => map.isNotEmpty; 39 bool get isNotEmpty => _map.isNotEmpty;
Bob Nystrom 2013/06/04 23:17:39 Yay warnings!
40 String toString() => _map.toString(); 40 String toString() => _map.toString();
41 41
42 int get hashCode => hashCodeFor(_map); 42 int get hashCode => hashCodeFor(_map);
43 43
44 bool operator ==(other) { 44 bool operator ==(other) {
45 if (other is! YamlMap) return false; 45 if (other is! YamlMap) return false;
46 return deepEquals(this, other); 46 return deepEquals(this, other);
47 } 47 }
48 48
49 /// Wraps an object for use as a key in the map. 49 /// Wraps an object for use as a key in the map.
(...skipping 22 matching lines...) Expand all
72 int get hashCode => hashCodeFor(value); 72 int get hashCode => hashCodeFor(value);
73 73
74 String toString() => value.toString(); 74 String toString() => value.toString();
75 75
76 /// This is defined as both values being structurally equal. 76 /// This is defined as both values being structurally equal.
77 bool operator ==(other) { 77 bool operator ==(other) {
78 if (other is! _WrappedHashKey) return false; 78 if (other is! _WrappedHashKey) return false;
79 return deepEquals(this.value, other.value); 79 return deepEquals(this.value, other.value);
80 } 80 }
81 } 81 }
OLDNEW
« no previous file with comments | « pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698