java-api 17.25.0__py2-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. java/__init__.py +0 -0
  2. java/awt/__init__.py +265 -0
  3. java/awt/event/__init__.py +184 -0
  4. java/awt/geom/__init__.py +116 -0
  5. java/awt/image/__init__.py +14 -0
  6. java/awt/print/__init__.py +93 -0
  7. java/beans/__init__.py +38 -0
  8. java/io/__init__.py +442 -0
  9. java/lang/__init__.py +868 -0
  10. java/lang/reflect/__init__.py +9 -0
  11. java/math/__init__.py +93 -0
  12. java/net/__init__.py +504 -0
  13. java/net/http/__init__.py +15 -0
  14. java/nio/__init__.py +667 -0
  15. java/nio/channels/__init__.py +352 -0
  16. java/nio/charset/__init__.py +146 -0
  17. java/nio/file/__init__.py +728 -0
  18. java/nio/file/attribute/__init__.py +141 -0
  19. java/org/__init__.py +0 -0
  20. java/org/jdesktop/__init__.py +0 -0
  21. java/org/jdesktop/core/__init__.py +0 -0
  22. java/org/jdesktop/core/animation/__init__.py +0 -0
  23. java/org/jdesktop/core/animation/timing/__init__.py +17 -0
  24. java/security/__init__.py +27 -0
  25. java/text/__init__.py +543 -0
  26. java/time/__init__.py +575 -0
  27. java/time/chrono/__init__.py +319 -0
  28. java/time/format/__init__.py +72 -0
  29. java/time/temporal/__init__.py +353 -0
  30. java/util/__init__.py +1479 -0
  31. java/util/concurrent/__init__.py +147 -0
  32. java/util/function/__init__.py +131 -0
  33. java/util/regex/__init__.py +197 -0
  34. java/util/stream/__init__.py +128 -0
  35. java_api-17.25.0.dist-info/LICENSE +21 -0
  36. java_api-17.25.0.dist-info/METADATA +150 -0
  37. java_api-17.25.0.dist-info/RECORD +46 -0
  38. java_api-17.25.0.dist-info/WHEEL +5 -0
  39. java_api-17.25.0.dist-info/top_level.txt +2 -0
  40. javax/__init__.py +0 -0
  41. javax/security/__init__.py +0 -0
  42. javax/security/auth/__init__.py +14 -0
  43. javax/swing/__init__.py +483 -0
  44. javax/swing/event/__init__.py +43 -0
  45. javax/swing/plaf/__init__.py +28 -0
  46. javax/swing/text/__init__.py +19 -0
java/lang/__init__.py ADDED
@@ -0,0 +1,868 @@
1
+ """Provides classes that are fundamental to the design of the Java
2
+ programming language.
3
+ """
4
+
5
+ from __future__ import print_function
6
+
7
+ __all__ = [
8
+ "Appendable",
9
+ "ArrayIndexOutOfBoundsException",
10
+ "AutoCloseable",
11
+ "CharSequence",
12
+ "Class",
13
+ "ClassCastException",
14
+ "Comparable",
15
+ "Enum",
16
+ "Exception",
17
+ "IllegalArgumentException",
18
+ "IllegalStateException",
19
+ "IndexOutOfBoundsException",
20
+ "Iterable",
21
+ "NullPointerException",
22
+ "Number",
23
+ "Object",
24
+ "Readable",
25
+ "Runnable",
26
+ "RuntimeException",
27
+ "StackTraceElement",
28
+ "String",
29
+ "StringBuffer",
30
+ "StringBuilder",
31
+ "Thread",
32
+ "Throwable",
33
+ "UnsupportedOperationException",
34
+ ]
35
+
36
+ import __builtin__ as builtins
37
+ import array
38
+ import time
39
+ from typing import TYPE_CHECKING, Any, List, Optional, Union
40
+
41
+ from java.lang.reflect import Type
42
+
43
+ if TYPE_CHECKING:
44
+ from java.nio import CharBuffer
45
+ from java.util import Iterator, Spliterator
46
+ from java.util.function import Consumer
47
+
48
+
49
+ class Object(object):
50
+ """Class Object is the root of the class hierarchy.
51
+
52
+ Every class has Object as a superclass. All objects, including
53
+ arrays, implement the methods of this class.
54
+ """
55
+
56
+ def __init__(self):
57
+ # type: () -> None
58
+ super(Object, self).__init__()
59
+
60
+ def __cmp__(self, other):
61
+ # type: (Object) -> bool
62
+ return True
63
+
64
+ def equals(self, obj):
65
+ # type: (Object) -> bool
66
+ return True
67
+
68
+ def getClass(self):
69
+ # type: () -> Class
70
+ pass
71
+
72
+ def hashCode(self):
73
+ # type: () -> int
74
+ return hash(self)
75
+
76
+ def notify(self):
77
+ # type: () -> None
78
+ pass
79
+
80
+ def notifyAll(self):
81
+ # type: () -> None
82
+ pass
83
+
84
+ def toString(self):
85
+ # type: () -> Union[str, unicode]
86
+ return repr(self)
87
+
88
+ def wait(self, timeoutMillis=0, nanos=0):
89
+ # type: (long, int) -> None
90
+ pass
91
+
92
+ def __lt__(self, other):
93
+ # type: (Object) -> bool
94
+ return True
95
+
96
+ def __gt__(self, other):
97
+ # type: (Object) -> bool
98
+ return True
99
+
100
+ def __ge__(self, other):
101
+ # type: (Object) -> bool
102
+ return True
103
+
104
+
105
+ class Appendable(object):
106
+ def append(self, c_csq, start=0, end=-1):
107
+ # type: (Union[CharSequence, str], int, int) -> Appendable
108
+ raise NotImplementedError
109
+
110
+
111
+ class AutoCloseable(object):
112
+ def close(self):
113
+ # type: () -> None
114
+ raise NotImplementedError
115
+
116
+
117
+ class CharSequence(object):
118
+ def charAt(self, index):
119
+ # type: (int) -> str
120
+ raise NotImplementedError
121
+
122
+ def chars(self): # type: ignore[no-untyped-def]
123
+ pass
124
+
125
+ def codePoints(self): # type: ignore[no-untyped-def]
126
+ pass
127
+
128
+ @staticmethod
129
+ def compare(cs1, cs2):
130
+ # type: (CharSequence, CharSequence) -> int
131
+ pass
132
+
133
+ def length(self):
134
+ # type: () -> int
135
+ raise NotImplementedError
136
+
137
+ def subSequence(self, start, end):
138
+ # type: (int, int) -> CharSequence
139
+ raise NotImplementedError
140
+
141
+ def toString(self):
142
+ # type: () -> Union[str, unicode]
143
+ raise NotImplementedError
144
+
145
+
146
+ class Comparable(object):
147
+ def compareTo(self, o):
148
+ # type: (Any) -> int
149
+ raise NotImplementedError
150
+
151
+
152
+ class Iterable(object):
153
+ def forEach(self, action):
154
+ # type: (Consumer) -> None
155
+ pass
156
+
157
+ def iterator(self):
158
+ # type: () -> Iterator
159
+ pass
160
+
161
+ def spliterator(self):
162
+ # type: () -> Spliterator
163
+ pass
164
+
165
+
166
+ class Readable(object):
167
+ def read(self, cb):
168
+ # type: (CharBuffer) -> int
169
+ raise NotImplementedError
170
+
171
+
172
+ class Runnable(object):
173
+ def run(self):
174
+ # type: () -> None
175
+ raise NotImplementedError
176
+
177
+
178
+ class Class(Object, Type):
179
+ def asSubClass(self, clazz):
180
+ # type: (Class) -> Any
181
+ pass
182
+
183
+ def cast(self, obj):
184
+ # type: (Object) -> Any
185
+ pass
186
+
187
+ def getTypeName(self):
188
+ # type: () -> Union[str, unicode]
189
+ pass
190
+
191
+
192
+ class Enum(Object):
193
+ def compareTo(self, o):
194
+ # type: (Enum) -> int
195
+ pass
196
+
197
+ def getDeclaringClass(self):
198
+ # type: () -> Class
199
+ pass
200
+
201
+ def name(self):
202
+ # type: () -> Union[str, unicode]
203
+ pass
204
+
205
+ def ordinal(self):
206
+ # type: () -> int
207
+ pass
208
+
209
+ @staticmethod
210
+ def valueOf(enumType, name):
211
+ # type: (Class, Union[str, unicode]) -> Enum
212
+ pass
213
+
214
+
215
+ class Number(Object):
216
+ def byteValue(self):
217
+ # type: () -> int
218
+ pass
219
+
220
+ def doubleValue(self):
221
+ # type: () -> float
222
+ raise NotImplementedError
223
+
224
+ def floatValue(self):
225
+ # type: () -> float
226
+ raise NotImplementedError
227
+
228
+ def intValue(self):
229
+ # type: () -> int
230
+ raise NotImplementedError
231
+
232
+ def longValue(self):
233
+ # type: () -> long
234
+ raise NotImplementedError
235
+
236
+ def shortValue(self):
237
+ # type: () -> int
238
+ pass
239
+
240
+
241
+ class StackTraceElement(Object):
242
+ def __init__(self, *args):
243
+ # type: (*Any) -> None
244
+ super(StackTraceElement, self).__init__()
245
+ print(args)
246
+
247
+ def getClassLoaderName(self):
248
+ # type: () -> str
249
+ pass
250
+
251
+ def getClassName(self):
252
+ # type: () -> str
253
+ pass
254
+
255
+ def getFileName(self):
256
+ # type: () -> str
257
+ pass
258
+
259
+ def getLineNumber(self):
260
+ # type: () -> int
261
+ pass
262
+
263
+ def getMethodName(self):
264
+ # type: () -> str
265
+ pass
266
+
267
+ def getModuleName(self):
268
+ # type: () -> str
269
+ pass
270
+
271
+ def getModuleVersion(self):
272
+ # type: () -> str
273
+ pass
274
+
275
+ def isNativeMethod(self):
276
+ # type: () -> bool
277
+ return True
278
+
279
+
280
+ class String(unicode):
281
+ def __new__(cls, *args):
282
+ # type: (Any, *Any) -> Any
283
+ print(args)
284
+ return super(String, cls).__new__(cls, *args)
285
+
286
+ def __init__(self, *args):
287
+ # type: (*Any) -> None
288
+ super(String, self).__init__(*args)
289
+
290
+ def charAt(self, index):
291
+ # type: (int) -> unicode
292
+ pass
293
+
294
+ def chars(self): # type: ignore[no-untyped-def]
295
+ pass
296
+
297
+ def codePointAt(self, index):
298
+ # type: (int) -> int
299
+ pass
300
+
301
+ def codePointBefore(self, index):
302
+ # type: (int) -> int
303
+ pass
304
+
305
+ def codePointCount(self, beginIndex, endIndex):
306
+ # type: (int, int) -> int
307
+ pass
308
+
309
+ def codePoints(self): # type: ignore[no-untyped-def]
310
+ pass
311
+
312
+ @staticmethod
313
+ def compare(cs1, cs2):
314
+ # type: (CharSequence, CharSequence) -> int
315
+ pass
316
+
317
+ def compareTo(self, anotherString):
318
+ # type: (String) -> int
319
+ pass
320
+
321
+ def compareToIgnoreCase(self, arg):
322
+ # type: (String) -> int
323
+ pass
324
+
325
+ def concat(self, arg):
326
+ # type: (String) -> String
327
+ pass
328
+
329
+ def contains(self, arg):
330
+ # type: (String) -> bool
331
+ return True
332
+
333
+ def contentEquals(self, arg):
334
+ # type: (Union[CharSequence, StringBuffer]) -> bool
335
+ return True
336
+
337
+ @staticmethod
338
+ def copyValueOf(*args):
339
+ # type: (*Any) -> String
340
+ pass
341
+
342
+ def endsWith(self, suffix):
343
+ # type: (String) -> bool
344
+ return self.endswith(suffix)
345
+
346
+ def equals(self, anObject):
347
+ # type: (Object) -> bool
348
+ return True
349
+
350
+ def equalsIgnoreCase(self, anotherString):
351
+ # type: (String) -> bool
352
+ return True
353
+
354
+ def getBytes(self, *args):
355
+ # type: (*Any) -> Optional[object]
356
+ print(args)
357
+ return array.array("b", self)
358
+
359
+ def getChars(self, srcBegin, srcEnd, dst, dstBegin):
360
+ # type: (int, int, object, int) -> None
361
+ pass
362
+
363
+ def getClass(self):
364
+ # type: () -> Class
365
+ pass
366
+
367
+ def hashCode(self):
368
+ # type: () -> int
369
+ return hash(self)
370
+
371
+ def indexOf(self, arg, fromIndex=None):
372
+ # type: (Union[int, String], Optional[int]) -> int
373
+ pass
374
+
375
+ def intern(self):
376
+ # type: () -> String
377
+ pass
378
+
379
+ def isBlank(self):
380
+ # type: () -> bool
381
+ return True
382
+
383
+ def isEmpty(self):
384
+ # type: () -> bool
385
+ return True
386
+
387
+ def lastIndexOf(self, arg, fromIndex=None):
388
+ # type: (Union[int, String], Optional[int]) -> int
389
+ pass
390
+
391
+ def length(self):
392
+ # type: () -> int
393
+ return len(self)
394
+
395
+ def lines(self): # type: ignore[no-untyped-def]
396
+ pass
397
+
398
+ def matches(self, regex):
399
+ # type: (String) -> bool
400
+ return True
401
+
402
+ def notify(self):
403
+ # type: () -> None
404
+ pass
405
+
406
+ def notifyAll(self):
407
+ # type: () -> None
408
+ pass
409
+
410
+ def offsetByCodePoints(self, index, codePointOffset):
411
+ # type: (int, int) -> int
412
+ pass
413
+
414
+ def regionMatches(self, *args):
415
+ # type: (*Any) -> bool
416
+ return True
417
+
418
+ def repeat(self, count):
419
+ # type: (int) -> String
420
+ pass
421
+
422
+ def replaceAll(self, regex, replacement):
423
+ # type: (String, String) -> String
424
+ pass
425
+
426
+ def replaceFirst(self, regex, replacement):
427
+ # type: (String, String) -> String
428
+ pass
429
+
430
+ def startsWith(self, prefix, offset=0):
431
+ # type: (String, int) -> bool
432
+ return self.startswith(prefix, offset)
433
+
434
+ def stripLeading(self):
435
+ # type: () -> String
436
+ pass
437
+
438
+ def stripTrailing(self):
439
+ # type: () -> String
440
+ pass
441
+
442
+ def subSequence(self, start, end):
443
+ # type: (int, int) -> CharSequence
444
+ pass
445
+
446
+ def substring(self, beginIndex, endIndex=None):
447
+ # type: (int, Optional[int]) -> String
448
+ pass
449
+
450
+ def toCharArray(self):
451
+ # type: () -> object
452
+ return array.array("c", self)
453
+
454
+ def toLowerCase(self, locale=None):
455
+ # type: (Optional[Any]) -> String
456
+ print(locale)
457
+ return String(self.lower())
458
+
459
+ def toString(self):
460
+ # type: () -> unicode
461
+ return unicode(self)
462
+
463
+ def toUpperCase(self):
464
+ # type: () -> String
465
+ return String(self.upper())
466
+
467
+ @staticmethod
468
+ def valueOf(*args):
469
+ # type: (*Any) -> String
470
+ pass
471
+
472
+ def wait(self, timeoutMillis=0, nanos=0):
473
+ # type: (long, int) -> None
474
+ pass
475
+
476
+
477
+ class StringBuffer(Object, CharSequence):
478
+ def __init__(self, *args):
479
+ # type: (Any) -> None
480
+ super(StringBuffer, self).__init__()
481
+ print(args)
482
+
483
+ def append(self, *args):
484
+ # type: (Any) -> StringBuffer
485
+ pass
486
+
487
+ def appendCodePoint(self, codePoint):
488
+ # type: (int) -> StringBuffer
489
+ pass
490
+
491
+ def capacity(self):
492
+ # type: () -> int
493
+ pass
494
+
495
+ def charAt(self, index):
496
+ # type: (int) -> str
497
+ pass
498
+
499
+ def codePointAt(self, index):
500
+ # type: (int) -> int
501
+ pass
502
+
503
+ def codePointBefore(self, index):
504
+ # type: (int) -> int
505
+ pass
506
+
507
+ def codePointCount(self, beginIndex, endIndex):
508
+ # type: (int, int) -> int
509
+ pass
510
+
511
+ def compareTo(self, another):
512
+ # type: (StringBuffer) -> int
513
+ pass
514
+
515
+ def delete(self, start, end):
516
+ # type: (int, int) -> StringBuffer
517
+ pass
518
+
519
+ def deleteCharAt(self, index):
520
+ # type: (int) -> StringBuffer
521
+ pass
522
+
523
+ def ensureCapacity(self, minimumCapacity):
524
+ # type: (int) -> None
525
+ pass
526
+
527
+ def getChars(self, srcBegin, srcEnd, dst, dstBegin):
528
+ # type: (int, int, str, int) -> None
529
+ pass
530
+
531
+ def indexOf(self, string, fromIndex=0):
532
+ # type: (str, int) -> int
533
+ pass
534
+
535
+ def insert(self, *args):
536
+ # type: (Any) -> StringBuffer
537
+ pass
538
+
539
+ def lastIndexOf(self, string, fromIndex=0):
540
+ # type: (str, int) -> int
541
+ pass
542
+
543
+ def length(self):
544
+ # type: () -> int
545
+ pass
546
+
547
+ def offsetByCodePoints(self, index, codePointOffset):
548
+ # type: (int, int) -> int
549
+ pass
550
+
551
+ def replace(self, start, end, string):
552
+ # type: (int, int, str) -> StringBuffer
553
+ pass
554
+
555
+ def reverse(self):
556
+ # type: () -> StringBuffer
557
+ pass
558
+
559
+ def setCharAt(self, index, ch):
560
+ # type: (int, str) -> None
561
+ pass
562
+
563
+ def setLength(self, newLength):
564
+ # type: (int) -> None
565
+ pass
566
+
567
+ def subSequence(self, start, end):
568
+ # type: (int, int) -> CharSequence
569
+ pass
570
+
571
+ def substring(self, start, end=-1):
572
+ # type: (int, int) -> str
573
+ pass
574
+
575
+ def trimToSize(self):
576
+ # type: () -> None
577
+ pass
578
+
579
+
580
+ class StringBuilder(Object, CharSequence):
581
+ def __init__(self, *args):
582
+ # type: (Any) -> None
583
+ super(StringBuilder, self).__init__()
584
+ print(args)
585
+
586
+ def append(self, *args):
587
+ # type: (Any) -> StringBuilder
588
+ pass
589
+
590
+ def capacity(self):
591
+ # type: () -> int
592
+ pass
593
+
594
+ def charAt(self, index):
595
+ # type: (int) -> str
596
+ pass
597
+
598
+ def codePointAt(self, index):
599
+ # type: (int) -> int
600
+ pass
601
+
602
+ def codePointBefore(self, index):
603
+ # type: (int) -> int
604
+ pass
605
+
606
+ def codePointCount(self, beginIndex, endIndex):
607
+ # type: (int, int) -> int
608
+ pass
609
+
610
+ def compareTo(self, another):
611
+ # type: (StringBuilder) -> int
612
+ pass
613
+
614
+ def delete(self, start, end):
615
+ # type: (int, int) -> StringBuilder
616
+ pass
617
+
618
+ def deleteCharAt(self, index):
619
+ # type: (int) -> StringBuilder
620
+ pass
621
+
622
+ def ensureCapacity(self, minimumCapacity):
623
+ # type: (int) -> None
624
+ pass
625
+
626
+ def getChars(self, srcBegin, srcEnd, dst, dstBegin):
627
+ # type: (int, int, str, int) -> None
628
+ pass
629
+
630
+ def indexOf(self, str_, fromIndex=0):
631
+ # type: (Union[str, unicode], int) -> int
632
+ pass
633
+
634
+ def insert(self, *args):
635
+ # type: (Any) -> StringBuilder
636
+ pass
637
+
638
+ def lastIndexOf(self, str_, fromIndex=0):
639
+ # type: (Union[str, unicode], int) -> int
640
+ pass
641
+
642
+ def length(self):
643
+ # type: () -> int
644
+ pass
645
+
646
+ def offsetByCodePoints(self, index, codePointOffset):
647
+ # type: (int, int) -> int
648
+ pass
649
+
650
+ def replace(self, start, end, str_):
651
+ # type: (int, int, int) -> StringBuilder
652
+ pass
653
+
654
+ def reverse(self):
655
+ # type: () -> StringBuilder
656
+ pass
657
+
658
+ def setCharAt(self, index, ch):
659
+ # type: (int, str) -> None
660
+ pass
661
+
662
+ def setLength(self, newLength):
663
+ # type: (int) -> None
664
+ pass
665
+
666
+ def subSequence(self, start, end):
667
+ # type: (int, int) -> CharSequence
668
+ pass
669
+
670
+ def substring(self, start, end=-1):
671
+ # type: (int, int) -> Union[str, unicode]
672
+ pass
673
+
674
+ def trimToSize(self):
675
+ # type: () -> None
676
+ pass
677
+
678
+
679
+ class Throwable(Object, builtins.Exception):
680
+ """The Throwable class is the superclass of all errors and
681
+ exceptions in the Java language.
682
+ """
683
+
684
+ def __init__(self, message=None, cause=None):
685
+ # type: (Optional[str], Optional[Throwable]) -> None
686
+ super(Throwable, self).__init__()
687
+ self._cause = cause
688
+ self._message = message
689
+ builtins.Exception.__init__(self, message)
690
+
691
+ @property
692
+ def cause(self):
693
+ # type: () -> Throwable
694
+ return Throwable()
695
+
696
+ def addSuppressed(self, exception):
697
+ # type: (Throwable) -> None
698
+ pass
699
+
700
+ def fillInStackTrace(self):
701
+ # type: () -> Throwable
702
+ pass
703
+
704
+ def getCause(self):
705
+ # type: () -> Throwable
706
+ return self.cause
707
+
708
+ def getLocalizedMessage(self):
709
+ # type: () -> str
710
+ return self.message
711
+
712
+ def getMessage(self):
713
+ # type: () -> str
714
+ pass
715
+
716
+ def getStackTrace(self):
717
+ # type: () -> List[StackTraceElement]
718
+ pass
719
+
720
+ def getSuppressed(self):
721
+ # type: () -> List[Throwable]
722
+ pass
723
+
724
+ def initCause(self, cause=None):
725
+ # type: (Optional[Throwable]) -> None
726
+ pass
727
+
728
+ @property
729
+ def message(self):
730
+ # type: () -> str
731
+ return "message"
732
+
733
+ def printStackTrace(self, *args):
734
+ # type: (Any) -> None
735
+ pass
736
+
737
+ def setStackTrace(self, stackTrace):
738
+ # type: (List[StackTraceElement]) -> None
739
+ pass
740
+
741
+ def toString(self):
742
+ # type: () -> Union[str, unicode]
743
+ return "A short description of this throwable."
744
+
745
+
746
+ class Exception(Throwable):
747
+ """The class Exception and its subclasses are a form of Throwable
748
+ that indicates conditions that a reasonable application might want
749
+ to catch.
750
+
751
+ The class Exception and any subclasses that are not also subclasses
752
+ of RuntimeException are checked exceptions. Checked exceptions need
753
+ to be declared in a method or constructor's throws clause if they
754
+ can be thrown by the execution of the method or constructor and
755
+ propagate outside the method or constructor boundary.
756
+ """
757
+
758
+ def __init__(self, message=None, cause=None):
759
+ # type: (Optional[str], Optional[Throwable]) -> None
760
+ super(Exception, self).__init__(message, cause)
761
+
762
+
763
+ class RuntimeException(Exception):
764
+ """RuntimeException is the superclass of those exceptions that can
765
+ be thrown during the normal operation of the Java Virtual Machine.
766
+
767
+ RuntimeException and its subclasses are unchecked exceptions.
768
+ Unchecked exceptions do not need to be declared in a method or
769
+ constructor's throws clause if they can be thrown by the execution
770
+ of the method or constructor and propagate outside the method or
771
+ constructor boundary.
772
+ """
773
+
774
+ def __init__(self, message=None, cause=None):
775
+ # type: (Optional[str], Optional[Throwable]) -> None
776
+ super(RuntimeException, self).__init__(message, cause)
777
+
778
+
779
+ class ClassCastException(RuntimeException):
780
+ """Thrown to indicate that the code has attempted to cast an object
781
+ to a subclass of which it is not an instance.
782
+ """
783
+
784
+ def __init__(self, s=None):
785
+ # type: (Optional[str]) -> None
786
+ super(ClassCastException, self).__init__(s)
787
+
788
+
789
+ class IllegalArgumentException(RuntimeException):
790
+ """Thrown to indicate that a method has been passed an illegal or
791
+ inappropriate argument.
792
+ """
793
+
794
+ def __init__(self, message=None, cause=None):
795
+ # type: (Optional[str], Optional[Throwable]) -> None
796
+ super(IllegalArgumentException, self).__init__(message, cause)
797
+
798
+
799
+ class IllegalStateException(RuntimeException):
800
+ """Signals that a method has been invoked at an illegal or
801
+ inappropriate time.
802
+ """
803
+
804
+ def __init__(self, message=None, cause=None):
805
+ # type: (Optional[str], Optional[Throwable]) -> None
806
+ super(IllegalStateException, self).__init__(message, cause)
807
+
808
+
809
+ class IndexOutOfBoundsException(RuntimeException):
810
+ """Thrown to indicate that an index of some sort (such as to an
811
+ array, to a string, or to a vector) is out of range.
812
+ """
813
+
814
+ def __init__(self, arg=None):
815
+ # type: (Optional[Union[int, str, unicode]]) -> None
816
+ super(IndexOutOfBoundsException, self).__init__()
817
+
818
+
819
+ class ArrayIndexOutOfBoundsException(IndexOutOfBoundsException):
820
+ """Thrown to indicate that an array has been accessed with an
821
+ illegal index.
822
+
823
+ The index is either negative or greater than or equal to the size of
824
+ the array.
825
+ """
826
+
827
+ def __init__(self, arg=None):
828
+ # type: (Optional[Union[int, str, unicode]]) -> None
829
+ super(ArrayIndexOutOfBoundsException, self).__init__(arg)
830
+
831
+
832
+ class NullPointerException(RuntimeException):
833
+ """Thrown when an application attempts to use null in a case where
834
+ an object is required.
835
+ """
836
+
837
+ def __init__(self, message=None, cause=None):
838
+ # type: (Optional[str], Optional[Throwable]) -> None
839
+ super(NullPointerException, self).__init__(message, cause)
840
+
841
+
842
+ class UnsupportedOperationException(RuntimeException):
843
+ """Thrown to indicate that the requested operation is not
844
+ supported.
845
+ """
846
+
847
+ def __init__(self, message=None, cause=None):
848
+ # type: (Optional[str], Optional[Throwable]) -> None
849
+ super(UnsupportedOperationException, self).__init__(message, cause)
850
+
851
+
852
+ class Thread(Object):
853
+ """A thread is a thread of execution in a program. The Java Virtual
854
+ Machine allows an application to have multiple threads of execution
855
+ running concurrently.
856
+
857
+ Every thread has a name for identification purposes. More than one
858
+ thread may have the same name. If a name is not specified when a
859
+ thread is created, a new name is generated for it.
860
+
861
+ Unless otherwise noted, passing a null argument to a constructor or
862
+ method in this class will cause a NullPointerException to be thrown.
863
+ """
864
+
865
+ @staticmethod
866
+ def sleep(millis):
867
+ # type: (long) -> None
868
+ time.sleep(millis // 1000)