1
0
mirror of https://github.com/quinton-ashley/java2js synced 2024-12-29 10:11:54 +01:00
java2js/jdk/java/lang/Long.js

22 lines
514 B
JavaScript
Raw Permalink Normal View History

2021-09-24 00:36:29 -05:00
jdk.imports['java.lang.Long'].load = async () => {
2021-09-23 01:41:44 -05:00
class Long {}
Long.parseLong = (d) => {
return parseInt(d);
2021-09-23 23:26:42 -05:00
};
2021-09-23 01:41:44 -05:00
Long.compare = (a, b) => {
return a - b;
2021-09-23 23:26:42 -05:00
};
2022-06-27 19:09:22 -05:00
Long.valueOf = (a) => {
let val = Number(a);
if (isNaN(val)) {
throw new Error('NumberFormatException: For input string: ' + a);
}
return val;
};
2021-09-23 01:41:44 -05:00
Long.MAX_VALUE = Number.MAX_VALUE;
Long.POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
Long.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
Long.NaN = NaN;
2021-09-23 23:26:42 -05:00
jdk.java.lang.Long = Long;
};