gecko-dev/js/js2/java/NativeNumber.java
1999-06-15 00:57:05 +00:00

18 lines
360 B
Java

class NativeNumber extends JSObject {
NativeNumber(double p) {
super("Number");
d = p;
}
JSValue defaultValue(Environment theEnv, String hint) {
if (hint.equals("String"))
return new JSString(Double.toString(d));
else
return new JSDouble(d);
}
double d;
}