summaryrefslogtreecommitdiff
path: root/src/library/scala/runtime/BoxedDouble.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/runtime/BoxedDouble.java')
-rw-r--r--src/library/scala/runtime/BoxedDouble.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/library/scala/runtime/BoxedDouble.java b/src/library/scala/runtime/BoxedDouble.java
new file mode 100644
index 0000000000..98736f03a4
--- /dev/null
+++ b/src/library/scala/runtime/BoxedDouble.java
@@ -0,0 +1,50 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2005, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+package scala.runtime;
+
+public class BoxedDouble extends BoxedNumber
+ implements java.io.Serializable
+{
+
+ public static BoxedDouble box(double value) {
+ return new BoxedDouble(value);
+ }
+
+ public final double value;
+
+ private BoxedDouble(double value) { this.value = value; }
+
+ public final byte byteValue() { return (byte)value; }
+ public final short shortValue() { return (short)value; }
+ public final char charValue() { return (char)value; }
+ public final int intValue() { return (int)value; }
+ public final long longValue() { return (long)value; }
+ 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();
+ }
+
+ public int hashCode() {
+ long bits = java.lang.Double.doubleToLongBits(value);
+ return (int)(bits ^ (bits >>> 32));
+ }
+
+ public String toString() {
+ return String.valueOf(value);
+ }
+}