KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > modules > sets > PyImmutableSet


1
2 package org.python.modules.sets;
3
4 import org.python.core.Py;
5 import org.python.core.PyObject;
6 import org.python.core.PyType;
7 import org.python.core.PyBuiltinFunctionNarrow;
8 import org.python.core.PyBuiltinFunction;
9 import org.python.core.PyMethodDescr;
10 import org.python.core.PyString;
11 import org.python.core.PyBuiltinFunctionWide;
12 import org.python.core.PyNewWrapper;
13
14 import java.util.Collection JavaDoc;
15
16 public class PyImmutableSet extends BaseSet {
17
18     /* type info */
19
20     public static final String JavaDoc exposed_name="ImmutableSet";
21
22     public static final Class JavaDoc exposed_base=PyObject.class;
23
24     public static void typeSetup(PyObject dict,PyType.Newstyle marker) {
25         class exposed___ne__ extends PyBuiltinFunctionNarrow {
26
27             private PyImmutableSet self;
28
29             public PyObject getSelf() {
30                 return self;
31             }
32
33             exposed___ne__(PyImmutableSet self,PyBuiltinFunction.Info info) {
34                 super(info);
35                 this.self=self;
36             }
37
38             public PyBuiltinFunction makeBound(PyObject self) {
39                 return new exposed___ne__((PyImmutableSet)self,info);
40             }
41
42             public PyObject __call__(PyObject arg0) {
43                 PyObject ret=self.baseset___ne__(arg0);
44                 if (ret==null)
45                     return Py.NotImplemented;
46                 return ret;
47             }
48
49             public PyObject inst_call(PyObject gself,PyObject arg0) {
50                 PyImmutableSet self=(PyImmutableSet)gself;
51                 PyObject ret=self.baseset___ne__(arg0);
52                 if (ret==null)
53                     return Py.NotImplemented;
54                 return ret;
55             }
56
57         }
58         dict.__setitem__("__ne__",new PyMethodDescr("__ne__",PyImmutableSet.class,1,1,new exposed___ne__(null,null)));
59         class exposed___eq__ extends PyBuiltinFunctionNarrow {
60
61             private PyImmutableSet self;
62
63             public PyObject getSelf() {
64                 return self;
65             }
66
67             exposed___eq__(PyImmutableSet self,PyBuiltinFunction.Info info) {
68                 super(info);
69                 this.self=self;
70             }
71
72             public PyBuiltinFunction makeBound(PyObject self) {
73                 return new exposed___eq__((PyImmutableSet)self,info);
74             }
75
76             public PyObject __call__(PyObject arg0) {
77                 PyObject ret=self.baseset___eq__(arg0);
78                 if (ret==null)
79                     return Py.NotImplemented;
80                 return ret;
81             }
82
83             public PyObject inst_call(PyObject gself,PyObject arg0) {
84                 PyImmutableSet self=(PyImmutableSet)gself;
85                 PyObject ret=self.baseset___eq__(arg0);
86                 if (ret==null)
87                     return Py.NotImplemented;
88                 return ret;
89             }
90
91         }
92         dict.__setitem__("__eq__",new PyMethodDescr("__eq__",PyImmutableSet.class,1,1,new exposed___eq__(null,null)));
93         class exposed___or__ extends PyBuiltinFunctionNarrow {
94
95             private PyImmutableSet self;
96
97             public PyObject getSelf() {
98                 return self;
99             }
100
101             exposed___or__(PyImmutableSet self,PyBuiltinFunction.Info info) {
102                 super(info);
103                 this.self=self;
104             }
105
106             public PyBuiltinFunction makeBound(PyObject self) {
107                 return new exposed___or__((PyImmutableSet)self,info);
108             }
109
110             public PyObject __call__(PyObject arg0) {
111                 PyObject ret=self.baseset___or__(arg0);
112                 if (ret==null)
113                     return Py.NotImplemented;
114                 return ret;
115             }
116
117             public PyObject inst_call(PyObject gself,PyObject arg0) {
118                 PyImmutableSet self=(PyImmutableSet)gself;
119                 PyObject ret=self.baseset___or__(arg0);
120                 if (ret==null)
121                     return Py.NotImplemented;
122                 return ret;
123             }
124
125         }
126         dict.__setitem__("__or__",new PyMethodDescr("__or__",PyImmutableSet.class,1,1,new exposed___or__(null,null)));
127         class exposed___xor__ extends PyBuiltinFunctionNarrow {
128
129             private PyImmutableSet self;
130
131             public PyObject getSelf() {
132                 return self;
133             }
134
135             exposed___xor__(PyImmutableSet self,PyBuiltinFunction.Info info) {
136                 super(info);
137                 this.self=self;
138             }
139
140             public PyBuiltinFunction makeBound(PyObject self) {
141                 return new exposed___xor__((PyImmutableSet)self,info);
142             }
143
144             public PyObject __call__(PyObject arg0) {
145                 PyObject ret=self.baseset___xor__(arg0);
146                 if (ret==null)
147                     return Py.NotImplemented;
148                 return ret;
149             }
150
151             public PyObject inst_call(PyObject gself,PyObject arg0) {
152                 PyImmutableSet self=(PyImmutableSet)gself;
153                 PyObject ret=self.baseset___xor__(arg0);
154                 if (ret==null)
155                     return Py.NotImplemented;
156                 return ret;
157             }
158
159         }
160         dict.__setitem__("__xor__",new PyMethodDescr("__xor__",PyImmutableSet.class,1,1,new exposed___xor__(null,null)));
161         class exposed___sub__ extends PyBuiltinFunctionNarrow {
162
163             private PyImmutableSet self;
164
165             public PyObject getSelf() {
166                 return self;
167             }
168
169             exposed___sub__(PyImmutableSet self,PyBuiltinFunction.Info info) {
170                 super(info);
171                 this.self=self;
172             }
173
174             public PyBuiltinFunction makeBound(PyObject self) {
175                 return new exposed___sub__((PyImmutableSet)self,info);
176             }
177
178             public PyObject __call__(PyObject arg0) {
179                 PyObject ret=self.baseset___sub__(arg0);
180                 if (ret==null)
181                     return Py.NotImplemented;
182                 return ret;
183             }
184
185             public PyObject inst_call(PyObject gself,PyObject arg0) {
186                 PyImmutableSet self=(PyImmutableSet)gself;
187                 PyObject ret=self.baseset___sub__(arg0);
188                 if (ret==null)
189                     return Py.NotImplemented;
190                 return ret;
191             }
192
193         }
194         dict.__setitem__("__sub__",new PyMethodDescr("__sub__",PyImmutableSet.class,1,1,new exposed___sub__(null,null)));
195         class exposed___and__ extends PyBuiltinFunctionNarrow {
196
197             private PyImmutableSet self;
198
199             public PyObject getSelf() {
200                 return self;
201             }
202
203             exposed___and__(PyImmutableSet self,PyBuiltinFunction.Info info) {
204                 super(info);
205                 this.self=self;
206             }
207
208             public PyBuiltinFunction makeBound(PyObject self) {
209                 return new exposed___and__((PyImmutableSet)self,info);
210             }
211
212             public PyObject __call__(PyObject arg0) {
213                 PyObject ret=self.baseset___and__(arg0);
214                 if (ret==null)
215                     return Py.NotImplemented;
216                 return ret;
217             }
218
219             public PyObject inst_call(PyObject gself,PyObject arg0) {
220                 PyImmutableSet self=(PyImmutableSet)gself;
221                 PyObject ret=self.baseset___and__(arg0);
222                 if (ret==null)
223                     return Py.NotImplemented;
224                 return ret;
225             }
226
227         }
228         dict.__setitem__("__and__",new PyMethodDescr("__and__",PyImmutableSet.class,1,1,new exposed___and__(null,null)));
229         class exposed___gt__ extends PyBuiltinFunctionNarrow {
230
231             private PyImmutableSet self;
232
233             public PyObject getSelf() {
234                 return self;
235             }
236
237             exposed___gt__(PyImmutableSet self,PyBuiltinFunction.Info info) {
238                 super(info);
239                 this.self=self;
240             }
241
242             public PyBuiltinFunction makeBound(PyObject self) {
243                 return new exposed___gt__((PyImmutableSet)self,info);
244             }
245
246             public PyObject __call__(PyObject arg0) {
247                 PyObject ret=self.baseset___gt__(arg0);
248                 if (ret==null)
249                     return Py.NotImplemented;
250                 return ret;
251             }
252
253             public PyObject inst_call(PyObject gself,PyObject arg0) {
254                 PyImmutableSet self=(PyImmutableSet)gself;
255                 PyObject ret=self.baseset___gt__(arg0);
256                 if (ret==null)
257                     return Py.NotImplemented;
258                 return ret;
259             }
260
261         }
262         dict.__setitem__("__gt__",new PyMethodDescr("__gt__",PyImmutableSet.class,1,1,new exposed___gt__(null,null)));
263         class exposed___ge__ extends PyBuiltinFunctionNarrow {
264
265             private PyImmutableSet self;
266
267             public PyObject getSelf() {
268                 return self;
269             }
270
271             exposed___ge__(PyImmutableSet self,PyBuiltinFunction.Info info) {
272                 super(info);
273                 this.self=self;
274             }
275
276             public PyBuiltinFunction makeBound(PyObject self) {
277                 return new exposed___ge__((PyImmutableSet)self,info);
278             }
279
280             public PyObject __call__(PyObject arg0) {
281                 PyObject ret=self.baseset___ge__(arg0);
282                 if (ret==null)
283                     return Py.NotImplemented;
284                 return ret;
285             }
286
287             public PyObject inst_call(PyObject gself,PyObject arg0) {
288                 PyImmutableSet self=(PyImmutableSet)gself;
289                 PyObject ret=self.baseset___ge__(arg0);
290                 if (ret==null)
291                     return Py.NotImplemented;
292                 return ret;
293             }
294
295         }
296         dict.__setitem__("__ge__",new PyMethodDescr("__ge__",PyImmutableSet.class,1,1,new exposed___ge__(null,null)));
297         class exposed___le__ extends PyBuiltinFunctionNarrow {
298
299             private PyImmutableSet self;
300
301             public PyObject getSelf() {
302                 return self;
303             }
304
305             exposed___le__(PyImmutableSet self,PyBuiltinFunction.Info info) {
306                 super(info);
307                 this.self=self;
308             }
309
310             public PyBuiltinFunction makeBound(PyObject self) {
311                 return new exposed___le__((PyImmutableSet)self,info);
312             }
313
314             public PyObject __call__(PyObject arg0) {
315                 PyObject ret=self.baseset___le__(arg0);
316                 if (ret==null)
317                     return Py.NotImplemented;
318                 return ret;
319             }
320
321             public PyObject inst_call(PyObject gself,PyObject arg0) {
322                 PyImmutableSet self=(PyImmutableSet)gself;
323                 PyObject ret=self.baseset___le__(arg0);
324                 if (ret==null)
325                     return Py.NotImplemented;
326                 return ret;
327             }
328
329         }
330         dict.__setitem__("__le__",new PyMethodDescr("__le__",PyImmutableSet.class,1,1,new exposed___le__(null,null)));
331         class exposed___lt__ extends PyBuiltinFunctionNarrow {
332
333             private PyImmutableSet self;
334
335             public PyObject getSelf() {
336                 return self;
337             }
338
339             exposed___lt__(PyImmutableSet self,PyBuiltinFunction.Info info) {
340                 super(info);
341                 this.self=self;
342             }
343
344             public PyBuiltinFunction makeBound(PyObject self) {
345                 return new exposed___lt__((PyImmutableSet)self,info);
346             }
347
348             public PyObject __call__(PyObject arg0) {
349                 PyObject ret=self.baseset___lt__(arg0);
350                 if (ret==null)
351                     return Py.NotImplemented;
352                 return ret;
353             }
354
355             public PyObject inst_call(PyObject gself,PyObject arg0) {
356                 PyImmutableSet self=(PyImmutableSet)gself;
357                 PyObject ret=self.baseset___lt__(arg0);
358                 if (ret==null)
359                     return Py.NotImplemented;
360                 return ret;
361             }
362
363         }
364         dict.__setitem__("__lt__",new PyMethodDescr("__lt__",PyImmutableSet.class,1,1,new exposed___lt__(null,null)));
365         class exposed___contains__ extends PyBuiltinFunctionNarrow {
366
367             private PyImmutableSet self;
368
369             public PyObject getSelf() {
370                 return self;
371             }
372
373             exposed___contains__(PyImmutableSet self,PyBuiltinFunction.Info info) {
374                 super(info);
375                 this.self=self;
376             }
377
378             public PyBuiltinFunction makeBound(PyObject self) {
379                 return new exposed___contains__((PyImmutableSet)self,info);
380             }
381
382             public PyObject __call__(PyObject arg0) {
383                 return Py.newBoolean(self.baseset___contains__(arg0));
384             }
385
386             public PyObject inst_call(PyObject gself,PyObject arg0) {
387                 PyImmutableSet self=(PyImmutableSet)gself;
388                 return Py.newBoolean(self.baseset___contains__(arg0));
389             }
390
391         }
392         dict.__setitem__("__contains__",new PyMethodDescr("__contains__",PyImmutableSet.class,1,1,new exposed___contains__(null,null)));
393         class exposed___deepcopy__ extends PyBuiltinFunctionNarrow {
394
395             private PyImmutableSet self;
396
397             public PyObject getSelf() {
398                 return self;
399             }
400
401             exposed___deepcopy__(PyImmutableSet self,PyBuiltinFunction.Info info) {
402                 super(info);
403                 this.self=self;
404             }
405
406             public PyBuiltinFunction makeBound(PyObject self) {
407                 return new exposed___deepcopy__((PyImmutableSet)self,info);
408             }
409
410             public PyObject __call__(PyObject arg0) {
411                 return self.baseset___deepcopy__(arg0);
412             }
413
414             public PyObject inst_call(PyObject gself,PyObject arg0) {
415                 PyImmutableSet self=(PyImmutableSet)gself;
416                 return self.baseset___deepcopy__(arg0);
417             }
418
419         }
420         dict.__setitem__("__deepcopy__",new PyMethodDescr("__deepcopy__",PyImmutableSet.class,1,1,new exposed___deepcopy__(null,null)));
421         class exposed___nonzero__ extends PyBuiltinFunctionNarrow {
422
423             private PyImmutableSet self;
424
425             public PyObject getSelf() {
426                 return self;
427             }
428
429             exposed___nonzero__(PyImmutableSet self,PyBuiltinFunction.Info info) {
430                 super(info);
431                 this.self=self;
432             }
433
434             public PyBuiltinFunction makeBound(PyObject self) {
435                 return new exposed___nonzero__((PyImmutableSet)self,info);
436             }
437
438             public PyObject __call__() {
439                 return Py.newBoolean(self.baseset___nonzero__());
440             }
441
442             public PyObject inst_call(PyObject gself) {
443                 PyImmutableSet self=(PyImmutableSet)gself;
444                 return Py.newBoolean(self.baseset___nonzero__());
445             }
446
447         }
448         dict.__setitem__("__nonzero__",new PyMethodDescr("__nonzero__",PyImmutableSet.class,0,0,new exposed___nonzero__(null,null)));
449         class exposed_copy extends PyBuiltinFunctionNarrow {
450
451             private PyImmutableSet self;
452
453             public PyObject getSelf() {
454                 return self;
455             }
456
457             exposed_copy(PyImmutableSet self,PyBuiltinFunction.Info info) {
458                 super(info);
459                 this.self=self;
460             }
461
462             public PyBuiltinFunction makeBound(PyObject self) {
463                 return new exposed_copy((PyImmutableSet)self,info);
464             }
465
466             public PyObject __call__() {
467                 return self.baseset_copy();
468             }
469
470             public PyObject inst_call(PyObject gself) {
471                 PyImmutableSet self=(PyImmutableSet)gself;
472                 return self.baseset_copy();
473             }
474
475         }
476         dict.__setitem__("copy",new PyMethodDescr("copy",PyImmutableSet.class,0,0,new exposed_copy(null,null)));
477         class exposed_union extends PyBuiltinFunctionNarrow {
478
479             private PyImmutableSet self;
480
481             public PyObject getSelf() {
482                 return self;
483             }
484
485             exposed_union(PyImmutableSet self,PyBuiltinFunction.Info info) {
486                 super(info);
487                 this.self=self;
488             }
489
490             public PyBuiltinFunction makeBound(PyObject self) {
491                 return new exposed_union((PyImmutableSet)self,info);
492             }
493
494             public PyObject __call__(PyObject arg0) {
495                 return self.baseset_union(arg0);
496             }
497
498             public PyObject inst_call(PyObject gself,PyObject arg0) {
499                 PyImmutableSet self=(PyImmutableSet)gself;
500                 return self.baseset_union(arg0);
501             }
502
503         }
504         dict.__setitem__("union",new PyMethodDescr("union",PyImmutableSet.class,1,1,new exposed_union(null,null)));
505         class exposed_difference extends PyBuiltinFunctionNarrow {
506
507             private PyImmutableSet self;
508
509             public PyObject getSelf() {
510                 return self;
511             }
512
513             exposed_difference(PyImmutableSet self,PyBuiltinFunction.Info info) {
514                 super(info);
515                 this.self=self;
516             }
517
518             public PyBuiltinFunction makeBound(PyObject self) {
519                 return new exposed_difference((PyImmutableSet)self,info);
520             }
521
522             public PyObject __call__(PyObject arg0) {
523                 return self.baseset_difference(arg0);
524             }
525
526             public PyObject inst_call(PyObject gself,PyObject arg0) {
527                 PyImmutableSet self=(PyImmutableSet)gself;
528                 return self.baseset_difference(arg0);
529             }
530
531         }
532         dict.__setitem__("difference",new PyMethodDescr("difference",PyImmutableSet.class,1,1,new exposed_difference(null,null)));
533         class exposed_symmetric_difference extends PyBuiltinFunctionNarrow {
534
535             private PyImmutableSet self;
536
537             public PyObject getSelf() {
538                 return self;
539             }
540
541             exposed_symmetric_difference(PyImmutableSet self,PyBuiltinFunction.Info info) {
542                 super(info);
543                 this.self=self;
544             }
545
546             public PyBuiltinFunction makeBound(PyObject self) {
547                 return new exposed_symmetric_difference((PyImmutableSet)self,info);
548             }
549
550             public PyObject __call__(PyObject arg0) {
551                 return self.baseset_symmetric_difference(arg0);
552             }
553
554             public PyObject inst_call(PyObject gself,PyObject arg0) {
555                 PyImmutableSet self=(PyImmutableSet)gself;
556                 return self.baseset_symmetric_difference(arg0);
557             }
558
559         }
560         dict.__setitem__("symmetric_difference",new PyMethodDescr("symmetric_difference",PyImmutableSet.class,1,1,new exposed_symmetric_difference(null,null)));
561         class exposed_intersection extends PyBuiltinFunctionNarrow {
562
563             private PyImmutableSet self;
564
565             public PyObject getSelf() {
566                 return self;
567             }
568
569             exposed_intersection(PyImmutableSet self,PyBuiltinFunction.Info info) {
570                 super(info);
571                 this.self=self;
572             }
573
574             public PyBuiltinFunction makeBound(PyObject self) {
575                 return new exposed_intersection((PyImmutableSet)self,info);
576             }
577
578             public PyObject __call__(PyObject arg0) {
579                 return self.baseset_intersection(arg0);
580             }
581
582             public PyObject inst_call(PyObject gself,PyObject arg0) {
583                 PyImmutableSet self=(PyImmutableSet)gself;
584                 return self.baseset_intersection(arg0);
585             }
586
587         }
588         dict.__setitem__("intersection",new PyMethodDescr("intersection",PyImmutableSet.class,1,1,new exposed_intersection(null,null)));
589         class exposed_issubset extends PyBuiltinFunctionNarrow {
590
591             private PyImmutableSet self;
592
593             public PyObject getSelf() {
594                 return self;
595             }
596
597             exposed_issubset(PyImmutableSet self,PyBuiltinFunction.Info info) {
598                 super(info);
599                 this.self=self;
600             }
601
602             public PyBuiltinFunction makeBound(PyObject self) {
603                 return new exposed_issubset((PyImmutableSet)self,info);
604             }
605
606             public PyObject __call__(PyObject arg0) {
607                 return self.baseset_issubset(arg0);
608             }
609
610             public PyObject inst_call(PyObject gself,PyObject arg0) {
611                 PyImmutableSet self=(PyImmutableSet)gself;
612                 return self.baseset_issubset(arg0);
613             }
614
615         }
616         dict.__setitem__("issubset",new PyMethodDescr("issubset",PyImmutableSet.class,1,1,new exposed_issubset(null,null)));
617         class exposed_issuperset extends PyBuiltinFunctionNarrow {
618
619             private PyImmutableSet self;
620
621             public PyObject getSelf() {
622                 return self;
623             }
624
625             exposed_issuperset(PyImmutableSet self,PyBuiltinFunction.Info info) {
626                 super(info);
627                 this.self=self;
628             }
629
630             public PyBuiltinFunction makeBound(PyObject self) {
631                 return new exposed_issuperset((PyImmutableSet)self,info);
632             }
633
634             public PyObject __call__(PyObject arg0) {
635                 return self.baseset_issuperset(arg0);
636             }
637
638             public PyObject inst_call(PyObject gself,PyObject arg0) {
639                 PyImmutableSet self=(PyImmutableSet)gself;
640                 return self.baseset_issuperset(arg0);
641             }
642
643         }
644         dict.__setitem__("issuperset",new PyMethodDescr("issuperset",PyImmutableSet.class,1,1,new exposed_issuperset(null,null)));
645         class exposed___len__ extends PyBuiltinFunctionNarrow {
646
647             private PyImmutableSet self;
648
649             public PyObject getSelf() {
650                 return self;
651             }
652
653             exposed___len__(PyImmutableSet self,PyBuiltinFunction.Info info) {
654                 super(info);
655                 this.self=self;
656             }
657
658             public PyBuiltinFunction makeBound(PyObject self) {
659                 return new exposed___len__((PyImmutableSet)self,info);
660             }
661
662             public PyObject __call__() {
663                 return Py.newInteger(self.baseset___len__());
664             }
665
666             public PyObject inst_call(PyObject gself) {
667                 PyImmutableSet self=(PyImmutableSet)gself;
668                 return Py.newInteger(self.baseset___len__());
669             }
670
671         }
672         dict.__setitem__("__len__",new PyMethodDescr("__len__",PyImmutableSet.class,0,0,new exposed___len__(null,null)));
673         class exposed___hash__ extends PyBuiltinFunctionNarrow {
674
675             private PyImmutableSet self;
676
677             public PyObject getSelf() {
678                 return self;
679             }
680
681             exposed___hash__(PyImmutableSet self,PyBuiltinFunction.Info info) {
682                 super(info);
683                 this.self=self;
684             }
685
686             public PyBuiltinFunction makeBound(PyObject self) {
687                 return new exposed___hash__((PyImmutableSet)self,info);
688             }
689
690             public PyObject __call__() {
691                 return Py.newInteger(self.immutableset_hashCode());
692             }
693
694             public PyObject inst_call(PyObject gself) {
695                 PyImmutableSet self=(PyImmutableSet)gself;
696                 return Py.newInteger(self.immutableset_hashCode());
697             }
698
699         }
700         dict.__setitem__("__hash__",new PyMethodDescr("__hash__",PyImmutableSet.class,0,0,new exposed___hash__(null,null)));
701         class exposed___repr__ extends PyBuiltinFunctionNarrow {
702
703             private PyImmutableSet self;
704
705             public PyObject getSelf() {
706                 return self;
707             }
708
709             exposed___repr__(PyImmutableSet self,PyBuiltinFunction.Info info) {
710                 super(info);
711                 this.self=self;
712             }
713
714             public PyBuiltinFunction makeBound(PyObject self) {
715                 return new exposed___repr__((PyImmutableSet)self,info);
716             }
717
718             public PyObject __call__() {
719                 return new PyString(self.baseset_toString());
720             }
721
722             public PyObject inst_call(PyObject gself) {
723                 PyImmutableSet self=(PyImmutableSet)gself;
724                 return new PyString(self.baseset_toString());
725             }
726
727         }
728         dict.__setitem__("__repr__",new PyMethodDescr("__repr__",PyImmutableSet.class,0,0,new exposed___repr__(null,null)));
729         class exposed___init__ extends PyBuiltinFunctionWide {
730
731             private PyImmutableSet self;
732
733             public PyObject getSelf() {
734                 return self;
735             }
736
737             exposed___init__(PyImmutableSet self,PyBuiltinFunction.Info info) {
738                 super(info);
739                 this.self=self;
740             }
741
742             public PyBuiltinFunction makeBound(PyObject self) {
743                 return new exposed___init__((PyImmutableSet)self,info);
744             }
745
746             public PyObject inst_call(PyObject self,PyObject[]args) {
747                 return inst_call(self,args,Py.NoKeywords);
748             }
749
750             public PyObject __call__(PyObject[]args) {
751                 return __call__(args,Py.NoKeywords);
752             }
753
754             public PyObject __call__(PyObject[]args,String JavaDoc[]keywords) {
755                 self.immutableset_init(args,keywords);
756                 return Py.None;
757             }
758
759             public PyObject inst_call(PyObject gself,PyObject[]args,String JavaDoc[]keywords) {
760                 PyImmutableSet self=(PyImmutableSet)gself;
761                 self.immutableset_init(args,keywords);
762                 return Py.None;
763             }
764
765         }
766         dict.__setitem__("__init__",new PyMethodDescr("__init__",PyImmutableSet.class,-1,-1,new exposed___init__(null,null)));
767         dict.__setitem__("__new__",new PyNewWrapper(PyImmutableSet.class,"__new__",-1,-1) {
768
769           public PyObject new_impl(boolean init,PyType subtype,PyObject[]args,String JavaDoc[]keywords) {
770               PyImmutableSet newobj;
771               if (for_type==subtype) {
772                   newobj=new PyImmutableSet();
773                   if (init)
774                       newobj.immutableset_init(args,keywords);
775               } else {
776                   //newobj=new PyImmutableSetDerived(subtype);
777
return Py.NotImplemented;
778               }
779               return newobj;
780           }
781
782       });
783     }
784
785     public PyImmutableSet() {
786         super();
787     }
788
789     public PyImmutableSet(PyType type) {
790         super(type);
791     }
792
793     public PyImmutableSet(PyObject data) {
794         super(data);
795     }
796
797     final void immutableset_init(PyObject[] args, String JavaDoc[] kwds) {
798         int nargs = args.length - kwds.length;
799         if (nargs > 1) {
800             throw PyBuiltinFunction.DefaultInfo.unexpectedCall(nargs, false, exposed_name, 0, 1);
801         }
802         if (nargs == 0) {
803             return;
804         }
805
806         PyObject o = args[0];
807         _update(o);
808     }
809
810     final int immutableset_hashCode() {
811         return hashCode();
812     }
813
814     public int hashCode() {
815         return this._set.hashCode();
816     }
817
818     public PyObject _as_immutable() {
819         return this;
820     }
821
822 // public void clear() {
823
// throw new UnsupportedOperationException();
824
// }
825
//
826
// public boolean add(Object o) {
827
// throw new UnsupportedOperationException();
828
// }
829
//
830
// public boolean remove(Object o) {
831
// throw new UnsupportedOperationException();
832
// }
833
//
834
// public boolean addAll(Collection c) {
835
// throw new UnsupportedOperationException();
836
// }
837
//
838
// public boolean removeAll(Collection c) {
839
// throw new UnsupportedOperationException();
840
// }
841
//
842
// public boolean retainAll(Collection c) {
843
// throw new UnsupportedOperationException();
844
// }
845
}
846
Popular Tags