| Index: sdk/lib/core/set.dart
|
| diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
|
| index 19be402b71fe579abfc4191ea6faa4d3299dfaba..998fe98261a3356ddb3ff14d62a46414b9052247 100644
|
| --- a/sdk/lib/core/set.dart
|
| +++ b/sdk/lib/core/set.dart
|
| @@ -20,7 +20,7 @@ part of dart.core;
|
| * guarantee anything about the order that elements are accessed in by
|
| * iteration. [LinkedHashSet] iterates in the insertion order of its elements.
|
| */
|
| -abstract class Set<E> extends IterableBase<E> {
|
| +abstract class Set<E> extends IterableBase<E> implements EfficientLength {
|
| /**
|
| * Creates an empty [Set].
|
| *
|
| @@ -48,6 +48,14 @@ abstract class Set<E> extends IterableBase<E> {
|
| factory Set.from(Iterable<E> other) = LinkedHashSet<E>.from;
|
|
|
| /**
|
| + * Returns the number of elements in this set.
|
| + *
|
| + * This operation is efficient, and does not require iterating and counting
|
| + * the elements.
|
| + */
|
| + int get length;
|
| +
|
| + /**
|
| * Returns true if [value] is in the set.
|
| */
|
| bool contains(Object value);
|
|
|