From 3b40ebd0cb7d8162e8f521f28000c7d5751d8837 Mon Sep 17 00:00:00 2001 From: mihaylov Date: Sun, 2 Apr 2006 21:48:48 +0000 Subject: Cleaned up the code of the primitive types --- src/library/scala/Boolean.java | 44 +++--- src/library/scala/Byte.java | 298 ++++++++++++++++++++--------------------- src/library/scala/Char.java | 269 ++++++++++++++++++------------------- src/library/scala/Double.java | 222 +++++++++++++++--------------- src/library/scala/Float.java | 228 +++++++++++++++---------------- src/library/scala/Int.java | 290 +++++++++++++++++++-------------------- src/library/scala/Long.java | 283 +++++++++++++++++++------------------- src/library/scala/Short.java | 293 +++++++++++++++++++--------------------- src/library/scala/Unit.java | 25 ++-- 9 files changed, 927 insertions(+), 1025 deletions(-) diff --git a/src/library/scala/Boolean.java b/src/library/scala/Boolean.java index 2a554ea472..d5d7dd737c 100644 --- a/src/library/scala/Boolean.java +++ b/src/library/scala/Boolean.java @@ -13,39 +13,29 @@ package scala; /** @meta class extends scala.AnyVal; */ -public abstract class Boolean extends AnyVal implements java.io.Serializable { +public abstract class Boolean extends AnyVal { - public final boolean value; + // prevent inheriting from the class + private Boolean() {} - public Boolean(boolean value) { - this.value = value; - } - - public boolean equals(java.lang.Object other) { - return other instanceof Boolean && value == ((Boolean)other).value; - } - public int hashCode() { - int bits = value ? 1231 : 1237; - return bits; - } - public String toString() { - return String.valueOf(value); - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString(); } /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.Object other) { return !equals(other); } + abstract public boolean $bang$eq(java.lang.Object other); /** @meta method []scala.Boolean; */ - public boolean $bang ( ) { return !value ; } - - public boolean $eq$eq (boolean that) { return value == that; } - public boolean $bang$eq (boolean that) { return value != that; } - public boolean $bar$bar (boolean that) { return value || that; } - public boolean $amp$amp (boolean that) { return value && that; } - public boolean $bar (boolean that) { return value | that; } - public boolean $amp (boolean that) { return value & that; } - public boolean $up (boolean that) { return value ^ that; } + abstract public boolean $bang(); + + abstract public boolean $eq$eq (boolean that); + abstract public boolean $bang$eq(boolean that); + abstract public boolean $bar$bar(boolean that); + abstract public boolean $amp$amp(boolean that); + abstract public boolean $bar (boolean that); + abstract public boolean $amp (boolean that); + abstract public boolean $up (boolean that); } diff --git a/src/library/scala/Byte.java b/src/library/scala/Byte.java index d691070cfb..6a0c327244 100644 --- a/src/library/scala/Byte.java +++ b/src/library/scala/Byte.java @@ -13,179 +13,165 @@ package scala; /** @meta class extends scala.AnyVal; */ -public abstract class Byte extends AnyVal implements java.io.Serializable { +public abstract class Byte extends AnyVal { - public final byte value; + // prevent inheriting from the class + private Byte() {} - public Byte (byte value) { - this.value = value; - } - - public boolean equals(java.lang.Object other) { - return other instanceof Byte && value == ((Byte )other).value; - } - public int hashCode() { - int bits = value; - return bits; - } - public String toString() { - return String.valueOf(value); - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString(); } /** @meta method []scala.Byte; */ - public byte toByte() { return (byte)value; } + abstract public byte toByte(); /** @meta method []scala.Short; */ - public short toShort() { return (short)value; } + abstract public short toShort(); /** @meta method []scala.Char; */ - public char toChar() { return (char)value; } + abstract public char toChar(); /** @meta method []scala.Int; */ - public int toInt() { return (int)value; } + abstract public int toInt(); /** @meta method []scala.Long; */ - public long toLong() { return (long)value; } + abstract public long toLong(); /** @meta method []scala.Float; */ - public float toFloat() { return (float)value; } + abstract public float toFloat(); + + /** @meta method []scala.Double; */ + abstract public double toDouble(); + /** @meta method []scala.Int; */ + abstract public int coerce(); + /** @meta method []scala.Short; */ + abstract public short coerce(); + /** @meta method []scala.Long; */ + abstract public long coerce(); + /** @meta method []scala.Float; */ + abstract public float coerce(); /** @meta method []scala.Double; */ - public double toDouble() { return (double)value; } + abstract public double coerce(); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.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 boolean $eq$eq (double that) { return value == that; } - public boolean $bang$eq (double that) { return value != that; } - public boolean $less (double that) { return value < that; } - public boolean $greater (double that) { return value > that; } - public boolean $less$eq (double that) { return value <= that; } - public boolean $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 boolean $eq$eq (float that) { return value == that; } - public boolean $bang$eq (float that) { return value != that; } - public boolean $less (float that) { return value < that; } - public boolean $greater (float that) { return value > that; } - public boolean $less$eq (float that) { return value <= that; } - public boolean $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 ( ) { 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 << that; } - public int $greater$greater(int that) { return value >> that; } - public int $greater$greater(long that) { return value >> that; } - public int $greater$greater$greater(int that) { return value >>>that; } - public int $greater$greater$greater(long that) { return value >>>that; } - - public boolean $eq$eq (long that) { return value == that; } - public boolean $bang$eq (long that) { return value != that; } - public boolean $less (long that) { return value < that; } - public boolean $greater (long that) { return value > that; } - public boolean $less$eq (long that) { return value <= that; } - public boolean $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 ( ) { return value ; } - - public boolean $eq$eq (int that) { return value == that; } - public boolean $bang$eq (int that) { return value != that; } - public boolean $less (int that) { return value < that; } - public boolean $greater (int that) { return value > that; } - public boolean $less$eq (int that) { return value <= that; } - public boolean $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 ( ) { return value ; } - - /** @meta method []scala.Short ; */ - public short coerce ( ) { return value ; } - - - public boolean $eq$eq (char that) { return value == that; } - public boolean $bang$eq (char that) { return value != that; } - public boolean $less (char that) { return value < that; } - public boolean $greater (char that) { return value > that; } - public boolean $less$eq (char that) { return value <= that; } - public boolean $greater$eq(char that) { return value >= that; } - public int $plus (char that) { return value + that; } - public int $minus (char that) { return value - that; } - public int $times (char that) { return value * that; } - public int $div (char that) { return value / that; } - public int $percent (char that) { return value % that; } - public int $bar (char that) { return value | that; } - public int $amp (char that) { return value & that; } - public int $up (char that) { return value ^ that; } - - public boolean $eq$eq (short that) { return value == that; } - public boolean $bang$eq (short that) { return value != that; } - public boolean $less (short that) { return value < that; } - public boolean $greater (short that) { return value > that; } - public boolean $less$eq (short that) { return value <= that; } - public boolean $greater$eq(short that) { return value >= that; } - public int $plus (short that) { return value + that; } - public int $minus (short that) { return value - that; } - public int $times (short that) { return value * that; } - public int $div (short that) { return value / that; } - public int $percent (short that) { return value % that; } - public int $bar (short that) { return value | that; } - public int $amp (short that) { return value & that; } - public int $up (short that) { return value ^ that; } - - public boolean $eq$eq (byte that) { return value == that; } - public boolean $bang$eq (byte that) { return value != that; } - public boolean $less (byte that) { return value < that; } - public boolean $greater (byte that) { return value > that; } - public boolean $less$eq (byte that) { return value <= that; } - public boolean $greater$eq(byte that) { return value >= that; } - public int $plus (byte that) { return value + that; } - public int $minus (byte that) { return value - that; } - public int $times (byte that) { return value * that; } - public int $div (byte that) { return value / that; } - public int $percent (byte that) { return value % that; } - public int $bar (byte that) { return value | that; } - public int $amp (byte that) { return value & that; } - public int $up (byte that) { return value ^ that; } + abstract public boolean $bang$eq(java.lang.Object other); + + /** @meta method []scala.Int; */ + abstract public int $plus(); + /** @meta method []scala.Int; */ + abstract public int $minus(); + /** @meta method []scala.Int; */ + abstract public int $tilde(); + + abstract public String $plus (String that); + + abstract public boolean $eq$eq (double that); + abstract public boolean $bang$eq (double that); + abstract public boolean $less (double that); + abstract public boolean $greater (double that); + abstract public boolean $less$eq (double that); + abstract public boolean $greater$eq(double that); + abstract public double $plus (double that); + abstract public double $minus (double that); + abstract public double $times (double that); + abstract public double $div (double that); + abstract public double $percent (double that); + + abstract public boolean $eq$eq (float that); + abstract public boolean $bang$eq (float that); + abstract public boolean $less (float that); + abstract public boolean $greater (float that); + abstract public boolean $less$eq (float that); + abstract public boolean $greater$eq(float that); + abstract public float $plus (float that); + abstract public float $minus (float that); + abstract public float $times (float that); + abstract public float $div (float that); + abstract public float $percent (float that); + + abstract public int $less$less (int that); + abstract public int $less$less (long that); + abstract public int $greater$greater(int that); + abstract public int $greater$greater(long that); + abstract public int $greater$greater$greater(int that); + abstract public int $greater$greater$greater(long that); + + abstract public boolean $eq$eq (long that); + abstract public boolean $bang$eq (long that); + abstract public boolean $less (long that); + abstract public boolean $greater (long that); + abstract public boolean $less$eq (long that); + abstract public boolean $greater$eq(long that); + abstract public long $plus (long that); + abstract public long $minus (long that); + abstract public long $times (long that); + abstract public long $div (long that); + abstract public long $percent (long that); + abstract public long $bar (long that); + abstract public long $amp (long that); + abstract public long $up (long that); + + abstract public boolean $eq$eq (int that); + abstract public boolean $bang$eq (int that); + abstract public boolean $less (int that); + abstract public boolean $greater (int that); + abstract public boolean $less$eq (int that); + abstract public boolean $greater$eq(int that); + abstract public int $plus (int that); + abstract public int $minus (int that); + abstract public int $times (int that); + abstract public int $div (int that); + abstract public int $percent (int that); + abstract public int $bar (int that); + abstract public int $amp (int that); + abstract public int $up (int that); + + abstract public boolean $eq$eq (char that); + abstract public boolean $bang$eq (char that); + abstract public boolean $less (char that); + abstract public boolean $greater (char that); + abstract public boolean $less$eq (char that); + abstract public boolean $greater$eq(char that); + abstract public int $plus (char that); + abstract public int $minus (char that); + abstract public int $times (char that); + abstract public int $div (char that); + abstract public int $percent (char that); + abstract public int $bar (char that); + abstract public int $amp (char that); + abstract public int $up (char that); + + abstract public boolean $eq$eq (short that); + abstract public boolean $bang$eq (short that); + abstract public boolean $less (short that); + abstract public boolean $greater (short that); + abstract public boolean $less$eq (short that); + abstract public boolean $greater$eq(short that); + abstract public int $plus (short that); + abstract public int $minus (short that); + abstract public int $times (short that); + abstract public int $div (short that); + abstract public int $percent (short that); + abstract public int $bar (short that); + abstract public int $amp (short that); + abstract public int $up (short that); + + abstract public boolean $eq$eq (byte that); + abstract public boolean $bang$eq (byte that); + abstract public boolean $less (byte that); + abstract public boolean $greater (byte that); + abstract public boolean $less$eq (byte that); + abstract public boolean $greater$eq(byte that); + abstract public int $plus (byte that); + abstract public int $minus (byte that); + abstract public int $times (byte that); + abstract public int $div (byte that); + abstract public int $percent (byte that); + abstract public int $bar (byte that); + abstract public int $amp (byte that); + abstract public int $up (byte that); + } diff --git a/src/library/scala/Char.java b/src/library/scala/Char.java index 2d3fce0529..b5644b7dee 100644 --- a/src/library/scala/Char.java +++ b/src/library/scala/Char.java @@ -13,177 +13,166 @@ package scala; /** @meta class extends scala.AnyVal; */ -public abstract class Char extends AnyVal implements java.io.Serializable { +public abstract class Char extends AnyVal { - public final char value; + private Char() {} - public Char (char value) { - this.value = value; - } - - public boolean equals(java.lang.Object other) { - return other instanceof Char && value == ((Char )other).value; - } - public int hashCode() { - int bits = value; - return bits; - } - public String toString() { - return String.valueOf(value); - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString(); } /** @meta method []scala.Byte; */ - public byte toByte() { return (byte)value; } + abstract public byte toByte(); /** @meta method []scala.Short; */ - public short toShort() { return (short)value; } + abstract public short toShort(); /** @meta method []scala.Char; */ - public char toChar() { return (char)value; } + abstract public char toChar(); /** @meta method []scala.Int; */ - public int toInt() { return (int)value; } + abstract public int toInt(); /** @meta method []scala.Long; */ - public long toLong() { return (long)value; } + abstract public long toLong(); /** @meta method []scala.Float; */ - public float toFloat() { return (float)value; } + abstract public float toFloat(); /** @meta method []scala.Double; */ - public double toDouble() { return (double)value; } + abstract public double toDouble(); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.Object other) { return !equals(other); } + abstract public boolean $bang$eq(java.lang.Object other); /** @meta method []scala.Int ; */ - public int $plus ( ) { return +value ; } + abstract public int $plus ( ); /** @meta method []scala.Int ; */ - public int $minus ( ) { return -value ; } - - public String $plus (String that) { return value + that; } - - public boolean $eq$eq (double that) { return value == that; } - public boolean $bang$eq (double that) { return value != that; } - public boolean $less (double that) { return value < that; } - public boolean $greater (double that) { return value > that; } - public boolean $less$eq (double that) { return value <= that; } - public boolean $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; } + abstract public int $minus ( ); + + abstract public String $plus (String that); + + abstract public boolean $eq$eq (double that); + abstract public boolean $bang$eq (double that); + abstract public boolean $less (double that); + abstract public boolean $greater (double that); + abstract public boolean $less$eq (double that); + abstract public boolean $greater$eq(double that); + abstract public double $plus (double that); + abstract public double $minus (double that); + abstract public double $times (double that); + abstract public double $div (double that); + abstract public double $percent (double that); /** @meta method []scala.Double ; */ - public double coerce ( ) { return value ; } - - public boolean $eq$eq (float that) { return value == that; } - public boolean $bang$eq (float that) { return value != that; } - public boolean $less (float that) { return value < that; } - public boolean $greater (float that) { return value > that; } - public boolean $less$eq (float that) { return value <= that; } - public boolean $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; } + abstract public double coerce ( ); + + abstract public boolean $eq$eq (float that); + abstract public boolean $bang$eq (float that); + abstract public boolean $less (float that); + abstract public boolean $greater (float that); + abstract public boolean $less$eq (float that); + abstract public boolean $greater$eq(float that); + abstract public float $plus (float that); + abstract public float $minus (float that); + abstract public float $times (float that); + abstract public float $div (float that); + abstract public float $percent (float that); /** @meta method []scala.Float ; */ - public float coerce ( ) { return value ; } + abstract public float coerce ( ); /** @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 << that; } - public int $greater$greater(int that) { return value >> that; } - public int $greater$greater(long that) { return value >> that; } - public int $greater$greater$greater(int that) { return value >>>that; } - public int $greater$greater$greater(long that) { return value >>>that; } - - public boolean $eq$eq (long that) { return value == that; } - public boolean $bang$eq (long that) { return value != that; } - public boolean $less (long that) { return value < that; } - public boolean $greater (long that) { return value > that; } - public boolean $less$eq (long that) { return value <= that; } - public boolean $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; } + abstract public int $tilde ( ); + + abstract public int $less$less (int that); + abstract public int $less$less (long that); + abstract public int $greater$greater(int that); + abstract public int $greater$greater(long that); + abstract public int $greater$greater$greater(int that); + abstract public int $greater$greater$greater(long that); + + abstract public boolean $eq$eq (long that); + abstract public boolean $bang$eq (long that); + abstract public boolean $less (long that); + abstract public boolean $greater (long that); + abstract public boolean $less$eq (long that); + abstract public boolean $greater$eq(long that); + abstract public long $plus (long that); + abstract public long $minus (long that); + abstract public long $times (long that); + abstract public long $div (long that); + abstract public long $percent (long that); + abstract public long $bar (long that); + abstract public long $amp (long that); + abstract public long $up (long that); /** @meta method []scala.Long ; */ - public long coerce ( ) { return value ; } - - public boolean $eq$eq (int that) { return value == that; } - public boolean $bang$eq (int that) { return value != that; } - public boolean $less (int that) { return value < that; } - public boolean $greater (int that) { return value > that; } - public boolean $less$eq (int that) { return value <= that; } - public boolean $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; } - - public boolean $eq$eq (char that) { return value == that; } - public boolean $bang$eq (char that) { return value != that; } - public boolean $less (char that) { return value < that; } - public boolean $greater (char that) { return value > that; } - public boolean $less$eq (char that) { return value <= that; } - public boolean $greater$eq(char that) { return value >= that; } - public int $plus (char that) { return value + that; } - public int $minus (char that) { return value - that; } - public int $times (char that) { return value * that; } - public int $div (char that) { return value / that; } - public int $percent (char that) { return value % that; } - public int $bar (char that) { return value | that; } - public int $amp (char that) { return value & that; } - public int $up (char that) { return value ^ that; } - - public boolean $eq$eq (short that) { return value == that; } - public boolean $bang$eq (short that) { return value != that; } - public boolean $less (short that) { return value < that; } - public boolean $greater (short that) { return value > that; } - public boolean $less$eq (short that) { return value <= that; } - public boolean $greater$eq(short that) { return value >= that; } - public int $plus (short that) { return value + that; } - public int $minus (short that) { return value - that; } - public int $times (short that) { return value * that; } - public int $div (short that) { return value / that; } - public int $percent (short that) { return value % that; } - public int $bar (short that) { return value | that; } - public int $amp (short that) { return value & that; } - public int $up (short that) { return value ^ that; } - - public boolean $eq$eq (byte that) { return value == that; } - public boolean $bang$eq (byte that) { return value != that; } - public boolean $less (byte that) { return value < that; } - public boolean $greater (byte that) { return value > that; } - public boolean $less$eq (byte that) { return value <= that; } - public boolean $greater$eq(byte that) { return value >= that; } - public int $plus (byte that) { return value + that; } - public int $minus (byte that) { return value - that; } - public int $times (byte that) { return value * that; } - public int $div (byte that) { return value / that; } - public int $percent (byte that) { return value % that; } - public int $bar (byte that) { return value | that; } - public int $amp (byte that) { return value & that; } - public int $up (byte that) { return value ^ that; } + abstract public long coerce ( ); + + abstract public boolean $eq$eq (int that); + abstract public boolean $bang$eq (int that); + abstract public boolean $less (int that); + abstract public boolean $greater (int that); + abstract public boolean $less$eq (int that); + abstract public boolean $greater$eq(int that); + abstract public int $plus (int that); + abstract public int $minus (int that); + abstract public int $times (int that); + abstract public int $div (int that); + abstract public int $percent (int that); + abstract public int $bar (int that); + abstract public int $amp (int that); + abstract public int $up (int that); + + abstract public boolean $eq$eq (char that); + abstract public boolean $bang$eq (char that); + abstract public boolean $less (char that); + abstract public boolean $greater (char that); + abstract public boolean $less$eq (char that); + abstract public boolean $greater$eq(char that); + abstract public int $plus (char that); + abstract public int $minus (char that); + abstract public int $times (char that); + abstract public int $div (char that); + abstract public int $percent (char that); + abstract public int $bar (char that); + abstract public int $amp (char that); + abstract public int $up (char that); + + abstract public boolean $eq$eq (short that); + abstract public boolean $bang$eq (short that); + abstract public boolean $less (short that); + abstract public boolean $greater (short that); + abstract public boolean $less$eq (short that); + abstract public boolean $greater$eq(short that); + abstract public int $plus (short that); + abstract public int $minus (short that); + abstract public int $times (short that); + abstract public int $div (short that); + abstract public int $percent (short that); + abstract public int $bar (short that); + abstract public int $amp (short that); + abstract public int $up (short that); + + abstract public boolean $eq$eq (byte that); + abstract public boolean $bang$eq (byte that); + abstract public boolean $less (byte that); + abstract public boolean $greater (byte that); + abstract public boolean $less$eq (byte that); + abstract public boolean $greater$eq(byte that); + abstract public int $plus (byte that); + abstract public int $minus (byte that); + abstract public int $times (byte that); + abstract public int $div (byte that); + abstract public int $percent (byte that); + abstract public int $bar (byte that); + abstract public int $amp (byte that); + abstract public int $up (byte that); /** @meta method []scala.Int ; */ - public int coerce ( ) { return value ; } + abstract public int coerce ( ); } diff --git a/src/library/scala/Double.java b/src/library/scala/Double.java index c00cdf3e20..ed910e63c5 100644 --- a/src/library/scala/Double.java +++ b/src/library/scala/Double.java @@ -13,140 +13,130 @@ package scala; /** @meta class extends scala.AnyVal; */ -public abstract class Double extends AnyVal implements java.io.Serializable { +public abstract class Double extends AnyVal { - public final double value; + // prevent inheriting from the class + private Double() {} - public Double (double value) { - this.value = value; - } - - public boolean equals(java.lang.Object other) { - return other instanceof Double && value == ((Double )other).value; - } - public int hashCode() { - long bits = java.lang.Double.doubleToLongBits(value); - return (int)(bits ^ (bits >>> 32)); - } - public String toString() { - return String.valueOf(value); - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString(); } /** @meta method []scala.Byte; */ - public byte toByte() { return (byte)value; } + abstract public byte toByte(); /** @meta method []scala.Short; */ - public short toShort() { return (short)value; } + abstract public short toShort(); /** @meta method []scala.Char; */ - public char toChar() { return (char)value; } + abstract public char toChar(); /** @meta method []scala.Int; */ - public int toInt() { return (int)value; } + abstract public int toInt(); /** @meta method []scala.Long; */ - public long toLong() { return (long)value; } + abstract public long toLong(); /** @meta method []scala.Float; */ - public float toFloat() { return (float)value; } + abstract public float toFloat(); /** @meta method []scala.Double; */ - public double toDouble() { return (double)value; } + abstract public double toDouble(); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.Object other) { return !equals(other); } - - /** @meta method []scala.Double ; */ - public double $plus ( ) { return +value ; } - /** @meta method []scala.Double ; */ - public double $minus ( ) { return -value ; } - - public String $plus (String that) { return value + that; } - - public boolean $eq$eq (double that) { return value == that; } - public boolean $bang$eq (double that) { return value != that; } - public boolean $less (double that) { return value < that; } - public boolean $greater (double that) { return value > that; } - public boolean $less$eq (double that) { return value <= that; } - public boolean $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; } - - public boolean $eq$eq (float that) { return value == that; } - public boolean $bang$eq (float that) { return value != that; } - public boolean $less (float that) { return value < that; } - public boolean $greater (float that) { return value > that; } - public boolean $less$eq (float that) { return value <= that; } - public boolean $greater$eq(float that) { return value >= that; } - public double $plus (float that) { return value + that; } - public double $minus (float that) { return value - that; } - public double $times (float that) { return value * that; } - public double $div (float that) { return value / that; } - public double $percent (float that) { return value % that; } - - public boolean $eq$eq (long that) { return value == that; } - public boolean $bang$eq (long that) { return value != that; } - public boolean $less (long that) { return value < that; } - public boolean $greater (long that) { return value > that; } - public boolean $less$eq (long that) { return value <= that; } - public boolean $greater$eq(long that) { return value >= that; } - public double $plus (long that) { return value + that; } - public double $minus (long that) { return value - that; } - public double $times (long that) { return value * that; } - public double $div (long that) { return value / that; } - public double $percent (long that) { return value % that; } - - public boolean $eq$eq (int that) { return value == that; } - public boolean $bang$eq (int that) { return value != that; } - public boolean $less (int that) { return value < that; } - public boolean $greater (int that) { return value > that; } - public boolean $less$eq (int that) { return value <= that; } - public boolean $greater$eq(int that) { return value >= that; } - public double $plus (int that) { return value + that; } - public double $minus (int that) { return value - that; } - public double $times (int that) { return value * that; } - public double $div (int that) { return value / that; } - public double $percent (int that) { return value % that; } - - public boolean $eq$eq (char that) { return value == that; } - public boolean $bang$eq (char that) { return value != that; } - public boolean $less (char that) { return value < that; } - public boolean $greater (char that) { return value > that; } - public boolean $less$eq (char that) { return value <= that; } - public boolean $greater$eq(char that) { return value >= that; } - public double $plus (char that) { return value + that; } - public double $minus (char that) { return value - that; } - public double $times (char that) { return value * that; } - public double $div (char that) { return value / that; } - public double $percent (char that) { return value % that; } - - public boolean $eq$eq (short that) { return value == that; } - public boolean $bang$eq (short that) { return value != that; } - public boolean $less (short that) { return value < that; } - public boolean $greater (short that) { return value > that; } - public boolean $less$eq (short that) { return value <= that; } - public boolean $greater$eq(short that) { return value >= that; } - public double $plus (short that) { return value + that; } - public double $minus (short that) { return value - that; } - public double $times (short that) { return value * that; } - public double $div (short that) { return value / that; } - public double $percent (short that) { return value % that; } - - public boolean $eq$eq (byte that) { return value == that; } - public boolean $bang$eq (byte that) { return value != that; } - public boolean $less (byte that) { return value < that; } - public boolean $greater (byte that) { return value > that; } - public boolean $less$eq (byte that) { return value <= that; } - public boolean $greater$eq(byte that) { return value >= that; } - public double $plus (byte that) { return value + that; } - public double $minus (byte that) { return value - that; } - public double $times (byte that) { return value * that; } - public double $div (byte that) { return value / that; } - public double $percent (byte that) { return value % that; } + abstract public boolean $bang$eq(java.lang.Object other); + + /** @meta method []scala.Double; */ + abstract public double $plus(); + /** @meta method []scala.Double; */ + abstract public double $minus(); + + abstract public String $plus (String that); + + abstract public boolean $eq$eq (double that); + abstract public boolean $bang$eq (double that); + abstract public boolean $less (double that); + abstract public boolean $greater (double that); + abstract public boolean $less$eq (double that); + abstract public boolean $greater$eq(double that); + abstract public double $plus (double that); + abstract public double $minus (double that); + abstract public double $times (double that); + abstract public double $div (double that); + abstract public double $percent (double that); + + abstract public boolean $eq$eq (float that); + abstract public boolean $bang$eq (float that); + abstract public boolean $less (float that); + abstract public boolean $greater (float that); + abstract public boolean $less$eq (float that); + abstract public boolean $greater$eq(float that); + abstract public double $plus (float that); + abstract public double $minus (float that); + abstract public double $times (float that); + abstract public double $div (float that); + abstract public double $percent (float that); + + abstract public boolean $eq$eq (long that); + abstract public boolean $bang$eq (long that); + abstract public boolean $less (long that); + abstract public boolean $greater (long that); + abstract public boolean $less$eq (long that); + abstract public boolean $greater$eq(long that); + abstract public double $plus (long that); + abstract public double $minus (long that); + abstract public double $times (long that); + abstract public double $div (long that); + abstract public double $percent (long that); + + abstract public boolean $eq$eq (int that); + abstract public boolean $bang$eq (int that); + abstract public boolean $less (int that); + abstract public boolean $greater (int that); + abstract public boolean $less$eq (int that); + abstract public boolean $greater$eq(int that); + abstract public double $plus (int that); + abstract public double $minus (int that); + abstract public double $times (int that); + abstract public double $div (int that); + abstract public double $percent (int that); + + abstract public boolean $eq$eq (short that); + abstract public boolean $bang$eq (short that); + abstract public boolean $less (short that); + abstract public boolean $greater (short that); + abstract public boolean $less$eq (short that); + abstract public boolean $greater$eq(short that); + abstract public double $plus (short that); + abstract public double $minus (short that); + abstract public double $times (short that); + abstract public double $div (short that); + abstract public double $percent (short that); + + abstract public boolean $eq$eq (char that); + abstract public boolean $bang$eq (char that); + abstract public boolean $less (char that); + abstract public boolean $greater (char that); + abstract public boolean $less$eq (char that); + abstract public boolean $greater$eq(char that); + abstract public double $plus (char that); + abstract public double $minus (char that); + abstract public double $times (char that); + abstract public double $div (char that); + abstract public double $percent (char that); + + abstract public boolean $eq$eq (byte that); + abstract public boolean $bang$eq (byte that); + abstract public boolean $less (byte that); + abstract public boolean $greater (byte that); + abstract public boolean $less$eq (byte that); + abstract public boolean $greater$eq(byte that); + abstract public double $plus (byte that); + abstract public double $minus (byte that); + abstract public double $times (byte that); + abstract public double $div (byte that); + abstract public double $percent (byte that); } diff --git a/src/library/scala/Float.java b/src/library/scala/Float.java index e32a3c1903..65b373f491 100644 --- a/src/library/scala/Float.java +++ b/src/library/scala/Float.java @@ -13,143 +13,133 @@ package scala; /** @meta class extends scala.AnyVal; */ -public abstract class Float extends AnyVal implements java.io.Serializable { +public abstract class Float extends AnyVal { - public final float value; + // prevent inheriting from the class + private Float() {} - public Float (float value) { - this.value = value; - } - - public boolean equals(java.lang.Object other) { - return other instanceof Float && value == ((Float )other).value; - } - public int hashCode() { - int bits = java.lang.Float.floatToIntBits(value); - return bits; - } - public String toString() { - return String.valueOf(value); - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString(); } /** @meta method []scala.Byte; */ - public byte toByte() { return (byte)value; } + abstract public byte toByte(); /** @meta method []scala.Short; */ - public short toShort() { return (short)value; } + abstract public short toShort(); /** @meta method []scala.Char; */ - public char toChar() { return (char)value; } + abstract public char toChar(); /** @meta method []scala.Int; */ - public int toInt() { return (int)value; } + abstract public int toInt(); /** @meta method []scala.Long; */ - public long toLong() { return (long)value; } + abstract public long toLong(); /** @meta method []scala.Float; */ - public float toFloat() { return (float)value; } + abstract public float toFloat(); + + /** @meta method []scala.Double; */ + abstract public double toDouble(); /** @meta method []scala.Double; */ - public double toDouble() { return (double)value; } + abstract public double coerce(); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.Object other) { return !equals(other); } - - /** @meta method []scala.Float ; */ - public float $plus ( ) { return +value ; } - /** @meta method []scala.Float ; */ - public float $minus ( ) { return -value ; } - - public String $plus (String that) { return value + that; } - - public boolean $eq$eq (double that) { return value == that; } - public boolean $bang$eq (double that) { return value != that; } - public boolean $less (double that) { return value < that; } - public boolean $greater (double that) { return value > that; } - public boolean $less$eq (double that) { return value <= that; } - public boolean $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 boolean $eq$eq (float that) { return value == that; } - public boolean $bang$eq (float that) { return value != that; } - public boolean $less (float that) { return value < that; } - public boolean $greater (float that) { return value > that; } - public boolean $less$eq (float that) { return value <= that; } - public boolean $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; } - - public boolean $eq$eq (long that) { return value == that; } - public boolean $bang$eq (long that) { return value != that; } - public boolean $less (long that) { return value < that; } - public boolean $greater (long that) { return value > that; } - public boolean $less$eq (long that) { return value <= that; } - public boolean $greater$eq(long that) { return value >= that; } - public float $plus (long that) { return value + that; } - public float $minus (long that) { return value - that; } - public float $times (long that) { return value * that; } - public float $div (long that) { return value / that; } - public float $percent (long that) { return value % that; } - - public boolean $eq$eq (int that) { return value == that; } - public boolean $bang$eq (int that) { return value != that; } - public boolean $less (int that) { return value < that; } - public boolean $greater (int that) { return value > that; } - public boolean $less$eq (int that) { return value <= that; } - public boolean $greater$eq(int that) { return value >= that; } - public float $plus (int that) { return value + that; } - public float $minus (int that) { return value - that; } - public float $times (int that) { return value * that; } - public float $div (int that) { return value / that; } - public float $percent (int that) { return value % that; } - - public boolean $eq$eq (short that) { return value == that; } - public boolean $bang$eq (short that) { return value != that; } - public boolean $less (short that) { return value < that; } - public boolean $greater (short that) { return value > that; } - public boolean $less$eq (short that) { return value <= that; } - public boolean $greater$eq(short that) { return value >= that; } - public float $plus (short that) { return value + that; } - public float $minus (short that) { return value - that; } - public float $times (short that) { return value * that; } - public float $div (short that) { return value / that; } - public float $percent (short that) { return value % that; } - - public boolean $eq$eq (char that) { return value == that; } - public boolean $bang$eq (char that) { return value != that; } - public boolean $less (char that) { return value < that; } - public boolean $greater (char that) { return value > that; } - public boolean $less$eq (char that) { return value <= that; } - public boolean $greater$eq(char that) { return value >= that; } - public float $plus (char that) { return value + that; } - public float $minus (char that) { return value - that; } - public float $times (char that) { return value * that; } - public float $div (char that) { return value / that; } - public float $percent (char that) { return value % that; } - - public boolean $eq$eq (byte that) { return value == that; } - public boolean $bang$eq (byte that) { return value != that; } - public boolean $less (byte that) { return value < that; } - public boolean $greater (byte that) { return value > that; } - public boolean $less$eq (byte that) { return value <= that; } - public boolean $greater$eq(byte that) { return value >= that; } - public float $plus (byte that) { return value + that; } - public float $minus (byte that) { return value - that; } - public float $times (byte that) { return value * that; } - public float $div (byte that) { return value / that; } - public float $percent (byte that) { return value % that; } + abstract public boolean $bang$eq(java.lang.Object other); + + /** @meta method []scala.Float; */ + abstract public float $plus (); + /** @meta method []scala.Float; */ + abstract public float $minus (); + + abstract public String $plus (String that); + + abstract public boolean $eq$eq (double that); + abstract public boolean $bang$eq (double that); + abstract public boolean $less (double that); + abstract public boolean $greater (double that); + abstract public boolean $less$eq (double that); + abstract public boolean $greater$eq(double that); + abstract public double $plus (double that); + abstract public double $minus (double that); + abstract public double $times (double that); + abstract public double $div (double that); + abstract public double $percent (double that); + + abstract public boolean $eq$eq (float that); + abstract public boolean $bang$eq (float that); + abstract public boolean $less (float that); + abstract public boolean $greater (float that); + abstract public boolean $less$eq (float that); + abstract public boolean $greater$eq(float that); + abstract public float $plus (float that); + abstract public float $minus (float that); + abstract public float $times (float that); + abstract public float $div (float that); + abstract public float $percent (float that); + + abstract public boolean $eq$eq (long that); + abstract public boolean $bang$eq (long that); + abstract public boolean $less (long that); + abstract public boolean $greater (long that); + abstract public boolean $less$eq (long that); + abstract public boolean $greater$eq(long that); + abstract public float $plus (long that); + abstract public float $minus (long that); + abstract public float $times (long that); + abstract public float $div (long that); + abstract public float $percent (long that); + + abstract public boolean $eq$eq (int that); + abstract public boolean $bang$eq (int that); + abstract public boolean $less (int that); + abstract public boolean $greater (int that); + abstract public boolean $less$eq (int that); + abstract public boolean $greater$eq(int that); + abstract public float $plus (int that); + abstract public float $minus (int that); + abstract public float $times (int that); + abstract public float $div (int that); + abstract public float $percent (int that); + + abstract public boolean $eq$eq (short that); + abstract public boolean $bang$eq (short that); + abstract public boolean $less (short that); + abstract public boolean $greater (short that); + abstract public boolean $less$eq (short that); + abstract public boolean $greater$eq(short that); + abstract public float $plus (short that); + abstract public float $minus (short that); + abstract public float $times (short that); + abstract public float $div (short that); + abstract public float $percent (short that); + + abstract public boolean $eq$eq (char that); + abstract public boolean $bang$eq (char that); + abstract public boolean $less (char that); + abstract public boolean $greater (char that); + abstract public boolean $less$eq (char that); + abstract public boolean $greater$eq(char that); + abstract public float $plus (char that); + abstract public float $minus (char that); + abstract public float $times (char that); + abstract public float $div (char that); + abstract public float $percent (char that); + + abstract public boolean $eq$eq (byte that); + abstract public boolean $bang$eq (byte that); + abstract public boolean $less (byte that); + abstract public boolean $greater (byte that); + abstract public boolean $less$eq (byte that); + abstract public boolean $greater$eq(byte that); + abstract public float $plus (byte that); + abstract public float $minus (byte that); + abstract public float $times (byte that); + abstract public float $div (byte that); + abstract public float $percent (byte that); } diff --git a/src/library/scala/Int.java b/src/library/scala/Int.java index 58f6b8726f..81f0178bb9 100644 --- a/src/library/scala/Int.java +++ b/src/library/scala/Int.java @@ -13,174 +13,162 @@ package scala; /** @meta class extends scala.AnyVal; */ -public abstract class Int extends AnyVal implements java.io.Serializable { +public abstract class Int extends AnyVal { - public final int value; + // prevent inheriting from the class + private Int() {} - public Int (int value) { - this.value = value; - } - - public boolean equals(java.lang.Object other) { - return other instanceof Int && value == ((Int )other).value; - } - public int hashCode() { - int bits = value; - return bits; - } - public String toString() { - return String.valueOf(value); - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString(); } /** @meta method []scala.Byte; */ - public byte toByte() { return (byte)value; } + abstract public byte toByte(); /** @meta method []scala.Short; */ - public short toShort() { return (short)value; } + abstract public short toShort(); /** @meta method []scala.Char; */ - public char toChar() { return (char)value; } + abstract public char toChar(); /** @meta method []scala.Int; */ - public int toInt() { return (int)value; } + abstract public int toInt(); /** @meta method []scala.Long; */ - public long toLong() { return (long)value; } + abstract public long toLong(); /** @meta method []scala.Float; */ - public float toFloat() { return (float)value; } + abstract public float toFloat(); + + /** @meta method []scala.Double; */ + abstract public double toDouble(); + /** @meta method []scala.Long; */ + abstract public long coerce(); + /** @meta method []scala.Float; */ + abstract public float coerce(); /** @meta method []scala.Double; */ - public double toDouble() { return (double)value; } + abstract public double coerce(); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.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 boolean $eq$eq (double that) { return value == that; } - public boolean $bang$eq (double that) { return value != that; } - public boolean $less (double that) { return value < that; } - public boolean $greater (double that) { return value > that; } - public boolean $less$eq (double that) { return value <= that; } - public boolean $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 boolean $eq$eq (float that) { return value == that; } - public boolean $bang$eq (float that) { return value != that; } - public boolean $less (float that) { return value < that; } - public boolean $greater (float that) { return value > that; } - public boolean $less$eq (float that) { return value <= that; } - public boolean $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 ( ) { 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 << that; } - public int $greater$greater(int that) { return value >> that; } - public int $greater$greater(long that) { return value >> that; } - public int $greater$greater$greater(int that) { return value >>>that; } - public int $greater$greater$greater(long that) { return value >>>that; } - - public boolean $eq$eq (long that) { return value == that; } - public boolean $bang$eq (long that) { return value != that; } - public boolean $less (long that) { return value < that; } - public boolean $greater (long that) { return value > that; } - public boolean $less$eq (long that) { return value <= that; } - public boolean $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 ( ) { return value ; } - - public boolean $eq$eq (int that) { return value == that; } - public boolean $bang$eq (int that) { return value != that; } - public boolean $less (int that) { return value < that; } - public boolean $greater (int that) { return value > that; } - public boolean $less$eq (int that) { return value <= that; } - public boolean $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; } - - - public boolean $eq$eq (char that) { return value == that; } - public boolean $bang$eq (char that) { return value != that; } - public boolean $less (char that) { return value < that; } - public boolean $greater (char that) { return value > that; } - public boolean $less$eq (char that) { return value <= that; } - public boolean $greater$eq(char that) { return value >= that; } - public int $plus (char that) { return value + that; } - public int $minus (char that) { return value - that; } - public int $times (char that) { return value * that; } - public int $div (char that) { return value / that; } - public int $percent (char that) { return value % that; } - public int $bar (char that) { return value | that; } - public int $amp (char that) { return value & that; } - public int $up (char that) { return value ^ that; } - - public boolean $eq$eq (short that) { return value == that; } - public boolean $bang$eq (short that) { return value != that; } - public boolean $less (short that) { return value < that; } - public boolean $greater (short that) { return value > that; } - public boolean $less$eq (short that) { return value <= that; } - public boolean $greater$eq(short that) { return value >= that; } - public int $plus (short that) { return value + that; } - public int $minus (short that) { return value - that; } - public int $times (short that) { return value * that; } - public int $div (short that) { return value / that; } - public int $percent (short that) { return value % that; } - public int $bar (short that) { return value | that; } - public int $amp (short that) { return value & that; } - public int $up (short that) { return value ^ that; } - - public boolean $eq$eq (byte that) { return value == that; } - public boolean $bang$eq (byte that) { return value != that; } - public boolean $less (byte that) { return value < that; } - public boolean $greater (byte that) { return value > that; } - public boolean $less$eq (byte that) { return value <= that; } - public boolean $greater$eq(byte that) { return value >= that; } - public int $plus (byte that) { return value + that; } - public int $minus (byte that) { return value - that; } - public int $times (byte that) { return value * that; } - public int $div (byte that) { return value / that; } - public int $percent (byte that) { return value % that; } - public int $bar (byte that) { return value | that; } - public int $amp (byte that) { return value & that; } - public int $up (byte that) { return value ^ that; } + abstract public boolean $bang$eq(java.lang.Object other); + + /** @meta method []scala.Int; */ + abstract public int $plus(); + /** @meta method []scala.Int; */ + abstract public int $minus(); + /** @meta method []scala.Int; */ + abstract public int $tilde(); + + abstract public String $plus (String that); + + abstract public boolean $eq$eq (double that); + abstract public boolean $bang$eq (double that); + abstract public boolean $less (double that); + abstract public boolean $greater (double that); + abstract public boolean $less$eq (double that); + abstract public boolean $greater$eq(double that); + abstract public double $plus (double that); + abstract public double $minus (double that); + abstract public double $times (double that); + abstract public double $div (double that); + abstract public double $percent (double that); + + abstract public boolean $eq$eq (float that); + abstract public boolean $bang$eq (float that); + abstract public boolean $less (float that); + abstract public boolean $greater (float that); + abstract public boolean $less$eq (float that); + abstract public boolean $greater$eq(float that); + abstract public float $plus (float that); + abstract public float $minus (float that); + abstract public float $times (float that); + abstract public float $div (float that); + abstract public float $percent (float that); + + abstract public int $less$less (int that); + abstract public int $less$less (long that); + abstract public int $greater$greater(int that); + abstract public int $greater$greater(long that); + abstract public int $greater$greater$greater(int that); + abstract public int $greater$greater$greater(long that); + + abstract public boolean $eq$eq (long that); + abstract public boolean $bang$eq (long that); + abstract public boolean $less (long that); + abstract public boolean $greater (long that); + abstract public boolean $less$eq (long that); + abstract public boolean $greater$eq(long that); + abstract public long $plus (long that); + abstract public long $minus (long that); + abstract public long $times (long that); + abstract public long $div (long that); + abstract public long $percent (long that); + abstract public long $bar (long that); + abstract public long $amp (long that); + abstract public long $up (long that); + + abstract public boolean $eq$eq (int that); + abstract public boolean $bang$eq (int that); + abstract public boolean $less (int that); + abstract public boolean $greater (int that); + abstract public boolean $less$eq (int that); + abstract public boolean $greater$eq(int that); + abstract public int $plus (int that); + abstract public int $minus (int that); + abstract public int $times (int that); + abstract public int $div (int that); + abstract public int $percent (int that); + abstract public int $bar (int that); + abstract public int $amp (int that); + abstract public int $up (int that); + + + abstract public boolean $eq$eq (char that); + abstract public boolean $bang$eq (char that); + abstract public boolean $less (char that); + abstract public boolean $greater (char that); + abstract public boolean $less$eq (char that); + abstract public boolean $greater$eq(char that); + abstract public int $plus (char that); + abstract public int $minus (char that); + abstract public int $times (char that); + abstract public int $div (char that); + abstract public int $percent (char that); + abstract public int $bar (char that); + abstract public int $amp (char that); + abstract public int $up (char that); + + abstract public boolean $eq$eq (short that); + abstract public boolean $bang$eq (short that); + abstract public boolean $less (short that); + abstract public boolean $greater (short that); + abstract public boolean $less$eq (short that); + abstract public boolean $greater$eq(short that); + abstract public int $plus (short that); + abstract public int $minus (short that); + abstract public int $times (short that); + abstract public int $div (short that); + abstract public int $percent (short that); + abstract public int $bar (short that); + abstract public int $amp (short that); + abstract public int $up (short that); + + abstract public boolean $eq$eq (byte that); + abstract public boolean $bang$eq (byte that); + abstract public boolean $less (byte that); + abstract public boolean $greater (byte that); + abstract public boolean $less$eq (byte that); + abstract public boolean $greater$eq(byte that); + abstract public int $plus (byte that); + abstract public int $minus (byte that); + abstract public int $times (byte that); + abstract public int $div (byte that); + abstract public int $percent (byte that); + abstract public int $bar (byte that); + abstract public int $amp (byte that); + abstract public int $up (byte that); + } diff --git a/src/library/scala/Long.java b/src/library/scala/Long.java index 70cee624cf..cb8f9ff680 100644 --- a/src/library/scala/Long.java +++ b/src/library/scala/Long.java @@ -13,169 +13,160 @@ package scala; /** @meta class extends scala.AnyVal; */ -public abstract class Long extends AnyVal implements java.io.Serializable { +public abstract class Long extends AnyVal { - public final long value; + // prevent inheriting from the class + private Long() {} - public Long (long value) { - this.value = value; - } - - public boolean equals(java.lang.Object other) { - return other instanceof Long && value == ((Long )other).value; - } - public int hashCode() { - long bits = value; - return (int)(bits ^ (bits >>> 32)); - } - public String toString() { - return String.valueOf(value); - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString(); } /** @meta method []scala.Byte; */ - public byte toByte() { return (byte)value; } + abstract public byte toByte(); /** @meta method []scala.Short; */ - public short toShort() { return (short)value; } + abstract public short toShort(); /** @meta method []scala.Char; */ - public char toChar() { return (char)value; } + abstract public char toChar(); /** @meta method []scala.Int; */ - public int toInt() { return (int)value; } + abstract public int toInt(); /** @meta method []scala.Long; */ - public long toLong() { return (long)value; } + abstract public long toLong(); /** @meta method []scala.Float; */ - public float toFloat() { return (float)value; } + abstract public float toFloat(); + + /** @meta method []scala.Double; */ + abstract public double toDouble(); /** @meta method []scala.Double; */ - public double toDouble() { return (double)value; } + abstract public double coerce(); + + /** @meta method []scala.Float; */ + abstract public float coerce(); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.Object other) { return !equals(other); } - - /** @meta method []scala.Long ; */ - public long $plus ( ) { return +value ; } - /** @meta method []scala.Long ; */ - public long $minus ( ) { return -value ; } - - public String $plus (String that) { return value + that; } - - public boolean $eq$eq (double that) { return value == that; } - public boolean $bang$eq (double that) { return value != that; } - public boolean $less (double that) { return value < that; } - public boolean $greater (double that) { return value > that; } - public boolean $less$eq (double that) { return value <= that; } - public boolean $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 boolean $eq$eq (float that) { return value == that; } - public boolean $bang$eq (float that) { return value != that; } - public boolean $less (float that) { return value < that; } - public boolean $greater (float that) { return value > that; } - public boolean $less$eq (float that) { return value <= that; } - public boolean $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 ( ) { return value ; } - /** @meta method []scala.Long ; */ - public long $tilde ( ) { return ~value ; } - - public long $less$less (int that) { return value << that; } - public long $less$less (long that) { return value << that; } - public long $greater$greater(int that) { return value >> that; } - public long $greater$greater(long that) { return value >> that; } - public long $greater$greater$greater(int that) { return value >>>that; } - public long $greater$greater$greater(long that) { return value >>>that; } - - public boolean $eq$eq (long that) { return value == that; } - public boolean $bang$eq (long that) { return value != that; } - public boolean $less (long that) { return value < that; } - public boolean $greater (long that) { return value > that; } - public boolean $less$eq (long that) { return value <= that; } - public boolean $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; } - - public boolean $eq$eq (int that) { return value == that; } - public boolean $bang$eq (int that) { return value != that; } - public boolean $less (int that) { return value < that; } - public boolean $greater (int that) { return value > that; } - public boolean $less$eq (int that) { return value <= that; } - public boolean $greater$eq(int that) { return value >= that; } - public long $plus (int that) { return value + that; } - public long $minus (int that) { return value - that; } - public long $times (int that) { return value * that; } - public long $div (int that) { return value / that; } - public long $percent (int that) { return value % that; } - public long $bar (int that) { return value | that; } - public long $amp (int that) { return value & that; } - public long $up (int that) { return value ^ that; } - - public boolean $eq$eq (short that) { return value == that; } - public boolean $bang$eq (short that) { return value != that; } - public boolean $less (short that) { return value < that; } - public boolean $greater (short that) { return value > that; } - public boolean $less$eq (short that) { return value <= that; } - public boolean $greater$eq(short that) { return value >= that; } - public long $plus (short that) { return value + that; } - public long $minus (short that) { return value - that; } - public long $times (short that) { return value * that; } - public long $div (short that) { return value / that; } - public long $percent (short that) { return value % that; } - public long $bar (short that) { return value | that; } - public long $amp (short that) { return value & that; } - public long $up (short that) { return value ^ that; } - - public boolean $eq$eq (char that) { return value == that; } - public boolean $bang$eq (char that) { return value != that; } - public boolean $less (char that) { return value < that; } - public boolean $greater (char that) { return value > that; } - public boolean $less$eq (char that) { return value <= that; } - public boolean $greater$eq(char that) { return value >= that; } - public long $plus (char that) { return value + that; } - public long $minus (char that) { return value - that; } - public long $times (char that) { return value * that; } - public long $div (char that) { return value / that; } - public long $percent (char that) { return value % that; } - public long $bar (char that) { return value | that; } - public long $amp (char that) { return value & that; } - public long $up (char that) { return value ^ that; } - - public boolean $eq$eq (byte that) { return value == that; } - public boolean $bang$eq (byte that) { return value != that; } - public boolean $less (byte that) { return value < that; } - public boolean $greater (byte that) { return value > that; } - public boolean $less$eq (byte that) { return value <= that; } - public boolean $greater$eq(byte that) { return value >= that; } - public long $plus (byte that) { return value + that; } - public long $minus (byte that) { return value - that; } - public long $times (byte that) { return value * that; } - public long $div (byte that) { return value / that; } - public long $percent (byte that) { return value % that; } - public long $bar (byte that) { return value | that; } - public long $amp (byte that) { return value & that; } - public long $up (byte that) { return value ^ that; } + abstract public boolean $bang$eq(java.lang.Object other); + + /** @meta method []scala.Long; */ + abstract public long $plus(); + /** @meta method []scala.Long; */ + abstract public long $minus(); + /** @meta method []scala.Long; */ + abstract public long $tilde(); + + abstract public String $plus (String that); + + abstract public boolean $eq$eq (double that); + abstract public boolean $bang$eq (double that); + abstract public boolean $less (double that); + abstract public boolean $greater (double that); + abstract public boolean $less$eq (double that); + abstract public boolean $greater$eq(double that); + abstract public double $plus (double that); + abstract public double $minus (double that); + abstract public double $times (double that); + abstract public double $div (double that); + abstract public double $percent (double that); + + abstract public boolean $eq$eq (float that); + abstract public boolean $bang$eq (float that); + abstract public boolean $less (float that); + abstract public boolean $greater (float that); + abstract public boolean $less$eq (float that); + abstract public boolean $greater$eq(float that); + abstract public float $plus (float that); + abstract public float $minus (float that); + abstract public float $times (float that); + abstract public float $div (float that); + abstract public float $percent (float that); + + abstract public long $less$less (int that); + abstract public long $less$less (long that); + abstract public long $greater$greater(int that); + abstract public long $greater$greater(long that); + abstract public long $greater$greater$greater(int that); + abstract public long $greater$greater$greater(long that); + + abstract public boolean $eq$eq (long that); + abstract public boolean $bang$eq (long that); + abstract public boolean $less (long that); + abstract public boolean $greater (long that); + abstract public boolean $less$eq (long that); + abstract public boolean $greater$eq(long that); + abstract public long $plus (long that); + abstract public long $minus (long that); + abstract public long $times (long that); + abstract public long $div (long that); + abstract public long $percent (long that); + abstract public long $bar (long that); + abstract public long $amp (long that); + abstract public long $up (long that); + + abstract public boolean $eq$eq (int that); + abstract public boolean $bang$eq (int that); + abstract public boolean $less (int that); + abstract public boolean $greater (int that); + abstract public boolean $less$eq (int that); + abstract public boolean $greater$eq(int that); + abstract public long $plus (int that); + abstract public long $minus (int that); + abstract public long $times (int that); + abstract public long $div (int that); + abstract public long $percent (int that); + abstract public long $bar (int that); + abstract public long $amp (int that); + abstract public long $up (int that); + + abstract public boolean $eq$eq (char that); + abstract public boolean $bang$eq (char that); + abstract public boolean $less (char that); + abstract public boolean $greater (char that); + abstract public boolean $less$eq (char that); + abstract public boolean $greater$eq(char that); + abstract public long $plus (char that); + abstract public long $minus (char that); + abstract public long $times (char that); + abstract public long $div (char that); + abstract public long $percent (char that); + abstract public long $bar (char that); + abstract public long $amp (char that); + abstract public long $up (char that); + + abstract public boolean $eq$eq (short that); + abstract public boolean $bang$eq (short that); + abstract public boolean $less (short that); + abstract public boolean $greater (short that); + abstract public boolean $less$eq (short that); + abstract public boolean $greater$eq(short that); + abstract public long $plus (short that); + abstract public long $minus (short that); + abstract public long $times (short that); + abstract public long $div (short that); + abstract public long $percent (short that); + abstract public long $bar (short that); + abstract public long $amp (short that); + abstract public long $up (short that); + + abstract public boolean $eq$eq (byte that); + abstract public boolean $bang$eq (byte that); + abstract public boolean $less (byte that); + abstract public boolean $greater (byte that); + abstract public boolean $less$eq (byte that); + abstract public boolean $greater$eq(byte that); + abstract public long $plus (byte that); + abstract public long $minus (byte that); + abstract public long $times (byte that); + abstract public long $div (byte that); + abstract public long $percent (byte that); + abstract public long $bar (byte that); + abstract public long $amp (byte that); + abstract public long $up (byte that); + } diff --git a/src/library/scala/Short.java b/src/library/scala/Short.java index c51b92b4ac..1a75f9c7a9 100644 --- a/src/library/scala/Short.java +++ b/src/library/scala/Short.java @@ -13,176 +13,163 @@ package scala; /** @meta class extends scala.AnyVal; */ -public abstract class Short extends AnyVal implements java.io.Serializable { +public abstract class Short extends AnyVal { - public final short value; + // prevent inheriting from the class + private Short() {} - public Short (short value) { - this.value = value; - } - - public boolean equals(java.lang.Object other) { - return other instanceof Short && value == ((Short )other).value; - } - public int hashCode() { - int bits = value; - return bits; - } - public String toString() { - return String.valueOf(value); - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString(); } /** @meta method []scala.Byte; */ - public byte toByte() { return (byte)value; } + abstract public byte toByte(); /** @meta method []scala.Short; */ - public short toShort() { return (short)value; } + abstract public short toShort(); /** @meta method []scala.Char; */ - public char toChar() { return (char)value; } + abstract public char toChar(); /** @meta method []scala.Int; */ - public int toInt() { return (int)value; } + abstract public int toInt(); /** @meta method []scala.Long; */ - public long toLong() { return (long)value; } + abstract public long toLong(); /** @meta method []scala.Float; */ - public float toFloat() { return (float)value; } + abstract public float toFloat(); + + /** @meta method []scala.Double; */ + abstract public double toDouble(); + /** @meta method []scala.Int; */ + abstract public int coerce(); + /** @meta method []scala.Long; */ + abstract public long coerce(); + /** @meta method []scala.Float; */ + abstract public float coerce(); /** @meta method []scala.Double; */ - public double toDouble() { return (double)value; } + abstract public double coerce(); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.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 boolean $eq$eq (double that) { return value == that; } - public boolean $bang$eq (double that) { return value != that; } - public boolean $less (double that) { return value < that; } - public boolean $greater (double that) { return value > that; } - public boolean $less$eq (double that) { return value <= that; } - public boolean $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 boolean $eq$eq (float that) { return value == that; } - public boolean $bang$eq (float that) { return value != that; } - public boolean $less (float that) { return value < that; } - public boolean $greater (float that) { return value > that; } - public boolean $less$eq (float that) { return value <= that; } - public boolean $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 ( ) { 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 << that; } - public int $greater$greater(int that) { return value >> that; } - public int $greater$greater(long that) { return value >> that; } - public int $greater$greater$greater(int that) { return value >>>that; } - public int $greater$greater$greater(long that) { return value >>>that; } - - public boolean $eq$eq (long that) { return value == that; } - public boolean $bang$eq (long that) { return value != that; } - public boolean $less (long that) { return value < that; } - public boolean $greater (long that) { return value > that; } - public boolean $less$eq (long that) { return value <= that; } - public boolean $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 ( ) { return value ; } - - public boolean $eq$eq (int that) { return value == that; } - public boolean $bang$eq (int that) { return value != that; } - public boolean $less (int that) { return value < that; } - public boolean $greater (int that) { return value > that; } - public boolean $less$eq (int that) { return value <= that; } - public boolean $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 ( ) { return value ; } - - - public boolean $eq$eq (char that) { return value == that; } - public boolean $bang$eq (char that) { return value != that; } - public boolean $less (char that) { return value < that; } - public boolean $greater (char that) { return value > that; } - public boolean $less$eq (char that) { return value <= that; } - public boolean $greater$eq(char that) { return value >= that; } - public int $plus (char that) { return value + that; } - public int $minus (char that) { return value - that; } - public int $times (char that) { return value * that; } - public int $div (char that) { return value / that; } - public int $percent (char that) { return value % that; } - public int $bar (char that) { return value | that; } - public int $amp (char that) { return value & that; } - public int $up (char that) { return value ^ that; } - - public boolean $eq$eq (short that) { return value == that; } - public boolean $bang$eq (short that) { return value != that; } - public boolean $less (short that) { return value < that; } - public boolean $greater (short that) { return value > that; } - public boolean $less$eq (short that) { return value <= that; } - public boolean $greater$eq(short that) { return value >= that; } - public int $plus (short that) { return value + that; } - public int $minus (short that) { return value - that; } - public int $times (short that) { return value * that; } - public int $div (short that) { return value / that; } - public int $percent (short that) { return value % that; } - public int $bar (short that) { return value | that; } - public int $amp (short that) { return value & that; } - public int $up (short that) { return value ^ that; } - - public boolean $eq$eq (byte that) { return value == that; } - public boolean $bang$eq (byte that) { return value != that; } - public boolean $less (byte that) { return value < that; } - public boolean $greater (byte that) { return value > that; } - public boolean $less$eq (byte that) { return value <= that; } - public boolean $greater$eq(byte that) { return value >= that; } - public int $plus (byte that) { return value + that; } - public int $minus (byte that) { return value - that; } - public int $times (byte that) { return value * that; } - public int $div (byte that) { return value / that; } - public int $percent (byte that) { return value % that; } - public int $bar (byte that) { return value | that; } - public int $amp (byte that) { return value & that; } - public int $up (byte that) { return value ^ that; } + abstract public boolean $bang$eq(java.lang.Object other); + + /** @meta method []scala.Int; */ + abstract public int $plus(); + /** @meta method []scala.Int; */ + abstract public int $minus(); + /** @meta method []scala.Int; */ + abstract public int $tilde(); + + abstract public String $plus (String that); + + abstract public boolean $eq$eq (double that); + abstract public boolean $bang$eq (double that); + abstract public boolean $less (double that); + abstract public boolean $greater (double that); + abstract public boolean $less$eq (double that); + abstract public boolean $greater$eq(double that); + abstract public double $plus (double that); + abstract public double $minus (double that); + abstract public double $times (double that); + abstract public double $div (double that); + abstract public double $percent (double that); + + abstract public boolean $eq$eq (float that); + abstract public boolean $bang$eq (float that); + abstract public boolean $less (float that); + abstract public boolean $greater (float that); + abstract public boolean $less$eq (float that); + abstract public boolean $greater$eq(float that); + abstract public float $plus (float that); + abstract public float $minus (float that); + abstract public float $times (float that); + abstract public float $div (float that); + abstract public float $percent (float that); + + abstract public int $less$less (int that); + abstract public int $less$less (long that); + abstract public int $greater$greater(int that); + abstract public int $greater$greater(long that); + abstract public int $greater$greater$greater(int that); + abstract public int $greater$greater$greater(long that); + + abstract public boolean $eq$eq (long that); + abstract public boolean $bang$eq (long that); + abstract public boolean $less (long that); + abstract public boolean $greater (long that); + abstract public boolean $less$eq (long that); + abstract public boolean $greater$eq(long that); + abstract public long $plus (long that); + abstract public long $minus (long that); + abstract public long $times (long that); + abstract public long $div (long that); + abstract public long $percent (long that); + abstract public long $bar (long that); + abstract public long $amp (long that); + abstract public long $up (long that); + + abstract public boolean $eq$eq (int that); + abstract public boolean $bang$eq (int that); + abstract public boolean $less (int that); + abstract public boolean $greater (int that); + abstract public boolean $less$eq (int that); + abstract public boolean $greater$eq(int that); + abstract public int $plus (int that); + abstract public int $minus (int that); + abstract public int $times (int that); + abstract public int $div (int that); + abstract public int $percent (int that); + abstract public int $bar (int that); + abstract public int $amp (int that); + abstract public int $up (int that); + + abstract public boolean $eq$eq (char that); + abstract public boolean $bang$eq (char that); + abstract public boolean $less (char that); + abstract public boolean $greater (char that); + abstract public boolean $less$eq (char that); + abstract public boolean $greater$eq(char that); + abstract public int $plus (char that); + abstract public int $minus (char that); + abstract public int $times (char that); + abstract public int $div (char that); + abstract public int $percent (char that); + abstract public int $bar (char that); + abstract public int $amp (char that); + abstract public int $up (char that); + + abstract public boolean $eq$eq (short that); + abstract public boolean $bang$eq (short that); + abstract public boolean $less (short that); + abstract public boolean $greater (short that); + abstract public boolean $less$eq (short that); + abstract public boolean $greater$eq(short that); + abstract public int $plus (short that); + abstract public int $minus (short that); + abstract public int $times (short that); + abstract public int $div (short that); + abstract public int $percent (short that); + abstract public int $bar (short that); + abstract public int $amp (short that); + abstract public int $up (short that); + + abstract public boolean $eq$eq (byte that); + abstract public boolean $bang$eq (byte that); + abstract public boolean $less (byte that); + abstract public boolean $greater (byte that); + abstract public boolean $less$eq (byte that); + abstract public boolean $greater$eq(byte that); + abstract public int $plus (byte that); + abstract public int $minus (byte that); + abstract public int $times (byte that); + abstract public int $div (byte that); + abstract public int $percent (byte that); + abstract public int $bar (byte that); + abstract public int $amp (byte that); + abstract public int $up (byte that); + } diff --git a/src/library/scala/Unit.java b/src/library/scala/Unit.java index 5240adef73..0fdea54c3b 100644 --- a/src/library/scala/Unit.java +++ b/src/library/scala/Unit.java @@ -12,28 +12,19 @@ package scala; -public abstract class Unit extends AnyVal { +public abstract class Unit extends AnyVal { - public final void value() {} + //public final void value() {} - public Unit ( ) { + private Unit() {} - } - - public boolean equals(java.lang.Object other) { - return other instanceof Unit; - } - public int hashCode() { - int bits = 4041; - return bits; - } - public String toString() { - return "()"; - } + public boolean equals(java.lang.Object other) { return super.equals(other); } + public int hashCode() { return super.hashCode(); } + public String toString() { return super.toString();} /** @meta method (scala.Any)scala.Boolean; */ - public boolean $eq$eq (java.lang.Object other) { return equals(other); } + abstract public boolean $eq$eq (java.lang.Object other); /** @meta method (scala.Any)scala.Boolean; */ - public boolean $bang$eq(java.lang.Object other) { return !equals(other); } + abstract public boolean $bang$eq(java.lang.Object other); } -- cgit v1.2.3