summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2003-08-12 12:28:00 +0000
committermichelou <michelou@epfl.ch>2003-08-12 12:28:00 +0000
commit562f1f62e3a7db5efe14353f56ba816805907b7d (patch)
treeff452ab6e7e697306744cef6193cc8c6fdccf503
parent7cd27574a602d8530292bdc251746745a644ce7e (diff)
downloadscala-562f1f62e3a7db5efe14353f56ba816805907b7d.tar.gz
scala-562f1f62e3a7db5efe14353f56ba816805907b7d.tar.bz2
scala-562f1f62e3a7db5efe14353f56ba816805907b7d.zip
toString method now returns "Stack(..)"
-rw-r--r--sources/scala/collection/mutable/Stack.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/sources/scala/collection/mutable/Stack.scala b/sources/scala/collection/mutable/Stack.scala
index 258fe1591f..db224c1ff7 100644
--- a/sources/scala/collection/mutable/Stack.scala
+++ b/sources/scala/collection/mutable/Stack.scala
@@ -4,9 +4,10 @@
** __\ \/ /__/ __ |/ /__/ __ | **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
-** $Id$
\* */
+// $Id$
+
package scala.collection.mutable;
@@ -88,4 +89,7 @@ class Stack[A] with MutableList[A] with StructuralEquality[Stack[A]] {
elements.zip(other.elements).forall {
case Pair(thiselem, thatelem) => thiselem == thatelem;
}};
+
+ override def toString() = toList.mkString("Stack(", ", ", ")");
+
}