summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2006-04-04 08:18:23 +0000
committermihaylov <mihaylov@epfl.ch>2006-04-04 08:18:23 +0000
commit486042e89abaa69b82f2d602d342f7b032ce7047 (patch)
tree0ef37161cff822ef321669f8a20e66a3808cbea5 /src/library
parent56645fa25dbff9614522c405d37183e576baca1b (diff)
downloadscala-486042e89abaa69b82f2d602d342f7b032ce7047.tar.gz
scala-486042e89abaa69b82f2d602d342f7b032ce7047.tar.bz2
scala-486042e89abaa69b82f2d602d342f7b032ce7047.zip
Cleaned up the box classes
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/runtime/BoxedBoolean.java11
-rw-r--r--src/library/scala/runtime/BoxedByte.java12
-rw-r--r--src/library/scala/runtime/BoxedChar.java12
-rw-r--r--src/library/scala/runtime/BoxedDouble.java12
-rw-r--r--src/library/scala/runtime/BoxedFloat.java12
-rw-r--r--src/library/scala/runtime/BoxedInt.java12
-rw-r--r--src/library/scala/runtime/BoxedLong.java12
-rw-r--r--src/library/scala/runtime/BoxedShort.java12
-rw-r--r--src/library/scala/runtime/BoxedUnit.java8
9 files changed, 23 insertions, 80 deletions
diff --git a/src/library/scala/runtime/BoxedBoolean.java b/src/library/scala/runtime/BoxedBoolean.java
index 3154328eaf..54a0fb8aa4 100644
--- a/src/library/scala/runtime/BoxedBoolean.java
+++ b/src/library/scala/runtime/BoxedBoolean.java
@@ -29,16 +29,8 @@ public final class BoxedBoolean
public final boolean booleanValue() { return value; }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public boolean equals(java.lang.Object other) {
- return other instanceof BoxedBoolean && value == ((BoxedBoolean) other).value;
+ return this == other;
}
public int hashCode() {
@@ -48,4 +40,5 @@ public final class BoxedBoolean
public String toString() {
return String.valueOf(value);
}
+
}
diff --git a/src/library/scala/runtime/BoxedByte.java b/src/library/scala/runtime/BoxedByte.java
index 10f0eb285d..2ab7d7dc29 100644
--- a/src/library/scala/runtime/BoxedByte.java
+++ b/src/library/scala/runtime/BoxedByte.java
@@ -41,16 +41,9 @@ public final class BoxedByte extends BoxedNumber
public float floatValue() { return (float)value; }
public double doubleValue() { return (double)value; }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public boolean equals(java.lang.Object other) {
- return other instanceof BoxedNumber && value == ((BoxedNumber) other).byteValue();
+ return other instanceof BoxedNumber &&
+ value == ((BoxedNumber) other).byteValue();
}
public int hashCode() {
@@ -60,4 +53,5 @@ public final class BoxedByte extends BoxedNumber
public String toString() {
return String.valueOf(value);
}
+
}
diff --git a/src/library/scala/runtime/BoxedChar.java b/src/library/scala/runtime/BoxedChar.java
index 4bf1db4d16..4b1c4223e1 100644
--- a/src/library/scala/runtime/BoxedChar.java
+++ b/src/library/scala/runtime/BoxedChar.java
@@ -42,16 +42,9 @@ public class BoxedChar extends BoxedNumber
public float floatValue() { return (float)value; }
public double doubleValue() { return (double)value; }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public boolean equals(java.lang.Object other) {
- return other instanceof BoxedNumber && value == ((BoxedNumber) other).charValue();
+ return other instanceof BoxedNumber &&
+ value == ((BoxedNumber) other).charValue();
}
public int hashCode() {
@@ -61,4 +54,5 @@ public class BoxedChar extends BoxedNumber
public String toString() {
return String.valueOf(value);
}
+
}
diff --git a/src/library/scala/runtime/BoxedDouble.java b/src/library/scala/runtime/BoxedDouble.java
index eafa6f2f35..5fd896e6cd 100644
--- a/src/library/scala/runtime/BoxedDouble.java
+++ b/src/library/scala/runtime/BoxedDouble.java
@@ -32,16 +32,9 @@ public class BoxedDouble extends BoxedNumber
public final float floatValue() { return (float)value; }
public final double doubleValue() { return (double)value; }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public boolean equals(java.lang.Object other) {
- return other instanceof BoxedNumber && value == ((BoxedNumber) other).doubleValue();
+ return other instanceof BoxedNumber &&
+ value == ((BoxedNumber) other).doubleValue();
}
public int hashCode() {
@@ -52,4 +45,5 @@ public class BoxedDouble extends BoxedNumber
public String toString() {
return String.valueOf(value);
}
+
}
diff --git a/src/library/scala/runtime/BoxedFloat.java b/src/library/scala/runtime/BoxedFloat.java
index 90f1d82b9b..d2f66e5aa1 100644
--- a/src/library/scala/runtime/BoxedFloat.java
+++ b/src/library/scala/runtime/BoxedFloat.java
@@ -32,16 +32,9 @@ public class BoxedFloat extends BoxedNumber
public final float floatValue() { return (float)value; }
public final double doubleValue() { return (double)value; }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public boolean equals(java.lang.Object other) {
- return other instanceof BoxedNumber && value == ((BoxedNumber) other).floatValue();
+ return other instanceof BoxedNumber &&
+ value == ((BoxedNumber) other).floatValue();
}
public int hashCode() {
@@ -51,4 +44,5 @@ public class BoxedFloat extends BoxedNumber
public String toString() {
return String.valueOf(value);
}
+
}
diff --git a/src/library/scala/runtime/BoxedInt.java b/src/library/scala/runtime/BoxedInt.java
index a6d2400613..d666144f9d 100644
--- a/src/library/scala/runtime/BoxedInt.java
+++ b/src/library/scala/runtime/BoxedInt.java
@@ -42,16 +42,9 @@ public final class BoxedInt extends BoxedNumber
public final float floatValue() { return (float)value; }
public final double doubleValue() { return (double)value; }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public final boolean equals(java.lang.Object other) {
- return other instanceof BoxedNumber && value == ((BoxedNumber) other).intValue();
+ return other instanceof BoxedNumber &&
+ value == ((BoxedNumber) other).intValue();
}
public final int hashCode() {
@@ -61,4 +54,5 @@ public final class BoxedInt extends BoxedNumber
public final String toString() {
return String.valueOf(value);
}
+
}
diff --git a/src/library/scala/runtime/BoxedLong.java b/src/library/scala/runtime/BoxedLong.java
index 2740e2377a..79f4534b5a 100644
--- a/src/library/scala/runtime/BoxedLong.java
+++ b/src/library/scala/runtime/BoxedLong.java
@@ -32,16 +32,9 @@ public class BoxedLong extends BoxedNumber
public final float floatValue() { return (float)value; }
public final double doubleValue() { return (double)value; }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public boolean equals(java.lang.Object other) {
- return other instanceof BoxedNumber && value == ((BoxedNumber) other).longValue();
+ return other instanceof BoxedNumber &&
+ value == ((BoxedNumber) other).longValue();
}
public int hashCode() {
@@ -52,4 +45,5 @@ public class BoxedLong extends BoxedNumber
public String toString() {
return String.valueOf(value);
}
+
}
diff --git a/src/library/scala/runtime/BoxedShort.java b/src/library/scala/runtime/BoxedShort.java
index 29750904d9..2bc114d589 100644
--- a/src/library/scala/runtime/BoxedShort.java
+++ b/src/library/scala/runtime/BoxedShort.java
@@ -42,16 +42,9 @@ public final class BoxedShort extends BoxedNumber
public float floatValue() { return (float)value; }
public double doubleValue() { return (double)value; }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public boolean equals(java.lang.Object other) {
- return other instanceof BoxedNumber && value == ((BoxedNumber) other).shortValue();
+ return other instanceof BoxedNumber &&
+ value == ((BoxedNumber) other).shortValue();
}
public int hashCode() {
@@ -61,4 +54,5 @@ public final class BoxedShort extends BoxedNumber
public String toString() {
return String.valueOf(value);
}
+
}
diff --git a/src/library/scala/runtime/BoxedUnit.java b/src/library/scala/runtime/BoxedUnit.java
index 3dbe48e5fa..7ed7c6f1d8 100644
--- a/src/library/scala/runtime/BoxedUnit.java
+++ b/src/library/scala/runtime/BoxedUnit.java
@@ -20,14 +20,6 @@ public final class BoxedUnit
private BoxedUnit() { }
- public final boolean $eq$eq(java.lang.Object other) {
- return equals(other);
- }
-
- public final boolean $bang$eq(java.lang.Object other) {
- return !equals(other);
- }
-
public boolean equals(java.lang.Object other) {
return this == other;
}