| Index: pkg/compiler/lib/src/util/link.dart
|
| diff --git a/pkg/compiler/lib/src/util/link.dart b/pkg/compiler/lib/src/util/link.dart
|
| index d09639cae2764fae3eef4ccd6ac165182d8bb5b2..3a9c133982b050f4b78b0dcab15276f39a8ff26e 100644
|
| --- a/pkg/compiler/lib/src/util/link.dart
|
| +++ b/pkg/compiler/lib/src/util/link.dart
|
| @@ -122,19 +122,31 @@ class Link<T> {
|
| Link copyWithout(e) => this;
|
| }
|
|
|
| +/// Builder object for creating linked lists using [Link] or fixed-length [List]
|
| +/// objects.
|
| abstract class LinkBuilder<T> {
|
| factory LinkBuilder() = LinkBuilderImplementation;
|
|
|
| - /**
|
| - * Prepends all elements added to the builder to [tail]. The resulting list is
|
| - * returned and the builder is cleared.
|
| - */
|
| + /// Prepends all elements added to the builder to [tail]. The resulting list
|
| + /// is returned and the builder is cleared.
|
| Link<T> toLink([Link<T> tail = const Link()]);
|
|
|
| + /// Creates a new fixed length containing all added elements. The
|
| + /// resulting list is returned and the builder is cleared.
|
| List<T> toList();
|
|
|
| + /// Adds the element [t] to the end of the list being built.
|
| Link<T> addLast(T t);
|
|
|
| + /// Returns the first element in the list being built.
|
| + T get first;
|
| +
|
| + /// Returns the number of elements in the list being built.
|
| final int length;
|
| +
|
| + /// Returns `true` if the list being built is empty.
|
| final bool isEmpty;
|
| +
|
| + /// Removes all added elements and resets the builder.
|
| + void clear();
|
| }
|
|
|