3db9c31251b268d8c147896a62180be18f30656c
[jalviewjs.git] / site / j2s / java / util / Collections.js
1 //BH note: a declared static superclass must come before a static class referencing it
2
3 Clazz.load(["java.util.AbstractList","$.AbstractMap","$.AbstractSet","$.Collection","$.Iterator","$.List","$.ListIterator","$.Map","$.RandomAccess","$.Set","$.SortedMap","$.SortedSet","java.lang.NullPointerException","$.UnsupportedOperationException","java.lang.reflect.Array"],"java.util.Collections",["java.lang.ArrayIndexOutOfBoundsException","$.ClassCastException","$.IllegalArgumentException","$.IndexOutOfBoundsException","java.util.ArrayList","$.Arrays","$.Enumeration","java.util.Map.Entry","java.util.NoSuchElementException","$.Random"],function(){
4 c$=Clazz.declareType(java.util,"Collections");
5 c$.binarySearch=Clazz.defineMethod(c$,"binarySearch",
6 function(list,object){
7 if(list==null){
8 throw new NullPointerException();
9 }if(list.isEmpty()){
10 return-1;
11 }var key=object;
12 if(!(Clazz.instanceOf(list,java.util.RandomAccess))){
13 var it=list.listIterator();
14 while(it.hasNext()){
15 var result;
16 if((result=key.compareTo(it.next()))<=0){
17 if(result==0){
18 return it.previousIndex();
19 }return-it.previousIndex()-1;
20 }}
21 return-list.size()-1;
22 }var low=0;
23 var mid=list.size();
24 var high=mid-1;
25 var result=-1;
26 while(low<=high){
27 mid=(low+high)>>1;
28 if((result=key.compareTo(list.get(mid)))>0){
29 low=mid+1;
30 }else if(result==0){
31 return mid;
32 }else{
33 high=mid-1;
34 }}
35 return-mid-(result<0?1:2);
36 },"java.util.List,~O");
37 c$.binarySearch=Clazz.defineMethod(c$,"binarySearch",
38 function(list,object,comparator){
39 if(comparator==null){
40 return java.util.Collections.binarySearch(list,object);
41 }if(!(Clazz.instanceOf(list,java.util.RandomAccess))){
42 var it=list.listIterator();
43 while(it.hasNext()){
44 var result;
45 if((result=comparator.compare(object,it.next()))<=0){
46 if(result==0){
47 return it.previousIndex();
48 }return-it.previousIndex()-1;
49 }}
50 return-list.size()-1;
51 }var low=0;
52 var mid=list.size();
53 var high=mid-1;
54 var result=-1;
55 while(low<=high){
56 mid=(low+high)>>1;
57 if((result=comparator.compare(object,list.get(mid)))>0){
58 low=mid+1;
59 }else if(result==0){
60 return mid;
61 }else{
62 high=mid-1;
63 }}
64 return-mid-(result<0?1:2);
65 },"java.util.List,~O,java.util.Comparator");
66 c$.copy=Clazz.defineMethod(c$,"copy",
67 function(destination,source){
68 if(destination.size()<source.size()){
69 throw new ArrayIndexOutOfBoundsException();
70 }var srcIt=source.iterator();
71 var destIt=destination.listIterator();
72 while(srcIt.hasNext()){
73 try{
74 destIt.next();
75 }catch(e){
76 if(Clazz.instanceOf(e,java.util.NoSuchElementException)){
77 throw new ArrayIndexOutOfBoundsException();
78 }else{
79 throw e;
80 }
81 }
82 destIt.set(srcIt.next());
83 }
84 },"java.util.List,java.util.List");
85 c$.enumeration=Clazz.defineMethod(c$,"enumeration",
86 function(collection){
87 var c=collection;
88
89 if (!Clazz.isClassDefined("java.util.Collections$1"))
90         java.util.Collections.$Collections$1$(c);
91
92 var x = Clazz.innerTypeInstance(java.util.Collections$1,this,null);
93
94 return x;
95 },"java.util.Collection");
96
97 c$.fill=Clazz.defineMethod(c$,"fill",
98 function(list,object){
99 var it=list.listIterator();
100 while(it.hasNext()){
101 it.next();
102 it.set(object);
103 }
104 },"java.util.List,~O");
105 c$.max=Clazz.defineMethod(c$,"max",
106 function(collection){
107 var it=collection.iterator();
108 var max=it.next();
109 while(it.hasNext()){
110 var next=it.next();
111 if(max.compareTo(next)<0){
112 max=next;
113 }}
114 return max;
115 },"java.util.Collection");
116 c$.max=Clazz.defineMethod(c$,"max",
117 function(collection,comparator){
118 var it=collection.iterator();
119 var max=it.next();
120 while(it.hasNext()){
121 var next=it.next();
122 if(comparator.compare(max,next)<0){
123 max=next;
124 }}
125 return max;
126 },"java.util.Collection,java.util.Comparator");
127 c$.min=Clazz.defineMethod(c$,"min",
128 function(collection){
129 var it=collection.iterator();
130 var min=it.next();
131 while(it.hasNext()){
132 var next=it.next();
133 if(min.compareTo(next)>0){
134 min=next;
135 }}
136 return min;
137 },"java.util.Collection");
138 c$.min=Clazz.defineMethod(c$,"min",
139 function(collection,comparator){
140 var it=collection.iterator();
141 var min=it.next();
142 while(it.hasNext()){
143 var next=it.next();
144 if(comparator.compare(min,next)>0){
145 min=next;
146 }}
147 return min;
148 },"java.util.Collection,java.util.Comparator");
149 c$.nCopies=Clazz.defineMethod(c$,"nCopies",
150 function(length,object){
151 return new java.util.Collections.CopiesList(length,object);
152 },"~N,~O");
153 c$.reverse=Clazz.defineMethod(c$,"reverse",
154 function(list){
155 var size=list.size();
156 var front=list.listIterator();
157 var back=list.listIterator(size);
158 for(var i=0;i<Math.floor(size/2);i++){
159 var frontNext=front.next();
160 var backPrev=back.previous();
161 front.set(backPrev);
162 back.set(frontNext);
163 }
164 },"java.util.List");
165 c$.reverseOrder=Clazz.defineMethod(c$,"reverseOrder",
166 function(){
167 return new java.util.Collections.ReverseComparator();
168 });
169 c$.reverseOrder=Clazz.defineMethod(c$,"reverseOrder",
170 function(c){
171 if(c==null){
172 return java.util.Collections.reverseOrder();
173 }return new java.util.Collections.ReverseComparatorWithComparator(c);
174 },"java.util.Comparator");
175 c$.shuffle=Clazz.defineMethod(c$,"shuffle",
176 function(list){
177 java.util.Collections.shuffle(list,new java.util.Random());
178 },"java.util.List");
179 c$.shuffle=Clazz.defineMethod(c$,"shuffle",
180 function(list,random){
181 if(!(Clazz.instanceOf(list,java.util.RandomAccess))){
182 var array=list.toArray();
183 for(var i=array.length-1;i>0;i--){
184 var index=random.nextInt()%(i+1);
185 if(index<0){
186 index=-index;
187 }var temp=array[i];
188 array[i]=array[index];
189 array[index]=temp;
190 }
191 var i=0;
192 var it=list.listIterator();
193 while(it.hasNext()){
194 it.next();
195 it.set(array[i++]);
196 }
197 }else{
198 var rawList=list;
199 for(var i=rawList.size()-1;i>0;i--){
200 var index=random.nextInt()%(i+1);
201 if(index<0){
202 index=-index;
203 }rawList.set(index,rawList.set(i,rawList.get(index)));
204 }
205 }},"java.util.List,java.util.Random");
206 c$.singleton=Clazz.defineMethod(c$,"singleton",
207 function(object){
208 return new java.util.Collections.SingletonSet(object);
209 },"~O");
210 c$.singletonList=Clazz.defineMethod(c$,"singletonList",
211 function(object){
212 return new java.util.Collections.SingletonList(object);
213 },"~O");
214 c$.singletonMap=Clazz.defineMethod(c$,"singletonMap",
215 function(key,value){
216 return new java.util.Collections.SingletonMap(key,value);
217 },"~O,~O");
218 c$.sort=Clazz.defineMethod(c$,"sort",
219 function(list){
220 var array=list.toArray();
221 java.util.Arrays.sort(array);
222 var i=0;
223 var it=list.listIterator();
224 while(it.hasNext()){
225 it.next();
226 it.set(array[i++]);
227 }
228 },"java.util.List");
229 c$.sort=Clazz.defineMethod(c$,"sort",
230 function(list,comparator){
231 var array=list.toArray(new Array(list.size()));
232 java.util.Arrays.sort(array,comparator);
233 var i=0;
234 var it=list.listIterator();
235 while(it.hasNext()){
236 it.next();
237 it.set(array[i++]);
238 }
239 },"java.util.List,java.util.Comparator");
240 c$.swap=Clazz.defineMethod(c$,"swap",
241 function(list,index1,index2){
242 if(list==null){
243 throw new NullPointerException();
244 }if(index1==index2){
245 return;
246 }var rawList=list;
247 rawList.set(index2,rawList.set(index1,rawList.get(index2)));
248 },"java.util.List,~N,~N");
249 c$.replaceAll=Clazz.defineMethod(c$,"replaceAll",
250 function(list,obj,obj2){
251 var index;
252 var found=false;
253 while((index=list.indexOf(obj))>-1){
254 found=true;
255 list.set(index,obj2);
256 }
257 return found;
258 },"java.util.List,~O,~O");
259 c$.rotate=Clazz.defineMethod(c$,"rotate",
260 function(lst,dist){
261 var list=lst;
262 var size=list.size();
263 if(size==0){
264 return;
265 }var normdist;
266 if(dist>0){
267 normdist=dist%size;
268 }else{
269 normdist=size-((dist%size)*(-1));
270 }if(normdist==0||normdist==size){
271 return;
272 }if(Clazz.instanceOf(list,java.util.RandomAccess)){
273 var temp=list.get(0);
274 var index=0;
275 var beginIndex=0;
276 for(var i=0;i<size;i++){
277 index=(index+normdist)%size;
278 temp=list.set(index,temp);
279 if(index==beginIndex){
280 index=++beginIndex;
281 temp=list.get(beginIndex);
282 }}
283 }else{
284 var divideIndex=(size-normdist)%size;
285 var sublist1=list.subList(0,divideIndex);
286 var sublist2=list.subList(divideIndex,size);
287 java.util.Collections.reverse(sublist1);
288 java.util.Collections.reverse(sublist2);
289 java.util.Collections.reverse(list);
290 }},"java.util.List,~N");
291 c$.indexOfSubList=Clazz.defineMethod(c$,"indexOfSubList",
292 function(list,sublist){
293 var size=list.size();
294 var sublistSize=sublist.size();
295 if(sublistSize>size){
296 return-1;
297 }if(sublistSize==0){
298 return 0;
299 }var firstObj=sublist.get(0);
300 var index=list.indexOf(firstObj);
301 if(index==-1){
302 return-1;
303 }while(index<size&&(size-index>=sublistSize)){
304 var listIt=list.listIterator(index);
305 if((firstObj==null)?listIt.next()==null:firstObj.equals(listIt.next())){
306 var sublistIt=sublist.listIterator(1);
307 var difFound=false;
308 while(sublistIt.hasNext()){
309 var element=sublistIt.next();
310 if(!listIt.hasNext()){
311 return-1;
312 }if((element==null)?listIt.next()!=null:!element.equals(listIt.next())){
313 difFound=true;
314 break;
315 }}
316 if(!difFound){
317 return index;
318 }}index++;
319 }
320 return-1;
321 },"java.util.List,java.util.List");
322 c$.lastIndexOfSubList=Clazz.defineMethod(c$,"lastIndexOfSubList",
323 function(list,sublist){
324 var sublistSize=sublist.size();
325 var size=list.size();
326 if(sublistSize>size){
327 return-1;
328 }if(sublistSize==0){
329 return size;
330 }var lastObj=sublist.get(sublistSize-1);
331 var index=list.lastIndexOf(lastObj);
332 while((index>-1)&&(index+1>=sublistSize)){
333 var listIt=list.listIterator(index+1);
334 if((lastObj==null)?listIt.previous()==null:lastObj.equals(listIt.previous())){
335 var sublistIt=sublist.listIterator(sublistSize-1);
336 var difFound=false;
337 while(sublistIt.hasPrevious()){
338 var element=sublistIt.previous();
339 if(!listIt.hasPrevious()){
340 return-1;
341 }if((element==null)?listIt.previous()!=null:!element.equals(listIt.previous())){
342 difFound=true;
343 break;
344 }}
345 if(!difFound){
346 return listIt.nextIndex();
347 }}index--;
348 }
349 return-1;
350 },"java.util.List,java.util.List");
351 c$.list=Clazz.defineMethod(c$,"list",
352 function(enumeration){
353 var list=new java.util.ArrayList();
354 while(enumeration.hasMoreElements()){
355 list.add(enumeration.nextElement());
356 }
357 return list;
358 },"java.util.Enumeration");
359 c$.synchronizedCollection=Clazz.defineMethod(c$,"synchronizedCollection",
360 function(collection){
361 if(collection==null){
362 throw new NullPointerException();
363 }return new java.util.Collections.SynchronizedCollection(collection);
364 },"java.util.Collection");
365 c$.synchronizedList=Clazz.defineMethod(c$,"synchronizedList",
366 function(list){
367 if(list==null){
368 throw new NullPointerException();
369 }if(Clazz.instanceOf(list,java.util.RandomAccess)){
370 return new java.util.Collections.SynchronizedRandomAccessList(list);
371 }return new java.util.Collections.SynchronizedList(list);
372 },"java.util.List");
373 c$.synchronizedMap=Clazz.defineMethod(c$,"synchronizedMap",
374 function(map){
375 if(map==null){
376 throw new NullPointerException();
377 }return new java.util.Collections.SynchronizedMap(map);
378 },"java.util.Map");
379 c$.synchronizedSet=Clazz.defineMethod(c$,"synchronizedSet",
380 function(set){
381 if(set==null){
382 throw new NullPointerException();
383 }return new java.util.Collections.SynchronizedSet(set);
384 },"java.util.Set");
385 c$.synchronizedSortedMap=Clazz.defineMethod(c$,"synchronizedSortedMap",
386 function(map){
387 if(map==null){
388 throw new NullPointerException();
389 }return new java.util.Collections.SynchronizedSortedMap(map);
390 },"java.util.SortedMap");
391 c$.synchronizedSortedSet=Clazz.defineMethod(c$,"synchronizedSortedSet",
392 function(set){
393 if(set==null){
394 throw new NullPointerException();
395 }return new java.util.Collections.SynchronizedSortedSet(set);
396 },"java.util.SortedSet");
397 c$.unmodifiableCollection=Clazz.defineMethod(c$,"unmodifiableCollection",
398 function(collection){
399 if(collection==null){
400 throw new NullPointerException();
401 }return new java.util.Collections.UnmodifiableCollection(collection);
402 },"java.util.Collection");
403 c$.unmodifiableList=Clazz.defineMethod(c$,"unmodifiableList",
404 function(list){
405 if(list==null){
406 throw new NullPointerException();
407 }if(Clazz.instanceOf(list,java.util.RandomAccess)){
408 return new java.util.Collections.UnmodifiableRandomAccessList(list);
409 }return new java.util.Collections.UnmodifiableList(list);
410 },"java.util.List");
411 c$.unmodifiableMap=Clazz.defineMethod(c$,"unmodifiableMap",
412 function(map){
413 if(map==null){
414 throw new NullPointerException();
415 }return new java.util.Collections.UnmodifiableMap(map);
416 },"java.util.Map");
417 c$.unmodifiableSet=Clazz.defineMethod(c$,"unmodifiableSet",
418 function(set){
419 if(set==null){
420 throw new NullPointerException();
421 }return new java.util.Collections.UnmodifiableSet(set);
422 },"java.util.Set");
423 c$.unmodifiableSortedMap=Clazz.defineMethod(c$,"unmodifiableSortedMap",
424 function(map){
425 if(map==null){
426 throw new NullPointerException();
427 }return new java.util.Collections.UnmodifiableSortedMap(map);
428 },"java.util.SortedMap");
429 c$.unmodifiableSortedSet=Clazz.defineMethod(c$,"unmodifiableSortedSet",
430 function(set){
431 if(set==null){
432 throw new NullPointerException();
433 }return new java.util.Collections.UnmodifiableSortedSet(set);
434 },"java.util.SortedSet");
435 c$.frequency=Clazz.defineMethod(c$,"frequency",
436 function(c,o){
437 if(c==null){
438 throw new NullPointerException();
439 }if(c.isEmpty()){
440 return 0;
441 }
442 var result=0;
443 var itr=c.iterator();
444 while(itr.hasNext()){
445 var e=itr.next();
446 if(o==null?e==null:o.equals(e)){
447 result++;
448 }}
449 return result;
450 },"java.util.Collection,~O");
451
452 c$.emptyList=Clazz.defineMethod(c$,"emptyList",
453 function(){
454 return java.util.Collections.EMPTY_LIST;
455 });
456 c$.emptySet=Clazz.defineMethod(c$,"emptySet",
457 function(){
458 return java.util.Collections.EMPTY_SET;
459 });
460 c$.emptyMap=Clazz.defineMethod(c$,"emptyMap",
461 function(){
462 return java.util.Collections.EMPTY_MAP;
463 });
464 c$.checkedCollection=Clazz.defineMethod(c$,"checkedCollection",
465 function(c,type){
466 return new java.util.Collections.CheckedCollection(c,type);
467 },"java.util.Collection,Class");
468 c$.checkedMap=Clazz.defineMethod(c$,"checkedMap",
469 function(m,keyType,valueType){
470 return new java.util.Collections.CheckedMap(m,keyType,valueType);
471 },"java.util.Map,Class,Class");
472 c$.checkedList=Clazz.defineMethod(c$,"checkedList",
473 function(list,type){
474 if(Clazz.instanceOf(list,java.util.RandomAccess)){
475 return new java.util.Collections.CheckedRandomAccessList(list,type);
476 }return new java.util.Collections.CheckedList(list,type);
477 },"java.util.List,Class");
478 c$.checkedSet=Clazz.defineMethod(c$,"checkedSet",
479 function(s,type){
480 return new java.util.Collections.CheckedSet(s,type);
481 },"java.util.Set,Class");
482 c$.checkedSortedMap=Clazz.defineMethod(c$,"checkedSortedMap",
483 function(m,keyType,valueType){
484 return new java.util.Collections.CheckedSortedMap(m,keyType,valueType);
485 },"java.util.SortedMap,Class,Class");
486 c$.checkedSortedSet=Clazz.defineMethod(c$,"checkedSortedSet",
487 function(s,type){
488 return new java.util.Collections.CheckedSortedSet(s,type);
489 },"java.util.SortedSet,Class");
490 c$.addAll=Clazz.defineMethod(c$,"addAll",
491 function(c,a){
492 var modified=false;
493 for(var i=0;i<a.length;i++){
494 modified=new Boolean(modified|c.add(a[i])).valueOf();
495 }
496 return modified;
497 },"java.util.Collection,~A");
498 c$.disjoint=Clazz.defineMethod(c$,"disjoint",
499 function(c1,c2){
500 if((Clazz.instanceOf(c1,java.util.Set))&&!(Clazz.instanceOf(c2,java.util.Set))||(c2.size())>c1.size()){
501 var tmp=c1;
502 c1=c2;
503 c2=tmp;
504 }var it=c1.iterator();
505 while(it.hasNext()){
506 if(c2.contains(it.next())){
507 return false;
508 }}
509 return true;
510 },"java.util.Collection,java.util.Collection");
511 c$.checkType=Clazz.defineMethod(c$,"checkType",
512 function(obj,type){
513 if(!type.isInstance(obj)){
514 throw new ClassCastException("Attempt to insert "+obj.getClass()+" element into collection with element type "+type);
515 }return obj;
516 },"~O,Class");
517
518 c$.$Collections$1$=function(c){
519 Clazz.pu$h(self.c$);
520 c$=Clazz.decorateAsClass(function(){
521 Clazz.prepareCallback(this,arguments);
522 this.it=null;
523 Clazz.instantialize(this,arguments);
524 },java.util,"Collections$1",null,java.util.Enumeration);
525
526 Clazz.prepareFields(c$,function(){
527 this.it=c.iterator();
528 });
529
530 Clazz.defineMethod(c$,"hasMoreElements",
531 function(){
532 return this.it.hasNext();
533 });
534 Clazz.defineMethod(c$,"nextElement",
535 function(){
536 return this.it.next();
537 });
538 c$=Clazz.p0p();
539 };
540
541 Clazz.pu$h(self.c$);
542 c$=Clazz.decorateAsClass(function(){
543 this.n=0;
544 this.element=null;
545 Clazz.instantialize(this,arguments);
546 },java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);
547 Clazz.makeConstructor(c$,
548 function(a,b){
549 Clazz.superConstructor(this,java.util.Collections.CopiesList,[]);
550 if(a<0){
551 throw new IllegalArgumentException();
552 }this.n=a;
553 this.element=b;
554 },"~N,~O");
555 Clazz.overrideMethod(c$,"contains",
556 function(a){
557 return this.element==null?a==null:this.element.equals(a);
558 },"~O");
559 Clazz.overrideMethod(c$,"size",
560 function(){
561 return this.n;
562 });
563 Clazz.overrideMethod(c$,"get",
564 function(a){
565 if(0<=a&&a<this.n){
566 return this.element;
567 }throw new IndexOutOfBoundsException();
568 },"~N");
569 c$=Clazz.p0p();
570 Clazz.pu$h(self.c$);
571 c$=Clazz.declareType(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);
572 Clazz.overrideMethod(c$,"contains",
573 function(a){
574 return false;
575 },"~O");
576 Clazz.overrideMethod(c$,"size",
577 function(){
578 return 0;
579 });
580 Clazz.overrideMethod(c$,"get",
581 function(a){
582 throw new IndexOutOfBoundsException();
583 },"~N");
584 c$=Clazz.p0p();
585 Clazz.pu$h(self.c$);
586 c$=Clazz.declareType(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);
587 Clazz.overrideMethod(c$,"contains",
588 function(a){
589 return false;
590 },"~O");
591 Clazz.overrideMethod(c$,"size",
592 function(){
593 return 0;
594 });
595 Clazz.overrideMethod(c$,"iterator",
596 function(){
597 return((Clazz.isClassDefined("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$()),Clazz.innerTypeInstance(java.util.Collections$EmptySet$1,this,null));
598 });
599 c$.$Collections$EmptySet$1$=function(){
600 Clazz.pu$h(self.c$);
601 c$=Clazz.declareAnonymous(java.util,"Collections$EmptySet$1",null,java.util.Iterator);
602 Clazz.overrideMethod(c$,"hasNext",
603 function(){
604 return false;
605 });
606 Clazz.overrideMethod(c$,"next",
607 function(){
608 throw new java.util.NoSuchElementException();
609 });
610 Clazz.overrideMethod(c$,"remove",
611 function(){
612 throw new UnsupportedOperationException();
613 });
614 c$=Clazz.p0p();
615 };
616 c$=Clazz.p0p();
617 Clazz.pu$h(self.c$);
618 c$=Clazz.declareType(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
619 Clazz.overrideMethod(c$,"containsKey",
620 function(a){
621 return false;
622 },"~O");
623 Clazz.overrideMethod(c$,"containsValue",
624 function(a){
625 return false;
626 },"~O");
627 Clazz.overrideMethod(c$,"entrySet",
628 function(){
629 return java.util.Collections.EMPTY_SET;
630 });
631 Clazz.overrideMethod(c$,"get",
632 function(a){
633 return null;
634 },"~O");
635 Clazz.overrideMethod(c$,"keySet",
636 function(){
637 return java.util.Collections.EMPTY_SET;
638 });
639 Clazz.overrideMethod(c$,"values",
640 function(){
641 return java.util.Collections.EMPTY_LIST;
642 });
643 c$=Clazz.p0p();
644 Clazz.pu$h(self.c$);
645 c$=Clazz.declareType(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);
646 Clazz.overrideMethod(c$,"compare",
647 function(a,b){
648 var c=b;
649 return c.compareTo(a);
650 },"~O,~O");
651 c$=Clazz.p0p();
652 Clazz.pu$h(self.c$);
653 c$=Clazz.decorateAsClass(function(){
654 this.comparator=null;
655 Clazz.instantialize(this,arguments);
656 },java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);
657 Clazz.makeConstructor(c$,
658 function(a){
659 this.comparator=a;
660 },"java.util.Comparator");
661 Clazz.defineMethod(c$,"compare",
662 function(a,b){
663 return this.comparator.compare(b,a);
664 },"~O,~O");
665 c$=Clazz.p0p();
666 Clazz.pu$h(self.c$);
667 c$=Clazz.decorateAsClass(function(){
668 this.element=null;
669 Clazz.instantialize(this,arguments);
670 },java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);
671 Clazz.makeConstructor(c$,
672 function(a){
673 Clazz.superConstructor(this,java.util.Collections.SingletonSet,[]);
674 this.element=a;
675 },"~O");
676 Clazz.overrideMethod(c$,"contains",
677 function(a){
678 return this.element==null?a==null:this.element.equals(a);
679 },"~O");
680 Clazz.overrideMethod(c$,"size",
681 function(){
682 return 1;
683 });
684 Clazz.overrideMethod(c$,"iterator",
685 function(){
686 return((Clazz.isClassDefined("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$()),Clazz.innerTypeInstance(java.util.Collections$SingletonSet$1,this,null));
687 });
688 c$.$Collections$SingletonSet$1$=function(){
689 Clazz.pu$h(self.c$);
690 c$=Clazz.decorateAsClass(function(){
691 Clazz.prepareCallback(this,arguments);
692 this.$hasNext=true;
693 Clazz.instantialize(this,arguments);
694 },java.util,"Collections$SingletonSet$1",null,java.util.Iterator);
695 Clazz.overrideMethod(c$,"hasNext",
696 function(){
697 return this.$hasNext;
698 });
699 Clazz.overrideMethod(c$,"next",
700 function(){
701 if(this.$hasNext){
702 this.$hasNext=false;
703 return this.b$["java.util.Collections.SingletonSet"].element;
704 }throw new java.util.NoSuchElementException();
705 });
706 Clazz.overrideMethod(c$,"remove",
707 function(){
708 throw new UnsupportedOperationException();
709 });
710 c$=Clazz.p0p();
711 };
712 c$=Clazz.p0p();
713 Clazz.pu$h(self.c$);
714 c$=Clazz.decorateAsClass(function(){
715 this.element=null;
716 Clazz.instantialize(this,arguments);
717 },java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);
718 Clazz.makeConstructor(c$,
719 function(a){
720 Clazz.superConstructor(this,java.util.Collections.SingletonList,[]);
721 this.element=a;
722 },"~O");
723 Clazz.overrideMethod(c$,"contains",
724 function(a){
725 return this.element==null?a==null:this.element.equals(a);
726 },"~O");
727 Clazz.overrideMethod(c$,"get",
728 function(a){
729 if(a==0){
730 return this.element;
731 }throw new IndexOutOfBoundsException();
732 },"~N");
733 Clazz.overrideMethod(c$,"size",
734 function(){
735 return 1;
736 });
737 c$=Clazz.p0p();
738 Clazz.pu$h(self.c$);
739 c$=Clazz.decorateAsClass(function(){
740 this.k=null;
741 this.v=null;
742 Clazz.instantialize(this,arguments);
743 },java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);
744 Clazz.makeConstructor(c$,
745 function(a,b){
746 Clazz.superConstructor(this,java.util.Collections.SingletonMap,[]);
747 this.k=a;
748 this.v=b;
749 },"~O,~O");
750 Clazz.overrideMethod(c$,"containsKey",
751 function(a){
752 return this.k==null?a==null:this.k.equals(a);
753 },"~O");
754 Clazz.overrideMethod(c$,"containsValue",
755 function(a){
756 return this.v==null?a==null:this.v.equals(a);
757 },"~O");
758 Clazz.overrideMethod(c$,"get",
759 function(a){
760 if(this.containsKey(a)){
761 return this.v;
762 }return null;
763 },"~O");
764 Clazz.overrideMethod(c$,"size",
765 function(){
766 return 1;
767 });
768 Clazz.overrideMethod(c$,"entrySet",
769 function(){
770 return((Clazz.isClassDefined("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$()),Clazz.innerTypeInstance(java.util.Collections$SingletonMap$1,this,null));
771 });
772 c$.$Collections$SingletonMap$1$=function(){
773 Clazz.pu$h(self.c$);
774 c$=Clazz.declareAnonymous(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);
775 Clazz.overrideMethod(c$,"contains",
776 function(a){
777 if(Clazz.instanceOf(a,java.util.Map.Entry)){
778 var b=a;
779 return this.b$["java.util.Collections.SingletonMap"].containsKey(b.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(b.getValue());
780 }return false;
781 },"~O");
782 Clazz.overrideMethod(c$,"size",
783 function(){
784 return 1;
785 });
786 Clazz.overrideMethod(c$,"iterator",
787 function(){
788 return((Clazz.isClassDefined("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$()),Clazz.innerTypeInstance(java.util.Collections$SingletonMap$1$1,this,null));
789 });
790 c$=Clazz.p0p();
791 };
792 c$.$Collections$SingletonMap$1$1$=function(){
793 Clazz.pu$h(self.c$);
794 c$=Clazz.decorateAsClass(function(){
795 Clazz.prepareCallback(this,arguments);
796 this.$hasNext=true;
797 Clazz.instantialize(this,arguments);
798 },java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);
799 Clazz.overrideMethod(c$,"hasNext",
800 function(){
801 return this.$hasNext;
802 });
803 Clazz.overrideMethod(c$,"next",
804 function(){
805 if(this.$hasNext){
806 this.$hasNext=false;
807 return((Clazz.isClassDefined("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$()),Clazz.innerTypeInstance(java.util.Collections$SingletonMap$1$1$1,this,null));
808 }throw new java.util.NoSuchElementException();
809 });
810 Clazz.overrideMethod(c$,"remove",
811 function(){
812 throw new UnsupportedOperationException();
813 });
814 c$=Clazz.p0p();
815 };
816 c$.$Collections$SingletonMap$1$1$1$=function(){
817 Clazz.pu$h(self.c$);
818 c$=Clazz.declareAnonymous(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);
819 Clazz.overrideMethod(c$,"equals",
820 function(a){
821 return this.b$["java.util.Collections$SingletonMap$1"].contains(a);
822 },"~O");
823 Clazz.overrideMethod(c$,"getKey",
824 function(){
825 return this.b$["java.util.Collections.SingletonMap"].k;
826 });
827 Clazz.overrideMethod(c$,"getValue",
828 function(){
829 return this.b$["java.util.Collections.SingletonMap"].v;
830 });
831 Clazz.overrideMethod(c$,"hashCode",
832 function(){
833 return(this.b$["java.util.Collections.SingletonMap"].k==null?0:this.b$["java.util.Collections.SingletonMap"].k.hashCode())^(this.b$["java.util.Collections.SingletonMap"].v==null?0:this.b$["java.util.Collections.SingletonMap"].v.hashCode());
834 });
835 Clazz.overrideMethod(c$,"setValue",
836 function(a){
837 throw new UnsupportedOperationException();
838 },"~O");
839 c$=Clazz.p0p();
840 };
841 c$=Clazz.p0p();
842 Clazz.pu$h(self.c$);
843 c$=Clazz.decorateAsClass(function(){
844 this.c=null;
845 this.mutex=null;
846 Clazz.instantialize(this,arguments);
847 },java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);
848 Clazz.makeConstructor(c$,
849 function(a){
850 this.c=a;
851 this.mutex=this;
852 },"java.util.Collection");
853 Clazz.makeConstructor(c$,
854 function(a,b){
855 this.c=a;
856 this.mutex=b;
857 },"java.util.Collection,~O");
858 Clazz.defineMethod(c$,"add",
859 function(a){
860 {
861 return this.c.add(a);
862 }},"~O");
863 Clazz.defineMethod(c$,"addAll",
864 function(a){
865 {
866 return this.c.addAll(a);
867 }},"java.util.Collection");
868 Clazz.defineMethod(c$,"clear",
869 function(){
870 {
871 this.c.clear();
872 }});
873 Clazz.defineMethod(c$,"contains",
874 function(a){
875 {
876 return this.c.contains(a);
877 }},"~O");
878 Clazz.defineMethod(c$,"containsAll",
879 function(a){
880 {
881 return this.c.containsAll(a);
882 }},"java.util.Collection");
883 Clazz.defineMethod(c$,"isEmpty",
884 function(){
885 {
886 return this.c.isEmpty();
887 }});
888 Clazz.defineMethod(c$,"iterator",
889 function(){
890 {
891 return this.c.iterator();
892 }});
893 Clazz.defineMethod(c$,"remove",
894 function(a){
895 {
896 return this.c.remove(a);
897 }},"~O");
898 Clazz.defineMethod(c$,"removeAll",
899 function(a){
900 {
901 return this.c.removeAll(a);
902 }},"java.util.Collection");
903 Clazz.defineMethod(c$,"retainAll",
904 function(a){
905 {
906 return this.c.retainAll(a);
907 }},"java.util.Collection");
908 Clazz.defineMethod(c$,"size",
909 function(){
910 {
911 return this.c.size();
912 }});
913 Clazz.defineMethod(c$,"toArray",
914 function(){
915 {
916 return this.c.toArray();
917 }});
918 Clazz.defineMethod(c$,"toString",
919 function(){
920 {
921 return this.c.toString();
922 }});
923 Clazz.defineMethod(c$,"toArray",
924 function(a){
925 {
926 return this.c.toArray(a);
927 }},"~A");
928 c$=Clazz.p0p();
929
930
931 Clazz.pu$h(self.c$);
932 c$=Clazz.decorateAsClass(function(){
933 this.list=null;
934 Clazz.instantialize(this,arguments);
935 },java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);
936 Clazz.makeConstructor(c$,
937 function(a){
938 Clazz.superConstructor(this,java.util.Collections.SynchronizedList,[a]);
939 this.list=a;
940 },"java.util.List");
941 Clazz.makeConstructor(c$,
942 function(a,b){
943 Clazz.superConstructor(this,java.util.Collections.SynchronizedList,[a,b]);
944 this.list=a;
945 },"java.util.List,~O");
946 Clazz.defineMethod(c$,"add",
947 function(a,b){
948 {
949 this.list.add(a,b);
950 }},"~N,~O");
951 Clazz.defineMethod(c$,"addAll",
952 function(a,b){
953 {
954 return this.list.addAll(a,b);
955 }},"~N,java.util.Collection");
956 Clazz.overrideMethod(c$,"equals",
957 function(a){
958 {
959 return this.list.equals(a);
960 }},"~O");
961 Clazz.defineMethod(c$,"get",
962 function(a){
963 {
964 return this.list.get(a);
965 }},"~N");
966 Clazz.overrideMethod(c$,"hashCode",
967 function(){
968 {
969 return this.list.hashCode();
970 }});
971 Clazz.defineMethod(c$,"indexOf",
972 function(a){
973 {
974 return this.list.indexOf(a);
975 }},"~O");
976 Clazz.defineMethod(c$,"lastIndexOf",
977 function(a){
978 {
979 return this.list.lastIndexOf(a);
980 }},"~O");
981 //Clazz.defineMethod(c$,"listIterator",
982 //function(){
983 //{
984 //return this.list.listIterator();
985 //}});
986 Clazz.defineMethod(c$,"listIterator",
987 function(a){
988 {
989 a || (a = 0);
990 return this.list.listIterator(a);
991 }},"~N");
992 Clazz.defineMethod(c$,"remove",
993 function(a){
994 {
995 return this.list.remove(a);
996 }},"~N");
997 Clazz.defineMethod(c$,"set",
998 function(a,b){
999 {
1000 return this.list.set(a,b);
1001 }},"~N,~O");
1002 Clazz.defineMethod(c$,"subList",
1003 function(a,b){
1004 {
1005 return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex);
1006 }},"~N,~N");
1007 c$=Clazz.p0p();
1008
1009
1010
1011 Clazz.pu$h(self.c$);
1012 c$=Clazz.declareType(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);
1013 Clazz.overrideMethod(c$,"subList",
1014 function(a,b){
1015 {
1016 return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex);
1017 }},"~N,~N");
1018 c$=Clazz.p0p();
1019
1020
1021
1022
1023 Clazz.pu$h(self.c$);
1024 c$=Clazz.decorateAsClass(function(){
1025 this.m=null;
1026 this.mutex=null;
1027 Clazz.instantialize(this,arguments);
1028 },java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);
1029 Clazz.makeConstructor(c$,
1030 function(a){
1031 this.m=a;
1032 this.mutex=this;
1033 },"java.util.Map");
1034 Clazz.makeConstructor(c$,
1035 function(a,b){
1036 this.m=a;
1037 this.mutex=b;
1038 },"java.util.Map,~O");
1039 Clazz.defineMethod(c$,"clear",
1040 function(){
1041 {
1042 this.m.clear();
1043 }});
1044 Clazz.defineMethod(c$,"containsKey",
1045 function(a){
1046 {
1047 return this.m.containsKey(a);
1048 }},"~O");
1049 Clazz.defineMethod(c$,"containsValue",
1050 function(a){
1051 {
1052 return this.m.containsValue(a);
1053 }},"~O");
1054 Clazz.defineMethod(c$,"entrySet",
1055 function(){
1056 {
1057 return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex);
1058 }});
1059 Clazz.overrideMethod(c$,"equals",
1060 function(a){
1061 {
1062 return this.m.equals(a);
1063 }},"~O");
1064 Clazz.defineMethod(c$,"get",
1065 function(a){
1066 {
1067 return this.m.get(a);
1068 }},"~O");
1069 Clazz.overrideMethod(c$,"hashCode",
1070 function(){
1071 {
1072 return this.m.hashCode();
1073 }});
1074 Clazz.defineMethod(c$,"isEmpty",
1075 function(){
1076 {
1077 return this.m.isEmpty();
1078 }});
1079 Clazz.defineMethod(c$,"keySet",
1080 function(){
1081 {
1082 return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex);
1083 }});
1084 Clazz.defineMethod(c$,"put",
1085 function(a,b){
1086 {
1087 return this.m.put(a,b);
1088 }},"~O,~O");
1089 Clazz.defineMethod(c$,"putAll",
1090 function(a){
1091 {
1092 this.m.putAll(a);
1093 }},"java.util.Map");
1094 Clazz.defineMethod(c$,"remove",
1095 function(a){
1096 {
1097 return this.m.remove(a);
1098 }},"~O");
1099 Clazz.defineMethod(c$,"size",
1100 function(){
1101 {
1102 return this.m.size();
1103 }});
1104 Clazz.defineMethod(c$,"values",
1105 function(){
1106 {
1107 return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex);
1108 }});
1109 Clazz.defineMethod(c$,"toString",
1110 function(){
1111 {
1112 return this.m.toString();
1113 }});
1114 c$=Clazz.p0p();
1115 Clazz.pu$h(self.c$);
1116 c$=Clazz.declareType(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);
1117 Clazz.overrideMethod(c$,"equals",
1118 function(a){
1119 {
1120 return this.c.equals(a);
1121 }},"~O");
1122 Clazz.overrideMethod(c$,"hashCode",
1123 function(){
1124 {
1125 return this.c.hashCode();
1126 }});
1127 c$=Clazz.p0p();
1128 Clazz.pu$h(self.c$);
1129 c$=Clazz.decorateAsClass(function(){
1130 this.sm=null;
1131 Clazz.instantialize(this,arguments);
1132 },java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);
1133 Clazz.makeConstructor(c$,
1134 function(a){
1135 Clazz.superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a]);
1136 this.sm=a;
1137 },"java.util.SortedMap");
1138 Clazz.makeConstructor(c$,
1139 function(a,b){
1140 Clazz.superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a,b]);
1141 this.sm=a;
1142 },"java.util.SortedMap,~O");
1143 Clazz.defineMethod(c$,"comparator",
1144 function(){
1145 {
1146 return this.sm.comparator();
1147 }});
1148 Clazz.defineMethod(c$,"firstKey",
1149 function(){
1150 {
1151 return this.sm.firstKey();
1152 }});
1153 Clazz.defineMethod(c$,"headMap",
1154 function(a){
1155 {
1156 return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex);
1157 }},"~O");
1158 Clazz.defineMethod(c$,"lastKey",
1159 function(){
1160 {
1161 return this.sm.lastKey();
1162 }});
1163 Clazz.defineMethod(c$,"subMap",
1164 function(a,b){
1165 {
1166 return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,b),this.mutex);
1167 }},"~O,~O");
1168 Clazz.defineMethod(c$,"tailMap",
1169 function(a){
1170 {
1171 return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex);
1172 }},"~O");
1173 c$=Clazz.p0p();
1174 Clazz.pu$h(self.c$);
1175 c$=Clazz.decorateAsClass(function(){
1176 this.ss=null;
1177 Clazz.instantialize(this,arguments);
1178 },java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);
1179 Clazz.makeConstructor(c$,
1180 function(a){
1181 Clazz.superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a]);
1182 this.ss=a;
1183 },"java.util.SortedSet");
1184 Clazz.makeConstructor(c$,
1185 function(a,b){
1186 Clazz.superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a,b]);
1187 this.ss=a;
1188 },"java.util.SortedSet,~O");
1189 Clazz.defineMethod(c$,"comparator",
1190 function(){
1191 {
1192 return this.ss.comparator();
1193 }});
1194 Clazz.defineMethod(c$,"first",
1195 function(){
1196 {
1197 return this.ss.first();
1198 }});
1199 Clazz.defineMethod(c$,"headSet",
1200 function(a){
1201 {
1202 return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex);
1203 }},"~O");
1204 Clazz.defineMethod(c$,"last",
1205 function(){
1206 {
1207 return this.ss.last();
1208 }});
1209 Clazz.defineMethod(c$,"subSet",
1210 function(a,b){
1211 {
1212 return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex);
1213 }},"~O,~O");
1214 Clazz.defineMethod(c$,"tailSet",
1215 function(a){
1216 {
1217 return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex);
1218 }},"~O");
1219 c$=Clazz.p0p();
1220 Clazz.pu$h(self.c$);
1221 c$=Clazz.decorateAsClass(function(){
1222 this.c=null;
1223 Clazz.instantialize(this,arguments);
1224 },java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);
1225 Clazz.makeConstructor(c$,
1226 function(a){
1227 this.c=a;
1228 },"java.util.Collection");
1229 Clazz.overrideMethod(c$,"add",
1230 function(a){
1231 throw new UnsupportedOperationException();
1232 },"~O");
1233 Clazz.overrideMethod(c$,"addAll",
1234 function(a){
1235 throw new UnsupportedOperationException();
1236 },"java.util.Collection");
1237 Clazz.overrideMethod(c$,"clear",
1238 function(){
1239 throw new UnsupportedOperationException();
1240 });
1241 Clazz.defineMethod(c$,"contains",
1242 function(a){
1243 return this.c.contains(a);
1244 },"~O");
1245 Clazz.defineMethod(c$,"containsAll",
1246 function(a){
1247 return this.c.containsAll(a);
1248 },"java.util.Collection");
1249 Clazz.defineMethod(c$,"isEmpty",
1250 function(){
1251 return this.c.isEmpty();
1252 });
1253 Clazz.defineMethod(c$,"iterator",
1254 function(){
1255 return((Clazz.isClassDefined("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$()),Clazz.innerTypeInstance(java.util.Collections$UnmodifiableCollection$1,this,null));
1256 });
1257 Clazz.overrideMethod(c$,"remove",
1258 function(a){
1259 throw new UnsupportedOperationException();
1260 },"~O");
1261 Clazz.overrideMethod(c$,"removeAll",
1262 function(a){
1263 throw new UnsupportedOperationException();
1264 },"java.util.Collection");
1265 Clazz.overrideMethod(c$,"retainAll",
1266 function(a){
1267 throw new UnsupportedOperationException();
1268 },"java.util.Collection");
1269 Clazz.defineMethod(c$,"size",
1270 function(){
1271 return this.c.size();
1272 });
1273 Clazz.defineMethod(c$,"toArray",
1274 function(){
1275 return this.c.toArray();
1276 });
1277 Clazz.defineMethod(c$,"toArray",
1278 function(a){
1279 return this.c.toArray(a);
1280 },"~A");
1281 Clazz.defineMethod(c$,"toString",
1282 function(){
1283 return this.c.toString();
1284 });
1285 c$.$Collections$UnmodifiableCollection$1$=function(){
1286 Clazz.pu$h(self.c$);
1287 c$=Clazz.decorateAsClass(function(){
1288 Clazz.prepareCallback(this,arguments);
1289 this.iterator=null;
1290 Clazz.instantialize(this,arguments);
1291 },java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);
1292 Clazz.prepareFields(c$,function(){
1293 this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator();
1294 });
1295 Clazz.defineMethod(c$,"hasNext",
1296 function(){
1297 return this.iterator.hasNext();
1298 });
1299 Clazz.defineMethod(c$,"next",
1300 function(){
1301 return this.iterator.next();
1302 });
1303 Clazz.overrideMethod(c$,"remove",
1304 function(){
1305 throw new UnsupportedOperationException();
1306 });
1307 c$=Clazz.p0p();
1308 };
1309 c$=Clazz.p0p();
1310
1311 //BH note: a declared static superclass must come before a static class referencing it
1312
1313 Clazz.pu$h(self.c$);
1314 c$=Clazz.decorateAsClass(function(){
1315 this.list=null;
1316 Clazz.instantialize(this,arguments);
1317 },java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
1318 Clazz.makeConstructor(c$,
1319 function(a){
1320 Clazz.superConstructor(this,java.util.Collections.UnmodifiableList,[a]);
1321 this.list=a;
1322 },"java.util.List");
1323 Clazz.defineMethod(c$,"add",
1324 function(a,b){
1325 throw new UnsupportedOperationException();
1326 },"~N,~O");
1327 Clazz.defineMethod(c$,"addAll",
1328 function(a,b){
1329 throw new UnsupportedOperationException();
1330 },"~N,java.util.Collection");
1331 Clazz.overrideMethod(c$,"equals",
1332 function(a){
1333 return this.list.equals(a);
1334 },"~O");
1335 Clazz.defineMethod(c$,"get",
1336 function(a){
1337 return this.list.get(a);
1338 },"~N");
1339 Clazz.overrideMethod(c$,"hashcode",
1340 function(){
1341 return this.list.hashCode();
1342 });
1343 Clazz.defineMethod(c$,"indexOf",
1344 function(a){
1345 return this.list.indexOf(a);
1346 },"~O");
1347 Clazz.defineMethod(c$,"lastIndexOf",
1348 function(a){
1349 return this.list.lastIndexOf(a);
1350 },"~O");
1351 //Clazz.defineMethod(c$,"listIterator",
1352 //function(){
1353 //return this.listIterator(0);
1354 //});
1355 Clazz.defineMethod(c$,"listIterator",
1356 function(a){
1357 a || (a = 0);
1358 return((Clazz.isClassDefined("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$()),Clazz.innerTypeInstance(java.util.Collections$UnmodifiableList$1,this,null));
1359 },"~N");
1360 Clazz.defineMethod(c$,"remove",
1361 function(a){
1362 throw new UnsupportedOperationException();
1363 },"~N");
1364 Clazz.overrideMethod(c$,"set",
1365 function(a,b){
1366 throw new UnsupportedOperationException();
1367 },"~N,~O");
1368 Clazz.defineMethod(c$,"subList",
1369 function(a,b){
1370 return new java.util.Collections.UnmodifiableList(this.list.subList(a,b));
1371 },"~N,~N");
1372 c$.$Collections$UnmodifiableList$1$=function(){
1373 Clazz.pu$h(self.c$);
1374 c$=Clazz.decorateAsClass(function(){
1375 Clazz.prepareCallback(this,arguments);
1376 this.iterator=null;
1377 Clazz.instantialize(this,arguments);
1378 },java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);
1379 Clazz.prepareFields(c$,function(){
1380 this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location);
1381 });
1382 Clazz.overrideMethod(c$,"add",
1383 function(b){
1384 throw new UnsupportedOperationException();
1385 },"~O");
1386 Clazz.defineMethod(c$,"hasNext",
1387 function(){
1388 return this.iterator.hasNext();
1389 });
1390 Clazz.defineMethod(c$,"hasPrevious",
1391 function(){
1392 return this.iterator.hasPrevious();
1393 });
1394 Clazz.defineMethod(c$,"next",
1395 function(){
1396 return this.iterator.next();
1397 });
1398 Clazz.defineMethod(c$,"nextIndex",
1399 function(){
1400 return this.iterator.nextIndex();
1401 });
1402 Clazz.defineMethod(c$,"previous",
1403 function(){
1404 return this.iterator.previous();
1405 });
1406 Clazz.defineMethod(c$,"previousIndex",
1407 function(){
1408 return this.iterator.previousIndex();
1409 });
1410 Clazz.overrideMethod(c$,"remove",
1411 function(){
1412 throw new UnsupportedOperationException();
1413 });
1414 Clazz.overrideMethod(c$,"set",
1415 function(b){
1416 throw new UnsupportedOperationException();
1417 },"~O");
1418 c$=Clazz.p0p();
1419 };
1420 c$=Clazz.p0p();
1421
1422
1423
1424
1425 Clazz.pu$h(self.c$);
1426 c$=Clazz.declareType(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);
1427 Clazz.overrideMethod(c$,"subList",
1428 function(a,b){
1429 return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b));
1430 },"~N,~N");
1431 c$=Clazz.p0p();
1432
1433
1434 Clazz.pu$h(self.c$);
1435 c$=Clazz.declareType(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);
1436 Clazz.overrideMethod(c$,"equals",
1437 function(a){
1438 return this.c.equals(a);
1439 },"~O");
1440 Clazz.overrideMethod(c$,"hashCode",
1441 function(){
1442 return this.c.hashCode();
1443 });
1444 c$=Clazz.p0p();
1445
1446
1447 Clazz.pu$h(self.c$);
1448 c$=Clazz.decorateAsClass(function(){
1449 this.m=null;
1450 Clazz.instantialize(this,arguments);
1451 },java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);
1452 Clazz.makeConstructor(c$,
1453 function(a){
1454 this.m=a;
1455 },"java.util.Map");
1456 Clazz.overrideMethod(c$,"clear",
1457 function(){
1458 throw new UnsupportedOperationException();
1459 });
1460 Clazz.defineMethod(c$,"containsKey",
1461 function(a){
1462 return this.m.containsKey(a);
1463 },"~O");
1464 Clazz.defineMethod(c$,"containsValue",
1465 function(a){
1466 return this.m.containsValue(a);
1467 },"~O");
1468 Clazz.defineMethod(c$,"entrySet",
1469 function(){
1470 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet());
1471 });
1472 Clazz.overrideMethod(c$,"equals",
1473 function(a){
1474 return this.m.equals(a);
1475 },"~O");
1476 Clazz.defineMethod(c$,"get",
1477 function(a){
1478 return this.m.get(a);
1479 },"~O");
1480 Clazz.overrideMethod(c$,"hashcode",
1481 function(){
1482 return this.m.hashCode();
1483 });
1484 Clazz.defineMethod(c$,"isEmpty",
1485 function(){
1486 return this.m.isEmpty();
1487 });
1488 Clazz.defineMethod(c$,"keySet",
1489 function(){
1490 return new java.util.Collections.UnmodifiableSet(this.m.keySet());
1491 });
1492 Clazz.overrideMethod(c$,"put",
1493 function(a,b){
1494 throw new UnsupportedOperationException();
1495 },"~O,~O");
1496 Clazz.overrideMethod(c$,"putAll",
1497 function(a){
1498 throw new UnsupportedOperationException();
1499 },"java.util.Map");
1500 Clazz.overrideMethod(c$,"remove",
1501 function(a){
1502 throw new UnsupportedOperationException();
1503 },"~O");
1504 Clazz.defineMethod(c$,"size",
1505 function(){
1506 return this.m.size();
1507 });
1508 Clazz.defineMethod(c$,"values",
1509 function(){
1510 return new java.util.Collections.UnmodifiableCollection(this.m.values());
1511 });
1512 Clazz.defineMethod(c$,"toString",
1513 function(){
1514 return this.m.toString();
1515 });
1516
1517
1518
1519
1520
1521
1522
1523 Clazz.pu$h(self.c$);
1524 c$=Clazz.declareType(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);
1525 Clazz.overrideMethod(c$,"iterator",
1526 function(){
1527 return((Clazz.isClassDefined("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$()),Clazz.innerTypeInstance(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null));
1528 });
1529 Clazz.defineMethod(c$,"toArray",
1530 function(){
1531 var a=this.c.size();
1532 var b=new Array(a);
1533 var c=this.iterator();
1534 for(var d=a;--d>=0;){
1535 b[d]=c.next();
1536 }
1537 return b;
1538 });
1539 Clazz.defineMethod(c$,"toArray",
1540 function(a){
1541 var b=this.c.size();
1542 var c=0;
1543 var d=this.iterator();
1544 if(b>a.length){
1545 var e=a.getClass().getComponentType();
1546 a=java.lang.reflect.Array.newInstance(e,b);
1547 }while(c<b){
1548 a[c++]=d.next();
1549 }
1550 if(c<a.length){
1551 a[c]=null;
1552 }return a;
1553 },"~A");
1554 c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){
1555 Clazz.pu$h(self.c$);
1556 c$=Clazz.decorateAsClass(function(){
1557 Clazz.prepareCallback(this,arguments);
1558 this.iterator=null;
1559 Clazz.instantialize(this,arguments);
1560 },java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
1561 Clazz.prepareFields(c$,function(){
1562 this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator();
1563 });
1564 Clazz.defineMethod(c$,"hasNext",
1565 function(){
1566 return this.iterator.hasNext();
1567 });
1568 Clazz.defineMethod(c$,"next",
1569 function(){
1570 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next());
1571 });
1572 Clazz.overrideMethod(c$,"remove",
1573 function(){
1574 throw new UnsupportedOperationException();
1575 });
1576 c$=Clazz.p0p();
1577 };
1578 Clazz.pu$h(self.c$);
1579 c$=Clazz.decorateAsClass(function(){
1580 this.mapEntry=null;
1581 Clazz.instantialize(this,arguments);
1582 },java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);
1583 Clazz.makeConstructor(c$,
1584 function(a){
1585 this.mapEntry=a;
1586 },"java.util.Map.Entry");
1587 Clazz.overrideMethod(c$,"equals",
1588 function(a){
1589 return this.mapEntry.equals(a);
1590 },"~O");
1591 Clazz.defineMethod(c$,"getKey",
1592 function(){
1593 return this.mapEntry.getKey();
1594 });
1595 Clazz.defineMethod(c$,"getValue",
1596 function(){
1597 return this.mapEntry.getValue();
1598 });
1599 Clazz.overrideMethod(c$,"hashcode",
1600 function(){
1601 return this.mapEntry.hashCode();
1602 });
1603 Clazz.overrideMethod(c$,"setValue",
1604 function(a){
1605 throw new UnsupportedOperationException();
1606 },"~O");
1607 Clazz.defineMethod(c$,"toString",
1608 function(){
1609 return this.mapEntry.toString();
1610 });
1611 c$=Clazz.p0p();
1612 c$=Clazz.p0p();
1613 c$=Clazz.p0p();
1614
1615
1616
1617 Clazz.pu$h(self.c$);
1618 c$=Clazz.decorateAsClass(function(){
1619 this.sm=null;
1620 Clazz.instantialize(this,arguments);
1621 },java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);
1622 Clazz.makeConstructor(c$,
1623 function(a){
1624 Clazz.superConstructor(this,java.util.Collections.UnmodifiableSortedMap,[a]);
1625 this.sm=a;
1626 },"java.util.SortedMap");
1627 Clazz.defineMethod(c$,"comparator",
1628 function(){
1629 return this.sm.comparator();
1630 });
1631 Clazz.defineMethod(c$,"firstKey",
1632 function(){
1633 return this.sm.firstKey();
1634 });
1635 Clazz.defineMethod(c$,"headMap",
1636 function(a){
1637 return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a));
1638 },"~O");
1639 Clazz.defineMethod(c$,"lastKey",
1640 function(){
1641 return this.sm.lastKey();
1642 });
1643 Clazz.defineMethod(c$,"subMap",
1644 function(a,b){
1645 return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b));
1646 },"~O,~O");
1647 Clazz.defineMethod(c$,"tailMap",
1648 function(a){
1649 return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a));
1650 },"~O");
1651 c$=Clazz.p0p();
1652 Clazz.pu$h(self.c$);
1653 c$=Clazz.decorateAsClass(function(){
1654 this.ss=null;
1655 Clazz.instantialize(this,arguments);
1656 },java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
1657 Clazz.makeConstructor(c$,
1658 function(a){
1659 Clazz.superConstructor(this,java.util.Collections.UnmodifiableSortedSet,[a]);
1660 this.ss=a;
1661 },"java.util.SortedSet");
1662 Clazz.defineMethod(c$,"comparator",
1663 function(){
1664 return this.ss.comparator();
1665 });
1666 Clazz.defineMethod(c$,"first",
1667 function(){
1668 return this.ss.first();
1669 });
1670 Clazz.defineMethod(c$,"headSet",
1671 function(a){
1672 return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a));
1673 },"~O");
1674 Clazz.defineMethod(c$,"last",
1675 function(){
1676 return this.ss.last();
1677 });
1678 Clazz.defineMethod(c$,"subSet",
1679 function(a,b){
1680 return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b));
1681 },"~O,~O");
1682 Clazz.defineMethod(c$,"tailSet",
1683 function(a){
1684 return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a));
1685 },"~O");
1686 c$=Clazz.p0p();
1687 Clazz.pu$h(self.c$);
1688 c$=Clazz.decorateAsClass(function(){
1689 this.c=null;
1690 this.type=null;
1691 Clazz.instantialize(this,arguments);
1692 },java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);
1693 Clazz.makeConstructor(c$,
1694 function(a,b){
1695 if(a==null||b==null){
1696 throw new NullPointerException();
1697 }this.c=a;
1698 this.type=b;
1699 },"java.util.Collection,Class");
1700 Clazz.defineMethod(c$,"size",
1701 function(){
1702 return this.c.size();
1703 });
1704 Clazz.defineMethod(c$,"isEmpty",
1705 function(){
1706 return this.c.isEmpty();
1707 });
1708 Clazz.defineMethod(c$,"contains",
1709 function(a){
1710 return this.c.contains(a);
1711 },"~O");
1712 Clazz.defineMethod(c$,"iterator",
1713 function(){
1714 var a=this.c.iterator();
1715 if(Clazz.instanceOf(a,java.util.ListIterator)){
1716 a=new java.util.Collections.CheckedListIterator(a,this.type);
1717 }return a;
1718 });
1719 Clazz.defineMethod(c$,"toArray",
1720 function(){
1721 return this.c.toArray();
1722 });
1723 Clazz.defineMethod(c$,"toArray",
1724 function(a){
1725 return this.c.toArray(a);
1726 },"~A");
1727 Clazz.defineMethod(c$,"add",
1728 function(a){
1729 return this.c.add(java.util.Collections.checkType(a,this.type));
1730 },"~O");
1731 Clazz.defineMethod(c$,"remove",
1732 function(a){
1733 return this.c.remove(a);
1734 },"~O");
1735 Clazz.defineMethod(c$,"containsAll",
1736 function(a){
1737 return this.c.containsAll(a);
1738 },"java.util.Collection");
1739 Clazz.overrideMethod(c$,"addAll",
1740 function(a){
1741 var b=a.size();
1742 if(b==0){
1743 return false;
1744 }var c=new Array(b);
1745 var d=a.iterator();
1746 for(var e=0;e<b;e++){
1747 c[e]=java.util.Collections.checkType(d.next(),this.type);
1748 }
1749 var f=false;
1750 for(var g=0;g<b;g++){
1751 f=new Boolean(f|this.c.add(c[g])).valueOf();
1752 }
1753 return f;
1754 },"java.util.Collection");
1755 Clazz.defineMethod(c$,"removeAll",
1756 function(a){
1757 return this.c.removeAll(a);
1758 },"java.util.Collection");
1759 Clazz.defineMethod(c$,"retainAll",
1760 function(a){
1761 return this.c.retainAll(a);
1762 },"java.util.Collection");
1763 Clazz.defineMethod(c$,"clear",
1764 function(){
1765 this.c.clear();
1766 });
1767 Clazz.defineMethod(c$,"toString",
1768 function(){
1769 return this.c.toString();
1770 });
1771 c$=Clazz.p0p();
1772 Clazz.pu$h(self.c$);
1773 c$=Clazz.decorateAsClass(function(){
1774 this.i=null;
1775 this.type=null;
1776 Clazz.instantialize(this,arguments);
1777 },java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);
1778 Clazz.makeConstructor(c$,
1779 function(a,b){
1780 this.i=a;
1781 this.type=b;
1782 },"java.util.ListIterator,Class");
1783 Clazz.defineMethod(c$,"hasNext",
1784 function(){
1785 return this.i.hasNext();
1786 });
1787 Clazz.defineMethod(c$,"next",
1788 function(){
1789 return this.i.next();
1790 });
1791 Clazz.defineMethod(c$,"remove",
1792 function(){
1793 this.i.remove();
1794 });
1795 Clazz.defineMethod(c$,"hasPrevious",
1796 function(){
1797 return this.i.hasPrevious();
1798 });
1799 Clazz.defineMethod(c$,"previous",
1800 function(){
1801 return this.i.previous();
1802 });
1803 Clazz.defineMethod(c$,"nextIndex",
1804 function(){
1805 return this.i.nextIndex();
1806 });
1807 Clazz.defineMethod(c$,"previousIndex",
1808 function(){
1809 return this.i.previousIndex();
1810 });
1811 Clazz.defineMethod(c$,"set",
1812 function(a){
1813 this.i.set(java.util.Collections.checkType(a,this.type));
1814 },"~O");
1815 Clazz.defineMethod(c$,"add",
1816 function(a){
1817 this.i.add(java.util.Collections.checkType(a,this.type));
1818 },"~O");
1819 c$=Clazz.p0p();
1820 Clazz.pu$h(self.c$);
1821 c$=Clazz.decorateAsClass(function(){
1822 this.l=null;
1823 Clazz.instantialize(this,arguments);
1824 },java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);
1825 Clazz.makeConstructor(c$,
1826 function(a,b){
1827 Clazz.superConstructor(this,java.util.Collections.CheckedList,[a,b]);
1828 this.l=a;
1829 },"java.util.List,Class");
1830 Clazz.defineMethod(c$,"addAll",
1831 function(a,b){
1832 var c=b.size();
1833 if(c==0){
1834 return false;
1835 }var d=new Array(c);
1836 var e=b.iterator();
1837 for(var f=0;f<c;f++){
1838 d[f]=java.util.Collections.checkType(e.next(),this.type);
1839 }
1840 return this.l.addAll(a,java.util.Arrays.asList(d));
1841 },"~N,java.util.Collection");
1842 Clazz.defineMethod(c$,"get",
1843 function(a){
1844 return this.l.get(a);
1845 },"~N");
1846 Clazz.defineMethod(c$,"set",
1847 function(a,b){
1848 return this.l.set(a,java.util.Collections.checkType(b,this.type));
1849 },"~N,~O");
1850 Clazz.defineMethod(c$,"add",
1851 function(a,b){
1852 this.l.add(a,java.util.Collections.checkType(b,this.type));
1853 },"~N,~O");
1854 Clazz.defineMethod(c$,"remove",
1855 function(a){
1856 return this.l.remove(a);
1857 },"~N");
1858 Clazz.defineMethod(c$,"indexOf",
1859 function(a){
1860 return this.l.indexOf(a);
1861 },"~O");
1862 Clazz.defineMethod(c$,"lastIndexOf",
1863 function(a){
1864 return this.l.lastIndexOf(a);
1865 },"~O");
1866 //Clazz.defineMethod(c$,"listIterator",
1867 //function(){
1868 //return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type);
1869 //});
1870 Clazz.defineMethod(c$,"listIterator",
1871 function(a){
1872 a || (a = 0);
1873 return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type);
1874 },"~N");
1875 Clazz.defineMethod(c$,"subList",
1876 function(a,b){
1877 return java.util.Collections.checkedList(this.l.subList(a,b),this.type);
1878 },"~N,~N");
1879 Clazz.overrideMethod(c$,"equals",
1880 function(a){
1881 return this.l.equals(a);
1882 },"~O");
1883 Clazz.overrideMethod(c$,"hashcode",
1884 function(){
1885 return this.l.hashCode();
1886 });
1887 c$=Clazz.p0p();
1888 Clazz.pu$h(self.c$);
1889 c$=Clazz.declareType(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);
1890 c$=Clazz.p0p();
1891 Clazz.pu$h(self.c$);
1892 c$=Clazz.declareType(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);
1893 Clazz.overrideMethod(c$,"equals",
1894 function(a){
1895 return this.c.equals(a);
1896 },"~O");
1897 Clazz.overrideMethod(c$,"hashCode",
1898 function(){
1899 return this.c.hashCode();
1900 });
1901 c$=Clazz.p0p();
1902 Clazz.pu$h(self.c$);
1903 c$=Clazz.decorateAsClass(function(){
1904 this.m=null;
1905 this.keyType=null;
1906 this.valueType=null;
1907 Clazz.instantialize(this,arguments);
1908 },java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);
1909 Clazz.makeConstructor(c$,
1910 ($fz=function(a,b,c){
1911 if(a==null||b==null||c==null){
1912 throw new NullPointerException();
1913 }this.m=a;
1914 this.keyType=b;
1915 this.valueType=c;
1916 },$fz.isPrivate=true,$fz),"java.util.Map,Class,Class");
1917 Clazz.defineMethod(c$,"size",
1918 function(){
1919 return this.m.size();
1920 });
1921 Clazz.defineMethod(c$,"isEmpty",
1922 function(){
1923 return this.m.isEmpty();
1924 });
1925 Clazz.defineMethod(c$,"containsKey",
1926 function(a){
1927 return this.m.containsKey(a);
1928 },"~O");
1929 Clazz.defineMethod(c$,"containsValue",
1930 function(a){
1931 return this.m.containsValue(a);
1932 },"~O");
1933 Clazz.defineMethod(c$,"get",
1934 function(a){
1935 return this.m.get(a);
1936 },"~O");
1937 Clazz.defineMethod(c$,"put",
1938 function(a,b){
1939 return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType));
1940 },"~O,~O");
1941 Clazz.defineMethod(c$,"remove",
1942 function(a){
1943 return this.m.remove(a);
1944 },"~O");
1945 Clazz.overrideMethod(c$,"putAll",
1946 function(a){
1947 var b=a.size();
1948 if(b==0){
1949 return;
1950 }var c=new Array(b);
1951 var d=a.entrySet().iterator();
1952 for(var e=0;e<b;e++){
1953 var f=d.next();
1954 java.util.Collections.checkType(f.getKey(),this.keyType);
1955 java.util.Collections.checkType(f.getValue(),this.valueType);
1956 c[e]=f;
1957 }
1958 for(var f=0;f<b;f++){
1959 this.m.put(c[f].getKey(),c[f].getValue());
1960 }
1961 },"java.util.Map");
1962 Clazz.defineMethod(c$,"clear",
1963 function(){
1964 this.m.clear();
1965 });
1966 Clazz.defineMethod(c$,"keySet",
1967 function(){
1968 return this.m.keySet();
1969 });
1970 Clazz.defineMethod(c$,"values",
1971 function(){
1972 return this.m.values();
1973 });
1974 Clazz.defineMethod(c$,"entrySet",
1975 function(){
1976 return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType);
1977 });
1978 Clazz.overrideMethod(c$,"equals",
1979 function(a){
1980 return this.m.equals(a);
1981 },"~O");
1982 Clazz.overrideMethod(c$,"hashcode",
1983 function(){
1984 return this.m.hashCode();
1985 });
1986 Clazz.defineMethod(c$,"toString",
1987 function(){
1988 return this.m.toString();
1989 });
1990 Clazz.pu$h(self.c$);
1991 c$=Clazz.decorateAsClass(function(){
1992 this.e=null;
1993 this.valueType=null;
1994 Clazz.instantialize(this,arguments);
1995 },java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);
1996 Clazz.makeConstructor(c$,
1997 function(a,b){
1998 if(a==null){
1999 throw new NullPointerException();
2000 }this.e=a;
2001 this.valueType=b;
2002 },"java.util.Map.Entry,Class");
2003 Clazz.defineMethod(c$,"getKey",
2004 function(){
2005 return this.e.getKey();
2006 });
2007 Clazz.defineMethod(c$,"getValue",
2008 function(){
2009 return this.e.getValue();
2010 });
2011 Clazz.defineMethod(c$,"setValue",
2012 function(a){
2013 return this.e.setValue(java.util.Collections.checkType(a,this.valueType));
2014 },"~O");
2015 Clazz.overrideMethod(c$,"equals",
2016 function(a){
2017 return this.e.equals(a);
2018 },"~O");
2019 Clazz.overrideMethod(c$,"hashcode",
2020 function(){
2021 return this.e.hashCode();
2022 });
2023 c$=Clazz.p0p();
2024 Clazz.pu$h(self.c$);
2025 c$=Clazz.decorateAsClass(function(){
2026 this.s=null;
2027 this.valueType=null;
2028 Clazz.instantialize(this,arguments);
2029 },java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
2030 Clazz.makeConstructor(c$,
2031 function(a,b){
2032 this.s=a;
2033 this.valueType=b;
2034 },"java.util.Set,Class");
2035 Clazz.defineMethod(c$,"iterator",
2036 function(){
2037 return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType);
2038 });
2039 Clazz.defineMethod(c$,"toArray",
2040 function(){
2041 var a=this.size();
2042 var b=new Array(a);
2043 var c=this.iterator();
2044 for(var d=0;d<a;d++){
2045 b[d]=c.next();
2046 }
2047 return b;
2048 });
2049 Clazz.defineMethod(c$,"toArray",
2050 function(a){
2051 var b=this.size();
2052 if(a.length<b){
2053 var c=a.getClass().getComponentType();
2054 a=java.lang.reflect.Array.newInstance(c,b);
2055 }var c=this.iterator();
2056 for(var d=0;d<b;d++){
2057 a[d]=c.next();
2058 }
2059 if(b<a.length){
2060 a[b]=null;
2061 }return a;
2062 },"~A");
2063 Clazz.defineMethod(c$,"retainAll",
2064 function(a){
2065 return this.s.retainAll(a);
2066 },"java.util.Collection");
2067 Clazz.defineMethod(c$,"removeAll",
2068 function(a){
2069 return this.s.removeAll(a);
2070 },"java.util.Collection");
2071 Clazz.defineMethod(c$,"containsAll",
2072 function(a){
2073 return this.s.containsAll(a);
2074 },"java.util.Collection");
2075 Clazz.overrideMethod(c$,"addAll",
2076 function(a){
2077 throw new UnsupportedOperationException();
2078 },"java.util.Collection");
2079 Clazz.defineMethod(c$,"remove",
2080 function(a){
2081 return this.s.remove(a);
2082 },"~O");
2083 Clazz.defineMethod(c$,"contains",
2084 function(a){
2085 return this.s.contains(a);
2086 },"~O");
2087 Clazz.overrideMethod(c$,"add",
2088 function(a){
2089 throw new UnsupportedOperationException();
2090 },"java.util.Map.Entry");
2091 Clazz.defineMethod(c$,"isEmpty",
2092 function(){
2093 return this.s.isEmpty();
2094 });
2095 Clazz.defineMethod(c$,"clear",
2096 function(){
2097 this.s.clear();
2098 });
2099 Clazz.defineMethod(c$,"size",
2100 function(){
2101 return this.s.size();
2102 });
2103 Clazz.overrideMethod(c$,"hashcode",
2104 function(){
2105 return this.s.hashCode();
2106 });
2107 Clazz.overrideMethod(c$,"equals",
2108 function(a){
2109 return this.s.equals(a);
2110 },"~O");
2111 Clazz.pu$h(self.c$);
2112 c$=Clazz.decorateAsClass(function(){
2113 this.i=null;
2114 this.valueType=null;
2115 Clazz.instantialize(this,arguments);
2116 },java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);
2117 Clazz.makeConstructor(c$,
2118 function(a,b){
2119 this.i=a;
2120 this.valueType=b;
2121 },"java.util.Iterator,Class");
2122 Clazz.defineMethod(c$,"hasNext",
2123 function(){
2124 return this.i.hasNext();
2125 });
2126 Clazz.defineMethod(c$,"remove",
2127 function(){
2128 this.i.remove();
2129 });
2130 Clazz.defineMethod(c$,"next",
2131 function(){
2132 return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType);
2133 });
2134 c$=Clazz.p0p();
2135 c$=Clazz.p0p();
2136 c$=Clazz.p0p();
2137 Clazz.pu$h(self.c$);
2138 c$=Clazz.decorateAsClass(function(){
2139 this.ss=null;
2140 Clazz.instantialize(this,arguments);
2141 },java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);
2142 Clazz.makeConstructor(c$,
2143 function(a,b){
2144 Clazz.superConstructor(this,java.util.Collections.CheckedSortedSet,[a,b]);
2145 this.ss=a;
2146 },"java.util.SortedSet,Class");
2147 Clazz.defineMethod(c$,"comparator",
2148 function(){
2149 return this.ss.comparator();
2150 });
2151 Clazz.defineMethod(c$,"subSet",
2152 function(a,b){
2153 return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type);
2154 },"~O,~O");
2155 Clazz.defineMethod(c$,"headSet",
2156 function(a){
2157 return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type);
2158 },"~O");
2159 Clazz.defineMethod(c$,"tailSet",
2160 function(a){
2161 return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type);
2162 },"~O");
2163 Clazz.defineMethod(c$,"first",
2164 function(){
2165 return this.ss.first();
2166 });
2167 Clazz.defineMethod(c$,"last",
2168 function(){
2169 return this.ss.last();
2170 });
2171 c$=Clazz.p0p();
2172 Clazz.pu$h(self.c$);
2173 c$=Clazz.decorateAsClass(function(){
2174 this.sm=null;
2175 Clazz.instantialize(this,arguments);
2176 },java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);
2177 Clazz.makeConstructor(c$,
2178 function(a,b,c){
2179 Clazz.superConstructor(this,java.util.Collections.CheckedSortedMap,[a,b,c]);
2180 this.sm=a;
2181 },"java.util.SortedMap,Class,Class");
2182 Clazz.defineMethod(c$,"comparator",
2183 function(){
2184 return this.sm.comparator();
2185 });
2186 Clazz.defineMethod(c$,"subMap",
2187 function(a,b){
2188 return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType);
2189 },"~O,~O");
2190 Clazz.defineMethod(c$,"headMap",
2191 function(a){
2192 return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType);
2193 },"~O");
2194 Clazz.defineMethod(c$,"tailMap",
2195 function(a){
2196 return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType);
2197 },"~O");
2198 Clazz.defineMethod(c$,"firstKey",
2199 function(){
2200 return this.sm.firstKey();
2201 });
2202 Clazz.defineMethod(c$,"lastKey",
2203 function(){
2204 return this.sm.lastKey();
2205 });
2206 c$=Clazz.p0p();
2207 c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList();
2208 c$.EMPTY_SET=c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet();
2209 c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap();
2210 });