File size: 1,135 Bytes
233f6d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
});
});