diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-27 05:41:47 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-27 05:41:47 +0000 |
commit | 0c8e2195960d47e5b9be93efb7c95802ae40dca6 (patch) | |
tree | 4546dbdde688402560032002b62fbea9d84b1343 /src/library/scala/collection/mutable/StackProxy.scala | |
parent | ec127ce60de679809a75c3c85f25ec4256b9dd13 (diff) | |
download | scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.tar.gz scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.tar.bz2 scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.zip |
TraversableOnce. Review by odersky.
Diffstat (limited to 'src/library/scala/collection/mutable/StackProxy.scala')
-rw-r--r-- | src/library/scala/collection/mutable/StackProxy.scala | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/library/scala/collection/mutable/StackProxy.scala b/src/library/scala/collection/mutable/StackProxy.scala index 99f556112a..d3810dd158 100644 --- a/src/library/scala/collection/mutable/StackProxy.scala +++ b/src/library/scala/collection/mutable/StackProxy.scala @@ -48,15 +48,7 @@ trait StackProxy[A] extends Stack[A] with Proxy { this } - override def pushAll(elems: Iterator[A]): this.type = { - self pushAll elems - this - } - - override def pushAll(elems: scala.collection.Traversable[A]): this.type = { - self pushAll elems - this - } + override def pushAll(xs: TraversableOnce[A]): this.type = { self pushAll xs; this } /** Pushes all elements provided by an <code>Iterable</code> object * on top of the stack. The elements are pushed in the order they @@ -64,21 +56,8 @@ trait StackProxy[A] extends Stack[A] with Proxy { * * @param iter an iterable object */ - @deprecated("use pushAll") override def ++=(iter: scala.collection.Iterable[A]): this.type = { - self ++= iter - this - } + @deprecated("use pushAll") override def ++=(xs: TraversableOnce[A]): this.type = { self ++= xs ; this } - /** Pushes all elements provided by an iterator - * on top of the stack. The elements are pushed in the order they - * are given out by the iterator. - * - * @param iter an iterator - */ - @deprecated("use pushAll") override def ++=(it: Iterator[A]): this.type = { - self ++= it - this - } override def push(elem1: A, elem2: A, elems: A*): this.type = { self.push(elem1).push(elem2).pushAll(elems) |