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