| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 org_dartlang_compiler_util; | 5 part of org_dartlang_compiler_util; |
| 6 | 6 |
| 7 class Link<T> implements Iterable<T> { | 7 class Link<T> implements Iterable<T> { |
| 8 T get head => null; | 8 T get head => null; |
| 9 Link<T> get tail => null; | 9 Link<T> get tail => null; |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 void forEach(void f(T element)) {} | 52 void forEach(void f(T element)) {} |
| 53 | 53 |
| 54 bool operator ==(other) { | 54 bool operator ==(other) { |
| 55 if (other is !Link<T>) return false; | 55 if (other is !Link<T>) return false; |
| 56 return other.isEmpty; | 56 return other.isEmpty; |
| 57 } | 57 } |
| 58 | 58 |
| 59 String toString() => "[]"; | 59 String toString() => "[]"; |
| 60 } | 60 } |
| 61 | 61 |
| 62 interface LinkBuilder<T> default LinkBuilderImplementation<T> { | 62 abstract class LinkBuilder<T> { |
| 63 LinkBuilder(); | 63 factory LinkBuilder() = LinkBuilderImplementation; |
| 64 | 64 |
| 65 Link<T> toLink(); | 65 Link<T> toLink(); |
| 66 void addLast(T t); | 66 void addLast(T t); |
| 67 | 67 |
| 68 final int length; | 68 final int length; |
| 69 } | 69 } |
| OLD | NEW |