| Index: sdk/lib/collection/queue.dart
|
| diff --git a/sdk/lib/collection/queue.dart b/sdk/lib/collection/queue.dart
|
| index c5d5d367ea67d876ce5f4aed0af2a3eb1d9e3c8e..85947d096b6b06304acac5e196f5a6071d2ee815 100644
|
| --- a/sdk/lib/collection/queue.dart
|
| +++ b/sdk/lib/collection/queue.dart
|
| @@ -9,7 +9,7 @@ part of dart.collection;
|
| * can iterate over the elements of a queue through [forEach] or with
|
| * an [Iterator].
|
| */
|
| -abstract class Queue<E> implements Collection<E> {
|
| +abstract class Queue<E> implements Iterable<E> {
|
|
|
| /**
|
| * Creates a queue.
|
| @@ -160,7 +160,7 @@ class _DoubleLinkedQueueEntrySentinel<E> extends DoubleLinkedQueueEntry<E> {
|
| *
|
| * Can do [removeAll] and [retainAll] in linear time.
|
| */
|
| -class DoubleLinkedQueue<E> extends Collection<E> implements Queue<E> {
|
| +class DoubleLinkedQueue<E> extends Iterable<E> implements Queue<E> {
|
| _DoubleLinkedQueueEntrySentinel<E> _sentinel;
|
| int _elementCount = 0;
|
|
|
| @@ -310,7 +310,7 @@ class DoubleLinkedQueue<E> extends Collection<E> implements Queue<E> {
|
| }
|
|
|
| String toString() {
|
| - return Collections.collectionToString(this);
|
| + return ToString.iterableToString(this);
|
| }
|
| }
|
|
|
| @@ -351,10 +351,10 @@ class _DoubleLinkedQueueIterator<E> implements Iterator<E> {
|
| *
|
| * The structure is efficient for any queue or stack usage.
|
| *
|
| - * Collection operations like [removeAll] and [removeWhere] are very
|
| + * Operations like [removeAll] and [removeWhere] are very
|
| * inefficient. If those are needed, use a [DoubleLinkedQueue] instead.
|
| */
|
| -class ListQueue<E> extends Collection<E> implements Queue<E>{
|
| +class ListQueue<E> extends Iterable<E> implements Queue<E>{
|
| static const int _INITIAL_CAPACITY = 8;
|
| List<E> _table;
|
| int _head;
|
| @@ -490,14 +490,6 @@ class ListQueue<E> extends Collection<E> implements Queue<E>{
|
| _modificationCount++;
|
| }
|
|
|
| - void removeAll(Iterable objectsToRemove) {
|
| - IterableMixinWorkaround.removeAllList(this, objectsToRemove);
|
| - }
|
| -
|
| - void retainAll(Iterable objectsToRetain) {
|
| - IterableMixinWorkaround.retainAll(this, objectsToRetain);
|
| - }
|
| -
|
| void _filterWhere(bool test(E element), bool removeMatching) {
|
| int index = _head;
|
| int modificationCount = _modificationCount;
|
| @@ -546,7 +538,7 @@ class ListQueue<E> extends Collection<E> implements Queue<E>{
|
| }
|
|
|
| String toString() {
|
| - return Collections.collectionToString(this);
|
| + return ToString.iterableToString(this);
|
| }
|
|
|
| // Queue interface.
|
|
|