diff options
author | mihaylov <mihaylov@epfl.ch> | 2006-11-21 16:08:24 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2006-11-21 16:08:24 +0000 |
commit | 6e5b3945dd40ef553a95b9f1585fe7621c4f604e (patch) | |
tree | 361d741baadff485471ca8f43cd41751a6dfeef3 /src/library/scala/runtime/RichLong.scala | |
parent | 1b1040e91d9ca50edca6ed256bb5eaeb86b8cda2 (diff) | |
download | scala-6e5b3945dd40ef553a95b9f1585fe7621c4f604e.tar.gz scala-6e5b3945dd40ef553a95b9f1585fe7621c4f604e.tar.bz2 scala-6e5b3945dd40ef553a95b9f1585fe7621c4f604e.zip |
Added a rich class for every primitive type
Diffstat (limited to 'src/library/scala/runtime/RichLong.scala')
-rw-r--r-- | src/library/scala/runtime/RichLong.scala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/library/scala/runtime/RichLong.scala b/src/library/scala/runtime/RichLong.scala new file mode 100644 index 0000000000..45e90086d8 --- /dev/null +++ b/src/library/scala/runtime/RichLong.scala @@ -0,0 +1,23 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id$ + + +package scala.runtime + + +final class RichLong(x: Long) extends Proxy with Ordered[Long] { + + // Proxy.self + def self: Any = x + + // Ordered[Long].compare + def compare (y: Long): Int = if (x < y) -1 else if (x > y) 1 else 0 + +} |