Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / java / util / Vector.js
index e3059d0..ce16ec8 100644 (file)
-Clazz.load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.Vector",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringBuffer","java.lang.reflect.Array","java.util.Arrays","$.Collections","$.Enumeration","$.NoSuchElementException"],function(){\r
-c$=Clazz.decorateAsClass(function(){\r
-this.elementCount=0;\r
-this.elementData=null;\r
-this.capacityIncrement=0;\r
-Clazz.instantialize(this,arguments);\r
-},java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]);\r
-Clazz.makeConstructor(c$,\r
-function(){\r
-this.construct(10,0);\r
-});\r
-Clazz.makeConstructor(c$,\r
-function(capacity){\r
-this.construct(capacity,0);\r
-},"~N");\r
-Clazz.makeConstructor(c$,\r
-function(capacity,capacityIncrement){\r
-Clazz.superConstructor(this,java.util.Vector,[]);\r
-this.elementCount=0;\r
-try{\r
-this.elementData=this.newElementArray(capacity);\r
-}catch(e){\r
-if(Clazz.instanceOf(e,NegativeArraySizeException)){\r
-throw new IllegalArgumentException();\r
-}else{\r
-throw e;\r
-}\r
-}\r
-this.capacityIncrement=capacityIncrement;\r
-},"~N,~N");\r
-Clazz.makeConstructor(c$,\r
-function(collection){\r
-this.construct(collection.size(),0);\r
-var it=collection.iterator();\r
-while(it.hasNext()){\r
-this.elementData[this.elementCount++]=it.next();\r
-}\r
-},"java.util.Collection");\r
-Clazz.defineMethod(c$,"newElementArray",\r
-($fz=function(size){\r
-return new Array(size);\r
-},$fz.isPrivate=true,$fz),"~N");\r
-Clazz.defineMethod(c$,"add",\r
-function(location,object){\r
-this.insertElementAt(object,location);\r
-},"~N,~O");\r
-Clazz.defineMethod(c$,"add",\r
-function(object){\r
-this.addElement(object);\r
-return true;\r
-},"~O");\r
-Clazz.defineMethod(c$,"addAll",\r
-function(location,collection){\r
-if(0<=location&&location<=this.elementCount){\r
-var size=collection.size();\r
-if(size==0){\r
-return false;\r
-}var required=size-(this.elementData.length-this.elementCount);\r
-if(required>0){\r
-this.growBy(required);\r
-}var count=this.elementCount-location;\r
-if(count>0){\r
-System.arraycopy(this.elementData,location,this.elementData,location+size,count);\r
-}var it=collection.iterator();\r
-while(it.hasNext()){\r
-this.elementData[location++]=it.next();\r
-}\r
-this.elementCount+=size;\r
-this.modCount++;\r
-return true;\r
-}throw new ArrayIndexOutOfBoundsException(location);\r
-},"~N,java.util.Collection");\r
-Clazz.defineMethod(c$,"addAll",\r
-function(collection){\r
-return this.addAll(this.elementCount,collection);\r
-},"java.util.Collection");\r
-Clazz.defineMethod(c$,"addElement",\r
-function(object){\r
-if(this.elementCount==this.elementData.length){\r
-this.growByOne();\r
-}this.elementData[this.elementCount++]=object;\r
-this.modCount++;\r
-},"~O");\r
-Clazz.defineMethod(c$,"capacity",\r
-function(){\r
-return this.elementData.length;\r
-});\r
-Clazz.overrideMethod(c$,"clear",\r
-function(){\r
-this.removeAllElements();\r
-});\r
-Clazz.defineMethod(c$,"clone",\r
-function(){\r
-try{\r
-var vector=Clazz.superCall(this,java.util.Vector,"clone",[]);\r
-vector.elementData=this.elementData.clone();\r
-return vector;\r
-}catch(e){\r
-if(Clazz.instanceOf(e,CloneNotSupportedException)){\r
-return null;\r
-}else{\r
-throw e;\r
-}\r
-}\r
-});\r
-Clazz.overrideMethod(c$,"contains",\r
-function(object){\r
-return this.indexOf(object,0)!=-1;\r
-},"~O");\r
-Clazz.defineMethod(c$,"copyInto",\r
-function(elements){\r
-System.arraycopy(this.elementData,0,elements,0,this.elementCount);\r
-},"~A");\r
-Clazz.defineMethod(c$,"elementAt",\r
-function(location){\r
-if(location<this.elementCount){\r
-return this.elementData[location];\r
-}throw new ArrayIndexOutOfBoundsException(location);\r
-},"~N");\r
-Clazz.defineMethod(c$,"elements",\r
-function(){\r
-return((Clazz.isClassDefined("java.util.Vector$1")?0:java.util.Vector.$Vector$1$()),Clazz.innerTypeInstance(java.util.Vector$1,this,null));\r
-});\r
-Clazz.defineMethod(c$,"ensureCapacity",\r
-function(minimumCapacity){\r
-if(this.elementData.length<minimumCapacity){\r
-var next=(this.capacityIncrement<=0?this.elementData.length:this.capacityIncrement)+this.elementData.length;\r
-this.grow(minimumCapacity>next?minimumCapacity:next);\r
-}},"~N");\r
-Clazz.overrideMethod(c$,"equals",\r
-function(object){\r
-if(this===object){\r
-return true;\r
-}if(Clazz.instanceOf(object,java.util.List)){\r
-var list=object;\r
-if(list.size()!=this.size()){\r
-return false;\r
-}var index=0;\r
-var it=list.iterator();\r
-while(it.hasNext()){\r
-var e1=this.elementData[index++];\r
-var e2=it.next();\r
-if(!(e1==null?e2==null:e1.equals(e2))){\r
-return false;\r
-}}\r
-return true;\r
-}return false;\r
-},"~O");\r
-Clazz.defineMethod(c$,"firstElement",\r
-function(){\r
-if(this.elementCount>0){\r
-return this.elementData[0];\r
-}throw new java.util.NoSuchElementException();\r
-});\r
-Clazz.overrideMethod(c$,"get",\r
-function(location){\r
-return this.elementAt(location);\r
-},"~N");\r
-Clazz.defineMethod(c$,"grow",\r
-($fz=function(newCapacity){\r
-var newData=this.newElementArray(newCapacity);\r
-System.arraycopy(this.elementData,0,newData,0,this.elementCount);\r
-this.elementData=newData;\r
-},$fz.isPrivate=true,$fz),"~N");\r
-Clazz.defineMethod(c$,"growByOne",\r
-($fz=function(){\r
-var adding=0;\r
-if(this.capacityIncrement<=0){\r
-if((adding=this.elementData.length)==0){\r
-adding=1;\r
-}}else{\r
-adding=this.capacityIncrement;\r
-}var newData=this.newElementArray(this.elementData.length+adding);\r
-System.arraycopy(this.elementData,0,newData,0,this.elementCount);\r
-this.elementData=newData;\r
-},$fz.isPrivate=true,$fz));\r
-Clazz.defineMethod(c$,"growBy",\r
-($fz=function(required){\r
-var adding=0;\r
-if(this.capacityIncrement<=0){\r
-if((adding=this.elementData.length)==0){\r
-adding=required;\r
-}while(adding<required){\r
-adding+=adding;\r
-}\r
-}else{\r
-adding=(Math.floor(required/this.capacityIncrement))*this.capacityIncrement;\r
-if(adding<required){\r
-adding+=this.capacityIncrement;\r
-}}var newData=this.newElementArray(this.elementData.length+adding);\r
-System.arraycopy(this.elementData,0,newData,0,this.elementCount);\r
-this.elementData=newData;\r
-},$fz.isPrivate=true,$fz),"~N");\r
-Clazz.overrideMethod(c$,"hashCode",\r
-function(){\r
-var result=1;\r
-for(var i=0;i<this.elementCount;i++){\r
-result=(31*result)+(this.elementData[i]==null?0:this.elementData[i].hashCode());\r
-}\r
-return result;\r
-});\r
-Clazz.defineMethod(c$,"indexOf",\r
-function(object){\r
-return this.indexOf(object,0);\r
-},"~O");\r
-Clazz.defineMethod(c$,"indexOf",\r
-function(object,location){\r
-if(object!=null){\r
-for(var i=location;i<this.elementCount;i++){\r
-if(object.equals(this.elementData[i])){\r
-return i;\r
-}}\r
-}else{\r
-for(var i=location;i<this.elementCount;i++){\r
-if(this.elementData[i]==null){\r
-return i;\r
-}}\r
-}return-1;\r
-},"~O,~N");\r
-Clazz.defineMethod(c$,"insertElementAt",\r
-function(object,location){\r
-if(0<=location&&location<=this.elementCount){\r
-if(this.elementCount==this.elementData.length){\r
-this.growByOne();\r
-}var count=this.elementCount-location;\r
-if(count>0){\r
-System.arraycopy(this.elementData,location,this.elementData,location+1,count);\r
-}this.elementData[location]=object;\r
-this.elementCount++;\r
-this.modCount++;\r
-}else{\r
-throw new ArrayIndexOutOfBoundsException(location);\r
-}},"~O,~N");\r
-Clazz.overrideMethod(c$,"isEmpty",\r
-function(){\r
-return this.elementCount==0;\r
-});\r
-Clazz.defineMethod(c$,"lastElement",\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.NoSuchElementException();\r
-}else{\r
-throw e;\r
-}\r
-}\r
-});\r
-Clazz.defineMethod(c$,"lastIndexOf",\r
-function(object){\r
-return this.lastIndexOf(object,this.elementCount-1);\r
-},"~O");\r
-Clazz.defineMethod(c$,"lastIndexOf",\r
-function(object,location){\r
-if(location<this.elementCount){\r
-if(object!=null){\r
-for(var i=location;i>=0;i--){\r
-if(object.equals(this.elementData[i])){\r
-return i;\r
-}}\r
-}else{\r
-for(var i=location;i>=0;i--){\r
-if(this.elementData[i]==null){\r
-return i;\r
-}}\r
-}return-1;\r
-}throw new ArrayIndexOutOfBoundsException(location);\r
-},"~O,~N");\r
-Clazz.defineMethod(c$,"remove",\r
-function(location){\r
-if(location<this.elementCount){\r
-var result=this.elementData[location];\r
-this.elementCount--;\r
-var size=this.elementCount-location;\r
-if(size>0){\r
-System.arraycopy(this.elementData,location+1,this.elementData,location,size);\r
-}this.elementData[this.elementCount]=null;\r
-this.modCount++;\r
-return result;\r
-}throw new ArrayIndexOutOfBoundsException(location);\r
-},"~N");\r
-Clazz.defineMethod(c$,"remove",\r
-function(object){\r
-return this.removeElement(object);\r
-},"~O");\r
-Clazz.defineMethod(c$,"removeAllElements",\r
-function(){\r
-java.util.Arrays.fill(this.elementData,0,this.elementCount,null);\r
-this.modCount++;\r
-this.elementCount=0;\r
-});\r
-Clazz.defineMethod(c$,"removeElement",\r
-function(object){\r
-var index;\r
-if((index=this.indexOf(object,0))==-1){\r
-return false;\r
-}this.removeElementAt(index);\r
-return true;\r
-},"~O");\r
-Clazz.defineMethod(c$,"removeElementAt",\r
-function(location){\r
-if(0<=location&&location<this.elementCount){\r
-this.elementCount--;\r
-var size=this.elementCount-location;\r
-if(size>0){\r
-System.arraycopy(this.elementData,location+1,this.elementData,location,size);\r
-}this.elementData[this.elementCount]=null;\r
-this.modCount++;\r
-}else{\r
-throw new ArrayIndexOutOfBoundsException(location);\r
-}},"~N");\r
-Clazz.overrideMethod(c$,"removeRange",\r
-function(start,end){\r
-if(start>=0&&start<=end&&end<=this.size()){\r
-if(start==end){\r
-return;\r
-}if(end!=this.elementCount){\r
-System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end);\r
-var newCount=this.elementCount-(end-start);\r
-java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null);\r
-this.elementCount=newCount;\r
-}else{\r
-java.util.Arrays.fill(this.elementData,start,this.elementCount,null);\r
-this.elementCount=start;\r
-}this.modCount++;\r
-}else{\r
-throw new IndexOutOfBoundsException();\r
-}},"~N,~N");\r
-Clazz.overrideMethod(c$,"set",\r
-function(location,object){\r
-if(location<this.elementCount){\r
-var result=this.elementData[location];\r
-this.elementData[location]=object;\r
-return result;\r
-}throw new ArrayIndexOutOfBoundsException(location);\r
-},"~N,~O");\r
-Clazz.defineMethod(c$,"setElementAt",\r
-function(object,location){\r
-if(location<this.elementCount){\r
-this.elementData[location]=object;\r
-}else{\r
-throw new ArrayIndexOutOfBoundsException(location);\r
-}},"~O,~N");\r
-Clazz.defineMethod(c$,"setSize",\r
-function(length){\r
-if(length==this.elementCount){\r
-return;\r
-}this.ensureCapacity(length);\r
-if(this.elementCount>length){\r
-java.util.Arrays.fill(this.elementData,length,this.elementCount,null);\r
-}this.elementCount=length;\r
-this.modCount++;\r
-},"~N");\r
-Clazz.overrideMethod(c$,"size",\r
-function(){\r
-return this.elementCount;\r
-});\r
-Clazz.overrideMethod(c$,"subList",\r
-function(start,end){\r
-return new java.util.Collections.SynchronizedRandomAccessList(Clazz.superCall(this,java.util.Vector,"subList",[start,end]),this);\r
-},"~N,~N");\r
-Clazz.defineMethod(c$,"toArray",\r
-function(){\r
-var result=new Array(this.elementCount);\r
-System.arraycopy(this.elementData,0,result,0,this.elementCount);\r
-return result;\r
-});\r
-Clazz.defineMethod(c$,"toArray",\r
-function(contents){\r
-if(this.elementCount>contents.length){\r
-var ct=contents.getClass().getComponentType();\r
-contents=java.lang.reflect.Array.newInstance(ct,this.elementCount);\r
-}System.arraycopy(this.elementData,0,contents,0,this.elementCount);\r
-if(this.elementCount<contents.length){\r
-contents[this.elementCount]=null;\r
-}return contents;\r
-},"~A");\r
-Clazz.overrideMethod(c$,"toString",\r
-function(){\r
-if(this.elementCount==0){\r
-return"[]";\r
-}var length=this.elementCount-1;\r
-var buffer=new StringBuffer(this.size()*16);\r
-buffer.append('[');\r
-for(var i=0;i<length;i++){\r
-if(this.elementData[i]===this){\r
-buffer.append("(this Collection)");\r
-}else{\r
-buffer.append(this.elementData[i]);\r
-}buffer.append(", ");\r
-}\r
-if(this.elementData[length]===this){\r
-buffer.append("(this Collection)");\r
-}else{\r
-buffer.append(this.elementData[length]);\r
-}buffer.append(']');\r
-return buffer.toString();\r
-});\r
-Clazz.defineMethod(c$,"trimToSize",\r
-function(){\r
-if(this.elementData.length!=this.elementCount){\r
-this.grow(this.elementCount);\r
-}});\r
-c$.$Vector$1$=function(){\r
-Clazz.pu$h(self.c$);\r
-c$=Clazz.decorateAsClass(function(){\r
-Clazz.prepareCallback(this,arguments);\r
-this.pos=0;\r
-Clazz.instantialize(this,arguments);\r
-},java.util,"Vector$1",null,java.util.Enumeration);\r
-Clazz.overrideMethod(c$,"hasMoreElements",\r
-function(){\r
-return this.pos<this.b$["java.util.Vector"].elementCount;\r
-});\r
-Clazz.overrideMethod(c$,"nextElement",\r
-function(){\r
-{\r
-if(this.pos<this.b$["java.util.Vector"].elementCount){\r
-return this.b$["java.util.Vector"].elementData[this.pos++];\r
-}}throw new java.util.NoSuchElementException();\r
-});\r
-c$=Clazz.p0p();\r
-};\r
-Clazz.defineStatics(c$,\r
-"DEFAULT_SIZE",10);\r
-});\r
+Clazz.load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.Vector",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringBuffer","java.lang.reflect.Array","java.util.Arrays","$.Collections","$.Enumeration","$.NoSuchElementException"],function(){
+c$=Clazz.decorateAsClass(function(){
+this.elementCount=0;
+this.elementData=null;
+this.capacityIncrement=0;
+Clazz.instantialize(this,arguments);
+},java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]);
+Clazz.makeConstructor(c$,
+function(){
+this.construct(10,0);
+});
+Clazz.makeConstructor(c$,
+function(capacity){
+this.construct(capacity,0);
+},"~N");
+Clazz.makeConstructor(c$,
+function(capacity,capacityIncrement){
+Clazz.superConstructor(this,java.util.Vector,[]);
+this.elementCount=0;
+try{
+this.elementData=this.newElementArray(capacity);
+}catch(e){
+if(Clazz.instanceOf(e,NegativeArraySizeException)){
+throw new IllegalArgumentException();
+}else{
+throw e;
+}
+}
+this.capacityIncrement=capacityIncrement;
+},"~N,~N");
+Clazz.makeConstructor(c$,
+function(collection){
+this.construct(collection.size(),0);
+var it=collection.iterator();
+while(it.hasNext()){
+this.elementData[this.elementCount++]=it.next();
+}
+},"java.util.Collection");
+Clazz.defineMethod(c$,"newElementArray",
+($fz=function(size){
+return new Array(size);
+},$fz.isPrivate=true,$fz),"~N");
+Clazz.defineMethod(c$,"add",
+function(location,object){
+this.insertElementAt(object,location);
+},"~N,~O");
+Clazz.defineMethod(c$,"add",
+function(object){
+this.addElement(object);
+return true;
+},"~O");
+Clazz.defineMethod(c$,"addAll",
+function(location,collection){
+if(0<=location&&location<=this.elementCount){
+var size=collection.size();
+if(size==0){
+return false;
+}var required=size-(this.elementData.length-this.elementCount);
+if(required>0){
+this.growBy(required);
+}var count=this.elementCount-location;
+if(count>0){
+System.arraycopy(this.elementData,location,this.elementData,location+size,count);
+}var it=collection.iterator();
+while(it.hasNext()){
+this.elementData[location++]=it.next();
+}
+this.elementCount+=size;
+this.modCount++;
+return true;
+}throw new ArrayIndexOutOfBoundsException(location);
+},"~N,java.util.Collection");
+Clazz.defineMethod(c$,"addAll",
+function(collection){
+return this.addAll(this.elementCount,collection);
+},"java.util.Collection");
+Clazz.defineMethod(c$,"addElement",
+function(object){
+if(this.elementCount==this.elementData.length){
+this.growByOne();
+}this.elementData[this.elementCount++]=object;
+this.modCount++;
+},"~O");
+Clazz.defineMethod(c$,"capacity",
+function(){
+return this.elementData.length;
+});
+Clazz.overrideMethod(c$,"clear",
+function(){
+this.removeAllElements();
+});
+Clazz.defineMethod(c$,"clone",
+function(){
+try{
+var vector=Clazz.superCall(this,java.util.Vector,"clone",[]);
+vector.elementData=this.elementData.clone();
+return vector;
+}catch(e){
+if(Clazz.instanceOf(e,CloneNotSupportedException)){
+return null;
+}else{
+throw e;
+}
+}
+});
+Clazz.overrideMethod(c$,"contains",
+function(object){
+return this.indexOf(object,0)!=-1;
+},"~O");
+Clazz.defineMethod(c$,"copyInto",
+function(elements){
+System.arraycopy(this.elementData,0,elements,0,this.elementCount);
+},"~A");
+Clazz.defineMethod(c$,"elementAt",
+function(location){
+if(location<this.elementCount){
+return this.elementData[location];
+}throw new ArrayIndexOutOfBoundsException(location);
+},"~N");
+Clazz.defineMethod(c$,"elements",
+function(){
+return((Clazz.isClassDefined("java.util.Vector$1")?0:java.util.Vector.$Vector$1$()),Clazz.innerTypeInstance(java.util.Vector$1,this,null));
+});
+Clazz.defineMethod(c$,"ensureCapacity",
+function(minimumCapacity){
+if(this.elementData.length<minimumCapacity){
+var next=(this.capacityIncrement<=0?this.elementData.length:this.capacityIncrement)+this.elementData.length;
+this.grow(minimumCapacity>next?minimumCapacity:next);
+}},"~N");
+Clazz.overrideMethod(c$,"equals",
+function(object){
+if(this===object){
+return true;
+}if(Clazz.instanceOf(object,java.util.List)){
+var list=object;
+if(list.size()!=this.size()){
+return false;
+}var index=0;
+var it=list.iterator();
+while(it.hasNext()){
+var e1=this.elementData[index++];
+var e2=it.next();
+if(!(e1==null?e2==null:e1.equals(e2))){
+return false;
+}}
+return true;
+}return false;
+},"~O");
+Clazz.defineMethod(c$,"firstElement",
+function(){
+if(this.elementCount>0){
+return this.elementData[0];
+}throw new java.util.NoSuchElementException();
+});
+Clazz.overrideMethod(c$,"get",
+function(location){
+return this.elementAt(location);
+},"~N");
+Clazz.defineMethod(c$,"grow",
+($fz=function(newCapacity){
+var newData=this.newElementArray(newCapacity);
+System.arraycopy(this.elementData,0,newData,0,this.elementCount);
+this.elementData=newData;
+},$fz.isPrivate=true,$fz),"~N");
+Clazz.defineMethod(c$,"growByOne",
+($fz=function(){
+var adding=0;
+if(this.capacityIncrement<=0){
+if((adding=this.elementData.length)==0){
+adding=1;
+}}else{
+adding=this.capacityIncrement;
+}var newData=this.newElementArray(this.elementData.length+adding);
+System.arraycopy(this.elementData,0,newData,0,this.elementCount);
+this.elementData=newData;
+},$fz.isPrivate=true,$fz));
+Clazz.defineMethod(c$,"growBy",
+($fz=function(required){
+var adding=0;
+if(this.capacityIncrement<=0){
+if((adding=this.elementData.length)==0){
+adding=required;
+}while(adding<required){
+adding+=adding;
+}
+}else{
+adding=(Math.floor(required/this.capacityIncrement))*this.capacityIncrement;
+if(adding<required){
+adding+=this.capacityIncrement;
+}}var newData=this.newElementArray(this.elementData.length+adding);
+System.arraycopy(this.elementData,0,newData,0,this.elementCount);
+this.elementData=newData;
+},$fz.isPrivate=true,$fz),"~N");
+Clazz.overrideMethod(c$,"hashCode",
+function(){
+var result=1;
+for(var i=0;i<this.elementCount;i++){
+result=(31*result)+(this.elementData[i]==null?0:this.elementData[i].hashCode());
+}
+return result;
+});
+Clazz.defineMethod(c$,"indexOf",
+function(object){
+return this.indexOf(object,0);
+},"~O");
+Clazz.defineMethod(c$,"indexOf",
+function(object,location){
+if(object!=null){
+for(var i=location;i<this.elementCount;i++){
+if(object.equals(this.elementData[i])){
+return i;
+}}
+}else{
+for(var i=location;i<this.elementCount;i++){
+if(this.elementData[i]==null){
+return i;
+}}
+}return-1;
+},"~O,~N");
+Clazz.defineMethod(c$,"insertElementAt",
+function(object,location){
+if(0<=location&&location<=this.elementCount){
+if(this.elementCount==this.elementData.length){
+this.growByOne();
+}var count=this.elementCount-location;
+if(count>0){
+System.arraycopy(this.elementData,location,this.elementData,location+1,count);
+}this.elementData[location]=object;
+this.elementCount++;
+this.modCount++;
+}else{
+throw new ArrayIndexOutOfBoundsException(location);
+}},"~O,~N");
+Clazz.overrideMethod(c$,"isEmpty",
+function(){
+return this.elementCount==0;
+});
+Clazz.defineMethod(c$,"lastElement",
+function(){
+try{
+return this.elementData[this.elementCount-1];
+}catch(e){
+if(Clazz.instanceOf(e,IndexOutOfBoundsException)){
+throw new java.util.NoSuchElementException();
+}else{
+throw e;
+}
+}
+});
+Clazz.defineMethod(c$,"lastIndexOf",
+function(object){
+return this.lastIndexOf(object,this.elementCount-1);
+},"~O");
+Clazz.defineMethod(c$,"lastIndexOf",
+function(object,location){
+if(location<this.elementCount){
+if(object!=null){
+for(var i=location;i>=0;i--){
+if(object.equals(this.elementData[i])){
+return i;
+}}
+}else{
+for(var i=location;i>=0;i--){
+if(this.elementData[i]==null){
+return i;
+}}
+}return-1;
+}throw new ArrayIndexOutOfBoundsException(location);
+},"~O,~N");
+Clazz.defineMethod(c$,"remove",
+function(location){
+if(location<this.elementCount){
+var result=this.elementData[location];
+this.elementCount--;
+var size=this.elementCount-location;
+if(size>0){
+System.arraycopy(this.elementData,location+1,this.elementData,location,size);
+}this.elementData[this.elementCount]=null;
+this.modCount++;
+return result;
+}throw new ArrayIndexOutOfBoundsException(location);
+},"~N");
+Clazz.defineMethod(c$,"remove",
+function(object){
+return this.removeElement(object);
+},"~O");
+Clazz.defineMethod(c$,"removeAllElements",
+function(){
+java.util.Arrays.fill(this.elementData,0,this.elementCount,null);
+this.modCount++;
+this.elementCount=0;
+});
+Clazz.defineMethod(c$,"removeElement",
+function(object){
+var index;
+if((index=this.indexOf(object,0))==-1){
+return false;
+}this.removeElementAt(index);
+return true;
+},"~O");
+Clazz.defineMethod(c$,"removeElementAt",
+function(location){
+if(0<=location&&location<this.elementCount){
+this.elementCount--;
+var size=this.elementCount-location;
+if(size>0){
+System.arraycopy(this.elementData,location+1,this.elementData,location,size);
+}this.elementData[this.elementCount]=null;
+this.modCount++;
+}else{
+throw new ArrayIndexOutOfBoundsException(location);
+}},"~N");
+Clazz.overrideMethod(c$,"removeRange",
+function(start,end){
+if(start>=0&&start<=end&&end<=this.size()){
+if(start==end){
+return;
+}if(end!=this.elementCount){
+System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end);
+var newCount=this.elementCount-(end-start);
+java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null);
+this.elementCount=newCount;
+}else{
+java.util.Arrays.fill(this.elementData,start,this.elementCount,null);
+this.elementCount=start;
+}this.modCount++;
+}else{
+throw new IndexOutOfBoundsException();
+}},"~N,~N");
+Clazz.overrideMethod(c$,"set",
+function(location,object){
+if(location<this.elementCount){
+var result=this.elementData[location];
+this.elementData[location]=object;
+return result;
+}throw new ArrayIndexOutOfBoundsException(location);
+},"~N,~O");
+Clazz.defineMethod(c$,"setElementAt",
+function(object,location){
+if(location<this.elementCount){
+this.elementData[location]=object;
+}else{
+throw new ArrayIndexOutOfBoundsException(location);
+}},"~O,~N");
+Clazz.defineMethod(c$,"setSize",
+function(length){
+if(length==this.elementCount){
+return;
+}this.ensureCapacity(length);
+if(this.elementCount>length){
+java.util.Arrays.fill(this.elementData,length,this.elementCount,null);
+}this.elementCount=length;
+this.modCount++;
+},"~N");
+Clazz.overrideMethod(c$,"size",
+function(){
+return this.elementCount;
+});
+Clazz.overrideMethod(c$,"subList",
+function(start,end){
+return new java.util.Collections.SynchronizedRandomAccessList(Clazz.superCall(this,java.util.Vector,"subList",[start,end]),this);
+},"~N,~N");
+Clazz.defineMethod(c$,"toArray",
+function(){
+var result=new Array(this.elementCount);
+System.arraycopy(this.elementData,0,result,0,this.elementCount);
+return result;
+});
+Clazz.defineMethod(c$,"toArray",
+function(contents){
+if(this.elementCount>contents.length){
+var ct=contents.getClass().getComponentType();
+contents=java.lang.reflect.Array.newInstance(ct,this.elementCount);
+}System.arraycopy(this.elementData,0,contents,0,this.elementCount);
+if(this.elementCount<contents.length){
+contents[this.elementCount]=null;
+}return contents;
+},"~A");
+Clazz.overrideMethod(c$,"toString",
+function(){
+if(this.elementCount==0){
+return"[]";
+}var length=this.elementCount-1;
+var buffer=new StringBuffer(this.size()*16);
+buffer.append('[');
+for(var i=0;i<length;i++){
+if(this.elementData[i]===this){
+buffer.append("(this Collection)");
+}else{
+buffer.append(this.elementData[i]);
+}buffer.append(", ");
+}
+if(this.elementData[length]===this){
+buffer.append("(this Collection)");
+}else{
+buffer.append(this.elementData[length]);
+}buffer.append(']');
+return buffer.toString();
+});
+Clazz.defineMethod(c$,"trimToSize",
+function(){
+if(this.elementData.length!=this.elementCount){
+this.grow(this.elementCount);
+}});
+c$.$Vector$1$=function(){
+Clazz.pu$h(self.c$);
+c$=Clazz.decorateAsClass(function(){
+Clazz.prepareCallback(this,arguments);
+this.pos=0;
+Clazz.instantialize(this,arguments);
+},java.util,"Vector$1",null,java.util.Enumeration);
+Clazz.overrideMethod(c$,"hasMoreElements",
+function(){
+return this.pos<this.b$["java.util.Vector"].elementCount;
+});
+Clazz.overrideMethod(c$,"nextElement",
+function(){
+{
+if(this.pos<this.b$["java.util.Vector"].elementCount){
+return this.b$["java.util.Vector"].elementData[this.pos++];
+}}throw new java.util.NoSuchElementException();
+});
+c$=Clazz.p0p();
+};
+Clazz.defineStatics(c$,
+"DEFAULT_SIZE",10);
+});