gecko-dev/js/js2/java/NativeNumber.java

18 lines
366 B
Java
Raw Normal View History

1999-05-26 01:01:07 +00:00
class NativeNumber extends JSObject {
NativeNumber(double p) {
1999-06-11 23:05:16 +00:00
super("Number", null);
1999-05-26 01:01:07 +00:00
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;
}