summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/mutable/Stack.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-09-25 16:20:13 +0000
committerMartin Odersky <odersky@gmail.com>2009-09-25 16:20:13 +0000
commit4a727f3b01d0fa27ef51f7dba472116e021e3445 (patch)
treec9ab55ea7fe6051455271b23e9fbfc2f313015c0 /src/library/scala/collection/mutable/Stack.scala
parente31f18094dfba97c80871869a037172ff2c9c1c2 (diff)
downloadscala-4a727f3b01d0fa27ef51f7dba472116e021e3445.tar.gz
scala-4a727f3b01d0fa27ef51f7dba472116e021e3445.tar.bz2
scala-4a727f3b01d0fa27ef51f7dba472116e021e3445.zip
Collections refactoring.
Diffstat (limited to 'src/library/scala/collection/mutable/Stack.scala')
-rw-r--r--src/library/scala/collection/mutable/Stack.scala11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/library/scala/collection/mutable/Stack.scala b/src/library/scala/collection/mutable/Stack.scala
index 30caec89be..65bdae6780 100644
--- a/src/library/scala/collection/mutable/Stack.scala
+++ b/src/library/scala/collection/mutable/Stack.scala
@@ -9,9 +9,10 @@
// $Id$
-package scala.collection.mutable
+package scala.collection
+package mutable
-import scala.collection.generic._
+import generic._
/** A stack implements a data structure which allows to store and retrieve
* objects in a last-in-first-out (LIFO) fashion.
@@ -21,7 +22,7 @@ import scala.collection.generic._
* @version 2.8
*/
@serializable @cloneable
-class Stack[A] private (var elems: List[A]) extends collection.Sequence[A] with Cloneable[Stack[A]] {
+class Stack[A] private (var elems: List[A]) extends scala.collection.Sequence[A] with Cloneable[Stack[A]] {
def this() = this(Nil)
@@ -69,10 +70,10 @@ class Stack[A] private (var elems: List[A]) extends collection.Sequence[A] with
* @param elems the iterable object.
* @return the stack with the new elements on top.
*/
- def pushAll(elems: collection.Traversable[A]): this.type = { for (elem <- elems) { push(elem); () }; this }
+ def pushAll(elems: scala.collection.Traversable[A]): this.type = { for (elem <- elems) { push(elem); () }; this }
@deprecated("use pushAll") def ++=(it: Iterator[A]): this.type = pushAll(it)
- @deprecated("use pushAll") def ++=(it: collection.Iterable[A]): this.type = pushAll(it)
+ @deprecated("use pushAll") def ++=(it: scala.collection.Iterable[A]): this.type = pushAll(it)
/** Returns the top element of the stack. This method will not remove
* the element from the stack. An error is signaled if there is no