X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjava%2Futil%2FAbstractQueue.js;h=6ec6786c8d8cfda40eb2b2d9b389cf024fba9331;hp=50c61dd72074aad27fe65110e19bb796412beec4;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/java/util/AbstractQueue.js b/site/j2s/java/util/AbstractQueue.js index 50c61dd..6ec6786 100644 --- a/site/j2s/java/util/AbstractQueue.js +++ b/site/j2s/java/util/AbstractQueue.js @@ -1,40 +1,40 @@ -Clazz.load(["java.util.AbstractCollection","$.Queue"],"java.util.AbstractQueue",["java.lang.IllegalArgumentException","$.IllegalStateException","$.NullPointerException","java.util.NoSuchElementException"],function(){ -c$=Clazz.declareType(java.util,"AbstractQueue",java.util.AbstractCollection,java.util.Queue); -Clazz.overrideMethod(c$,"add", -function(o){ -if(null==o){ -throw new NullPointerException(); -}if(this.offer(o)){ -return true; -}throw new IllegalStateException(); -},"~O"); -Clazz.overrideMethod(c$,"addAll", -function(c){ -if(null==c){ -throw new NullPointerException(); -}if(this===c){ -throw new IllegalArgumentException(); -}return Clazz.superCall(this,java.util.AbstractQueue,"addAll",[c]); -},"java.util.Collection"); -Clazz.defineMethod(c$,"remove", -function(){ -var o=this.poll(); -if(null==o){ -throw new java.util.NoSuchElementException(); -}return o; -}); -Clazz.overrideMethod(c$,"element", -function(){ -var o=this.peek(); -if(null==o){ -throw new java.util.NoSuchElementException(); -}return o; -}); -Clazz.overrideMethod(c$,"clear", -function(){ -var o; -do{ -o=this.poll(); -}while(null!=o); -}); -}); +Clazz.load(["java.util.AbstractCollection","$.Queue"],"java.util.AbstractQueue",["java.lang.IllegalArgumentException","$.IllegalStateException","$.NullPointerException","java.util.NoSuchElementException"],function(){ +c$=Clazz.declareType(java.util,"AbstractQueue",java.util.AbstractCollection,java.util.Queue); +Clazz.overrideMethod(c$,"add", +function(o){ +if(null==o){ +throw new NullPointerException(); +}if(this.offer(o)){ +return true; +}throw new IllegalStateException(); +},"~O"); +Clazz.overrideMethod(c$,"addAll", +function(c){ +if(null==c){ +throw new NullPointerException(); +}if(this===c){ +throw new IllegalArgumentException(); +}return Clazz.superCall(this,java.util.AbstractQueue,"addAll",[c]); +},"java.util.Collection"); +Clazz.defineMethod(c$,"remove", +function(){ +var o=this.poll(); +if(null==o){ +throw new java.util.NoSuchElementException(); +}return o; +}); +Clazz.overrideMethod(c$,"element", +function(){ +var o=this.peek(); +if(null==o){ +throw new java.util.NoSuchElementException(); +}return o; +}); +Clazz.overrideMethod(c$,"clear", +function(){ +var o; +do{ +o=this.poll(); +}while(null!=o); +}); +});