diff options
author | Paul Phillips <paulp@improving.org> | 2009-06-17 21:23:05 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-06-17 21:23:05 +0000 |
commit | e58673295a780ab7e9e2098a907df3466866a300 (patch) | |
tree | 42f86877667555d5c91a5cceb1e852190a64dc51 /src/library/scala/Tuple2.scala | |
parent | cd7e1a17286cde131e93d1cb1b34dfd3e83d9d59 (diff) | |
download | scala-e58673295a780ab7e9e2098a907df3466866a300.tar.gz scala-e58673295a780ab7e9e2098a907df3466866a300.tar.bz2 scala-e58673295a780ab7e9e2098a907df3466866a300.zip |
Newly generated Tuple/Product/Function classes ...
Newly generated Tuple/Product/Function classes from new genprod, plus a
couple minor tweaks to genprod to keep tests happy.
Diffstat (limited to 'src/library/scala/Tuple2.scala')
-rw-r--r-- | src/library/scala/Tuple2.scala | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/library/scala/Tuple2.scala b/src/library/scala/Tuple2.scala index 89cf68b3b0..bcf30e58aa 100644 --- a/src/library/scala/Tuple2.scala +++ b/src/library/scala/Tuple2.scala @@ -1,7 +1,6 @@ - /* __ *\ ** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2008, LAMP/EPFL ** +** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** @@ -9,7 +8,7 @@ // $Id$ -// generated by genprod on Wed Apr 23 10:06:16 CEST 2008 (with extra methods) +// generated by genprod on Wed Jun 17 14:10:05 PDT 2009 (with extra methods) package scala @@ -83,14 +82,10 @@ object Tuple2 { /** Tuple2 is the canonical representation of a @see Product2 * */ -case class Tuple2[+T1, +T2](_1:T1, _2:T2) - extends Product2[T1, T2] { - - override def toString() = { - val sb = new StringBuilder - sb.append('(').append(_1).append(',').append(_2).append(')') - sb.toString - } +case class Tuple2[+T1, +T2](_1:T1,_2:T2) + extends Product2[T1, T2] +{ + override def toString() = "(" + _1 + "," + _2 + ")" /** Swap the elements of the tuple */ def swap: Tuple2[T2,T1] = Tuple2(_2, _1) |