diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-12-19 13:49:03 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-12-19 13:49:03 +0000 |
commit | ac849228490d5a0e2d3f048d649297d5c59b6ade (patch) | |
tree | 6314f2c06f37e67dec5827c3f94e25cf844a085c /src/library/scala/Short.cs | |
parent | d6c0efe5b4b89a0337f1cdcdabf8c607d81f4ae1 (diff) | |
download | scala-ac849228490d5a0e2d3f048d649297d5c59b6ade.tar.gz scala-ac849228490d5a0e2d3f048d649297d5c59b6ade.tar.bz2 scala-ac849228490d5a0e2d3f048d649297d5c59b6ade.zip |
Switching to the new build system and to the ne...
Switching to the new build system and to the new build system. This is a
MAJOR commit, so be careful when updating.
Diffstat (limited to 'src/library/scala/Short.cs')
-rw-r--r-- | src/library/scala/Short.cs | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/src/library/scala/Short.cs b/src/library/scala/Short.cs new file mode 100644 index 0000000000..5503b9360a --- /dev/null +++ b/src/library/scala/Short.cs @@ -0,0 +1,129 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id:Short.cs 5359 2005-12-16 16:33:49 +0100 (Fri, 16 Dec 2005) dubochet $ + +using System; +using scala.runtime; + +namespace scala +{ + + [Meta("class extends scala.AnyVal;")] + [Serializable] + public abstract class Short : AnyVal { + + public readonly short value; + + public Short(short value) + { + this.value = value; + } + + public override bool Equals(object other) + { + return (other is Short) && value == ((Short)other).value; + } + public override int GetHashCode() + { + return value; + } + public override string ToString() + { + return value.ToString(); + } + + [Meta("method (scala.Any)scala.Boolean;")] + public bool __eq__eq (object other) { return Equals(other); } + [Meta("method (scala.Any)scala.Boolean;")] + public bool __bang__eq(object other) { return !Equals(other); } + + [Meta("method []scala.Int;")] + public int __plus () { return +value; } + [Meta("method []scala.Int;")] + public int __minus () { return -value; } + + public string __plus (string that) { return value + that; } + + public bool __eq__eq (double that) { return value == that; } + public bool __bang__eq (double that) { return value != that; } + public bool __less (double that) { return value < that; } + public bool __greater (double that) { return value > that; } + public bool __less__eq (double that) { return value <= that; } + public bool __greater__eq(double that) { return value >= that; } + public double __plus (double that) { return value + that; } + public double __minus (double that) { return value - that; } + public double __times (double that) { return value * that; } + public double __div (double that) { return value / that; } + public double __percent (double that) { return value % that; } + + [Meta("method []scala.Double;")] + public double coerce ( ) { return value; } + + public bool __eq__eq (float that) { return value == that; } + public bool __bang__eq (float that) { return value != that; } + public bool __less (float that) { return value < that; } + public bool __greater (float that) { return value > that; } + public bool __less__eq (float that) { return value <= that; } + public bool __greater__eq(float that) { return value >= that; } + public float __plus (float that) { return value + that; } + public float __minus (float that) { return value - that; } + public float __times (float that) { return value * that; } + public float __div (float that) { return value / that; } + public float __percent (float that) { return value % that; } + + [Meta("method []scala.Float;")] + public float coerce (float dummy) { return value ; } + [Meta("method []scala.Int;")] + public int __tilde ( ) { return ~value ; } + + public int __less__less (int that) { return value << that; } + public int __less__less (long that) { return value << (int)that; } + public int __greater__greater(int that) { return value >> that; } + public int __greater__greater(long that) { return value >> (int)that; } + public int __greater__greater__greater(int that) { return (int)((uint)value >>that); } + public int __greater__greater__greater(long that) { return (int)((uint)value >>(int)that); } + + public bool __eq__eq (long that) { return value == that; } + public bool __bang__eq (long that) { return value != that; } + public bool __less (long that) { return value < that; } + public bool __greater (long that) { return value > that; } + public bool __less__eq (long that) { return value <= that; } + public bool __greater__eq(long that) { return value >= that; } + public long __plus (long that) { return value + that; } + public long __minus (long that) { return value - that; } + public long __times (long that) { return value * that; } + public long __div (long that) { return value / that; } + public long __percent (long that) { return value % that; } + public long __bar (long that) { return value | that; } + public long __amp (long that) { return value & that; } + public long __up (long that) { return value ^ that; } + + [Meta("method []scala.Long;")] + public long coerce (long dummy) { return value ; } + + public bool __eq__eq (int that) { return value == that; } + public bool __bang__eq (int that) { return value != that; } + public bool __less (int that) { return value < that; } + public bool __greater (int that) { return value > that; } + public bool __less__eq (int that) { return value <= that; } + public bool __greater__eq(int that) { return value >= that; } + public int __plus (int that) { return value + that; } + public int __minus (int that) { return value - that; } + public int __times (int that) { return value * that; } + public int __div (int that) { return value / that; } + public int __percent (int that) { return value % that; } + public int __bar (int that) { return value | that; } + public int __amp (int that) { return value & that; } + public int __up (int that) { return value ^ that; } + + [Meta("method []scala.Int;")] + public int coerce (int dummy) { return value ; } + + } +}
\ No newline at end of file |