1
0
mirror of https://github.com/quinton-ashley/java2js synced 2024-12-29 10:11:54 +01:00
java2js/jdk/java/lang/Short.js
Quinton Ashley c2a07d4cdd 1.2.19
2022-06-27 19:09:22 -05:00

22 lines
526 B
JavaScript
Executable File

jdk.imports['java.lang.Short'].load = async () => {
class Short {}
Short.parseShort = (d) => {
return parseInt(d);
};
Short.compare = (a, b) => {
return a - b;
};
Short.valueOf = (a) => {
let val = Number(a);
if (isNaN(val)) {
throw new Error('NumberFormatException: For input string: ' + a);
}
return val;
};
Short.MAX_VALUE = Number.MAX_VALUE;
Short.POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
Short.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
Short.NaN = NaN;
jdk.java.lang.Short = Short;
};