OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 part of dart.fletch._system; | 5 part of dart.dartino._system; |
6 | 6 |
7 class _ConstantMap<K, V> implements Map<K, V> { | 7 class _ConstantMap<K, V> implements Map<K, V> { |
8 final _keys; | 8 final _keys; |
9 final _values; | 9 final _values; |
10 | 10 |
11 bool containsValue(Object value) => _values.contains(value); | 11 bool containsValue(Object value) => _values.contains(value); |
12 | 12 |
13 bool containsKey(Object key) => _keys.contains(key); | 13 bool containsKey(Object key) => _keys.contains(key); |
14 | 14 |
15 V operator[](Object key) { | 15 V operator[](Object key) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 _ConstantMapIterable(this._list); | 66 _ConstantMapIterable(this._list); |
67 | 67 |
68 Iterator<E> get iterator => new ListIterator(_list); | 68 Iterator<E> get iterator => new ListIterator(_list); |
69 | 69 |
70 int get length => _list.length; | 70 int get length => _list.length; |
71 | 71 |
72 bool get isEmpty => _list.isEmpty; | 72 bool get isEmpty => _list.isEmpty; |
73 | 73 |
74 bool get isNotEmpty => _list.isNotEmpty; | 74 bool get isNotEmpty => _list.isNotEmpty; |
75 } | 75 } |
OLD | NEW |