| 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 dart2js.util; | 5 part of dart2js.util; |
| 6 | 6 |
| 7 class Link<T> { | 7 class Link<T> { |
| 8 T get head => throw new StateError("no elements"); | 8 T get head => throw new StateError("no elements"); |
| 9 Link<T> get tail => null; | 9 Link<T> get tail => null; |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 factory LinkBuilder() = LinkBuilderImplementation; | 125 factory LinkBuilder() = LinkBuilderImplementation; |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * Prepends all elements added to the builder to [tail]. The resulting list is | 128 * Prepends all elements added to the builder to [tail]. The resulting list is |
| 129 * returned and the builder is cleared. | 129 * returned and the builder is cleared. |
| 130 */ | 130 */ |
| 131 Link<T> toLink([Link<T> tail = const Link()]); | 131 Link<T> toLink([Link<T> tail = const Link()]); |
| 132 | 132 |
| 133 List<T> toList(); | 133 List<T> toList(); |
| 134 | 134 |
| 135 void addLast(T t); | 135 Link<T> addLast(T t); |
| 136 | 136 |
| 137 final int length; | 137 final int length; |
| 138 final bool isEmpty; | 138 final bool isEmpty; |
| 139 } | 139 } |
| OLD | NEW |