summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/mutable/PriorityQueueProxy.scala
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2009-09-22 16:14:46 +0000
committerPhilipp Haller <hallerp@gmail.com>2009-09-22 16:14:46 +0000
commiteaa7f5738dd74feeb510efd8f4831feb16e6ac06 (patch)
tree0bdccc7afa8272a4472f940c49161d80b52d1853 /src/library/scala/collection/mutable/PriorityQueueProxy.scala
parent35f61f4fa2c277d7c459b148ab0cf633b2800386 (diff)
downloadscala-eaa7f5738dd74feeb510efd8f4831feb16e6ac06.tar.gz
scala-eaa7f5738dd74feeb510efd8f4831feb16e6ac06.tar.bz2
scala-eaa7f5738dd74feeb510efd8f4831feb16e6ac06.zip
Finished re-integrating mutable collections.
Diffstat (limited to 'src/library/scala/collection/mutable/PriorityQueueProxy.scala')
-rw-r--r--src/library/scala/collection/mutable/PriorityQueueProxy.scala22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/library/scala/collection/mutable/PriorityQueueProxy.scala b/src/library/scala/collection/mutable/PriorityQueueProxy.scala
index ec5cbb8902..e673732ff0 100644
--- a/src/library/scala/collection/mutable/PriorityQueueProxy.scala
+++ b/src/library/scala/collection/mutable/PriorityQueueProxy.scala
@@ -10,11 +10,6 @@
package scala.collection.mutable
-// A dummy to fool ant until reintegration.
-abstract class PriorityQueueProxy
-
-/* TODO: Reintegrate
-
/** This class implements priority queues using a heap. The
* elements of the queue have to be ordered in terms of the
* <code>Ordered[T]</code> class.
@@ -22,8 +17,8 @@ abstract class PriorityQueueProxy
* @author Matthias Zenger
* @version 1.0, 03/05/2004
*/
-abstract class PriorityQueueProxy[A <% Ordered[A]] extends PriorityQueue[A]
- with RandomAccessSeqProxy[A]
+abstract class PriorityQueueProxy[A](implicit ord: Ordering[A]) extends PriorityQueue[A]
+ with Proxy
{
def self: PriorityQueue[A]
@@ -49,20 +44,26 @@ abstract class PriorityQueueProxy[A <% Ordered[A]] extends PriorityQueue[A]
*
* @param elem the element to insert
*/
- override def +=(elem: A): Unit = self += elem
+ override def +=(elem: A): this.type = { self += elem; this }
/** Adds all elements provided by an <code>Iterable</code> object
* into the priority queue.
*
* @param iter an iterable object
*/
- override def ++=(iter: collection.Iterable[A]): Unit = self ++= iter
+ def ++=(iter: collection.Iterable[A]): this.type = {
+ self ++= iter
+ this
+ }
/** Adds all elements provided by an iterator into the priority queue.
*
* @param it an iterator
*/
- override def ++=(it: Iterator[A]): Unit = self ++= it
+ override def ++=(it: Iterator[A]): this.type = {
+ self ++= it
+ this
+ }
/** Adds all elements to the queue.
*
@@ -101,4 +102,3 @@ abstract class PriorityQueueProxy[A <% Ordered[A]] extends PriorityQueue[A]
def self = PriorityQueueProxy.this.self.clone()
}
}
-*/