| OLD | NEW |
| 1 // Copyright (c) 2011, 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 /** | 5 /** |
| 6 * A node in a splay tree. It holds the key, the value and the left | 6 * A node in a splay tree. It holds the key, the value and the left |
| 7 * and right children in the tree. | 7 * and right children in the tree. |
| 8 */ | 8 */ |
| 9 class SplayTreeNode<K, V> { | 9 class SplayTreeNode<K, V> { |
| 10 SplayTreeNode(K k, V v) { | 10 SplayTreeNode(K k, V v) { |
| 11 key = k; | 11 key = k; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 List<K> list = new List<K>(); | 227 List<K> list = new List<K>(); |
| 228 forEach((K k, V v) { list.add(k); }); | 228 forEach((K k, V v) { list.add(k); }); |
| 229 return list; | 229 return list; |
| 230 } | 230 } |
| 231 | 231 |
| 232 Collection<V> getValues() { | 232 Collection<V> getValues() { |
| 233 List<V> list = new List<V>(); | 233 List<V> list = new List<V>(); |
| 234 forEach((K k, V v) { list.add(v); }); | 234 forEach((K k, V v) { list.add(v); }); |
| 235 return list; | 235 return list; |
| 236 } | 236 } |
| 237 |
| 238 String toString() { |
| 239 return Maps.mapToString(this); |
| 240 } |
| 237 } | 241 } |
| OLD | NEW |