diff options
author | michelou <michelou@epfl.ch> | 2004-10-25 14:02:28 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2004-10-25 14:02:28 +0000 |
commit | a9664dbf3d60a8e75ea06f7f1b3dac95150d3cc8 (patch) | |
tree | 83300c695f5a3821290815b1731d2c734c2703e4 /sources | |
parent | e9fd9059f26ae0ef4681b79e1f5fc66af65aa695 (diff) | |
download | scala-a9664dbf3d60a8e75ea06f7f1b3dac95150d3cc8.tar.gz scala-a9664dbf3d60a8e75ea06f7f1b3dac95150d3cc8.tar.bz2 scala-a9664dbf3d60a8e75ea06f7f1b3dac95150d3cc8.zip |
- modified comment.
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/Enumeration.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sources/scala/Enumeration.scala b/sources/scala/Enumeration.scala index 2aeaaf0cc0..09df27413e 100644 --- a/sources/scala/Enumeration.scala +++ b/sources/scala/Enumeration.scala @@ -19,7 +19,7 @@ import scala.collection.mutable._; * <b>object</b> Main <b>with</b> Application { * * <b>object</b> WeekDays <b>extends</b> Enumeration { - * val Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value + * <b>val</b> Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value * } * * <b>def</b> isWorkingDay(d: WeekDays.Value) = @@ -31,6 +31,7 @@ import scala.collection.mutable._; * * @param initial the initial integer value associated with the first element * @param names the sequence of element names of the enumeration + * * @author Matthias Zenger * @version 1.0, 10/02/04 */ @@ -63,10 +64,10 @@ abstract class Enumeration(initial: Int, names: String*) { private def updateCache: List[Value] = if (vcache == null) { - vcache = values.values.toList.sort((p1, p2) => p1.id < p2.id); - vcache + vcache = values.values.toList.sort((p1, p2) => p1.id < p2.id); + vcache } else - vcache; + vcache; protected var nextId = initial; |