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

Side by Side Diff: sdk/lib/core/uri.dart

Issue 14246008: Allow Object when doing lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type error. 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
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 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * A parsed URI, as specified by RFC-3986, http://tools.ietf.org/html/rfc3986. 8 * A parsed URI, as specified by RFC-3986, http://tools.ietf.org/html/rfc3986.
9 */ 9 */
10 class Uri { 10 class Uri {
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 // abcdefghijklmno 1009 // abcdefghijklmno
1010 0xfffe, // 0x60 - 0x6f 0111111111111111 1010 0xfffe, // 0x60 - 0x6f 0111111111111111
1011 // pqrstuvwxyz ~ 1011 // pqrstuvwxyz ~
1012 0x47ff]; // 0x70 - 0x7f 1111111111100010 1012 0x47ff]; // 0x70 - 0x7f 1111111111100010
1013 } 1013 }
1014 1014
1015 class _UnmodifiableMap<K, V> implements Map<K, V> { 1015 class _UnmodifiableMap<K, V> implements Map<K, V> {
1016 final Map _map; 1016 final Map _map;
1017 const _UnmodifiableMap(this._map); 1017 const _UnmodifiableMap(this._map);
1018 1018
1019 bool containsValue(V value) => _map.containsValue(value); 1019 bool containsValue(Object value) => _map.containsValue(value);
1020 bool containsKey(K key) => _map.containsKey(key); 1020 bool containsKey(Object key) => _map.containsKey(key);
1021 V operator [](K key) => _map[key]; 1021 V operator [](Object key) => _map[key];
1022 void operator []=(K key, V value) { 1022 void operator []=(K key, V value) {
1023 throw new UnsupportedError("Cannot modify an unmodifiable map"); 1023 throw new UnsupportedError("Cannot modify an unmodifiable map");
1024 } 1024 }
1025 V putIfAbsent(K key, V ifAbsent()) { 1025 V putIfAbsent(K key, V ifAbsent()) {
1026 throw new UnsupportedError("Cannot modify an unmodifiable map"); 1026 throw new UnsupportedError("Cannot modify an unmodifiable map");
1027 } 1027 }
1028 addAll(Map other) { 1028 addAll(Map other) {
1029 throw new UnsupportedError("Cannot modify an unmodifiable map"); 1029 throw new UnsupportedError("Cannot modify an unmodifiable map");
1030 } 1030 }
1031 V remove(K key) { 1031 V remove(Object key) {
1032 throw new UnsupportedError("Cannot modify an unmodifiable map"); 1032 throw new UnsupportedError("Cannot modify an unmodifiable map");
1033 } 1033 }
1034 void clear() { 1034 void clear() {
1035 throw new UnsupportedError("Cannot modify an unmodifiable map"); 1035 throw new UnsupportedError("Cannot modify an unmodifiable map");
1036 } 1036 }
1037 void forEach(void f(K key, V value)) => _map.forEach(f); 1037 void forEach(void f(K key, V value)) => _map.forEach(f);
1038 Iterable<K> get keys => _map.keys; 1038 Iterable<K> get keys => _map.keys;
1039 Iterable<V> get values => _map.values; 1039 Iterable<V> get values => _map.values;
1040 int get length => _map.length; 1040 int get length => _map.length;
1041 bool get isEmpty => _map.isEmpty; 1041 bool get isEmpty => _map.isEmpty;
1042 bool get isNotEmpty => _map.isNotEmpty; 1042 bool get isNotEmpty => _map.isNotEmpty;
1043 } 1043 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698