Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / java / util / Stack.js
index 49ff5c6..d1150e1 100644 (file)
@@ -1,45 +1,45 @@
-Clazz.load(["java.util.Vector"],"java.util.Stack",["java.util.EmptyStackException"],function(){\r
-c$=Clazz.declareType(java.util,"Stack",java.util.Vector);\r
-Clazz.defineMethod(c$,"empty",\r
-function(){\r
-return this.elementCount==0;\r
-});\r
-Clazz.defineMethod(c$,"peek",\r
-function(){\r
-try{\r
-return this.elementData[this.elementCount-1];\r
-}catch(e){\r
-if(Clazz.instanceOf(e,IndexOutOfBoundsException)){\r
-throw new java.util.EmptyStackException();\r
-}else{\r
-throw e;\r
-}\r
-}\r
-});\r
-Clazz.defineMethod(c$,"pop",\r
-function(){\r
-try{\r
-var index=this.elementCount-1;\r
-var obj=this.elementData[index];\r
-this.removeElementAt(index);\r
-return obj;\r
-}catch(e){\r
-if(Clazz.instanceOf(e,IndexOutOfBoundsException)){\r
-throw new java.util.EmptyStackException();\r
-}else{\r
-throw e;\r
-}\r
-}\r
-});\r
-Clazz.defineMethod(c$,"push",\r
-function(object){\r
-this.addElement(object);\r
-return object;\r
-},"~O");\r
-Clazz.defineMethod(c$,"search",\r
-function(o){\r
-var index=this.lastIndexOf(o);\r
-if(index>=0)return(this.elementCount-index);\r
-return-1;\r
-},"~O");\r
-});\r
+Clazz.load(["java.util.Vector"],"java.util.Stack",["java.util.EmptyStackException"],function(){
+c$=Clazz.declareType(java.util,"Stack",java.util.Vector);
+Clazz.defineMethod(c$,"empty",
+function(){
+return this.elementCount==0;
+});
+Clazz.defineMethod(c$,"peek",
+function(){
+try{
+return this.elementData[this.elementCount-1];
+}catch(e){
+if(Clazz.instanceOf(e,IndexOutOfBoundsException)){
+throw new java.util.EmptyStackException();
+}else{
+throw e;
+}
+}
+});
+Clazz.defineMethod(c$,"pop",
+function(){
+try{
+var index=this.elementCount-1;
+var obj=this.elementData[index];
+this.removeElementAt(index);
+return obj;
+}catch(e){
+if(Clazz.instanceOf(e,IndexOutOfBoundsException)){
+throw new java.util.EmptyStackException();
+}else{
+throw e;
+}
+}
+});
+Clazz.defineMethod(c$,"push",
+function(object){
+this.addElement(object);
+return object;
+},"~O");
+Clazz.defineMethod(c$,"search",
+function(o){
+var index=this.lastIndexOf(o);
+if(index>=0)return(this.elementCount-index);
+return-1;
+},"~O");
+});