GC stress fixes and other bugfixes; classpath progress

This commit is contained in:
Joel Dice
2007-07-29 17:32:23 -06:00
parent d5a00c4556
commit a2bd7d0668
27 changed files with 463 additions and 75 deletions

View File

@ -1,14 +1,35 @@
package java.lang;
public final class Double {
public final class Double extends Number {
public static final Class TYPE = Class.forCanonicalName("D");
private final double value;
public Double(String value) {
this.value = parseDouble(value);
}
public Double(double value) {
this.value = value;
}
public boolean equals(Object o) {
return o instanceof Double && ((Double) o).value == value;
}
public int hashCode() {
long v = doubleToRawLongBits(value);
return (int) ((v >> 32) ^ (v & 0xFF));
}
public String toString() {
return toString(value);
}
public static String toString(double v) {
return "todo";
}
public byte byteValue() {
return (byte) value;
}
@ -32,4 +53,14 @@ public final class Double {
public double doubleValue() {
return value;
}
public static double parseDouble(String s) {
// todo
return 0.0;
}
public static long doubleToRawLongBits(double value) {
// todo
return 0;
}
}