mirror of
https://github.com/quinton-ashley/java2js
synced 2024-12-29 10:11:54 +01:00
25 lines
344 B
JavaScript
Executable File
25 lines
344 B
JavaScript
Executable File
jre.imports['java.util.Stack'].load = () => {
|
|
class Stack {
|
|
constructor() {
|
|
this.content = new Array();
|
|
}
|
|
|
|
pop() {
|
|
return this.content.pop();
|
|
}
|
|
|
|
push(t) {
|
|
this.content.push(t);
|
|
}
|
|
|
|
isEmpty() {
|
|
return this.content.length == 0;
|
|
}
|
|
|
|
peek() {
|
|
return this.content.slice(-1)[0];
|
|
}
|
|
}
|
|
jre.java.util.Stack = Stack;
|
|
}
|