Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: pkg/collection/lib/priority_queue.dart

Issue 121583004: Add missing signatures for add and addAll to priority queue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/collection/lib/priority_queue.dart
diff --git a/pkg/collection/lib/priority_queue.dart b/pkg/collection/lib/priority_queue.dart
index eb0cda38e9f7e81a2362a1b023034c3926518fcd..efb3239027b38ff953a0b6356d9c5da806902fcf 100644
--- a/pkg/collection/lib/priority_queue.dart
+++ b/pkg/collection/lib/priority_queue.dart
@@ -35,6 +35,19 @@ abstract class PriorityQueue<E> {
bool contains(E object);
/**
+ * Adds element to the queue.
+ *
+ * The element will become the next to be removed by [removeFirst]
+ * when all elements with higher priority have been removed.
+ */
+ void add(E element);
+
+ /**
+ * Adds all [elements] to the queue.
+ */
+ void addAll(Iterable<E> elements);
+
+ /**
* Returns the next element that will be returned by [removeFirst].
*
* The element is not removed from the queue.
@@ -58,7 +71,7 @@ abstract class PriorityQueue<E> {
* Removes an element that compares equal to [element] in the queue.
*
* Returns true if an element is found and removed,
- * and false if not equal element is found.
+ * and false if no equal element is found.
*/
bool remove(E element);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698