java-api 17.26.5__py2-none-any.whl → 25.26.1__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.
- java/io/__init__.py +22 -1
- java/lang/__init__.py +381 -11
- java/lang/reflect/__init__.py +151 -2
- java/math/__init__.py +5 -0
- java/net/__init__.py +5 -0
- java/net/http/__init__.py +27 -2
- java/nio/__init__.py +4 -0
- java/nio/charset/__init__.py +2 -2
- java/nio/file/__init__.py +2 -2
- java/text/__init__.py +60 -1
- java/time/__init__.py +12 -0
- java/time/chrono/__init__.py +4 -0
- java/time/format/__init__.py +5 -0
- java/util/__init__.py +235 -0
- java/util/concurrent/__init__.py +53 -1
- java/util/regex/__init__.py +30 -6
- java/util/stream/__init__.py +104 -1
- {java_api-17.26.5.dist-info → java_api-25.26.1.dist-info}/METADATA +5 -5
- {java_api-17.26.5.dist-info → java_api-25.26.1.dist-info}/RECORD +23 -23
- javax/security/auth/__init__.py +10 -0
- {java_api-17.26.5.dist-info → java_api-25.26.1.dist-info}/LICENSE +0 -0
- {java_api-17.26.5.dist-info → java_api-25.26.1.dist-info}/WHEEL +0 -0
- {java_api-17.26.5.dist-info → java_api-25.26.1.dist-info}/top_level.txt +0 -0
java/math/__init__.py
CHANGED
|
@@ -10,6 +10,7 @@ from java.lang import Enum, Number, Object
|
|
|
10
10
|
class BigDecimal(Number):
|
|
11
11
|
ONE = None # type: BigDecimal
|
|
12
12
|
TEN = None # type: BigDecimal
|
|
13
|
+
TWO = None # type: BigDecimal
|
|
13
14
|
ZERO = None # type: BigDecimal
|
|
14
15
|
|
|
15
16
|
def __init__(self, *args):
|
|
@@ -61,6 +62,10 @@ class BigInteger(Number):
|
|
|
61
62
|
# type: () -> long
|
|
62
63
|
pass
|
|
63
64
|
|
|
65
|
+
def parallelMultiply(self, val):
|
|
66
|
+
# type: (BigInteger) -> BigInteger
|
|
67
|
+
pass
|
|
68
|
+
|
|
64
69
|
|
|
65
70
|
class MathContext(Object):
|
|
66
71
|
def __init__(self, *args):
|
java/net/__init__.py
CHANGED
|
@@ -244,6 +244,11 @@ class InetAddress(Object):
|
|
|
244
244
|
# type: () -> bool
|
|
245
245
|
return True
|
|
246
246
|
|
|
247
|
+
@staticmethod
|
|
248
|
+
def ofLiteral(ipAddressString):
|
|
249
|
+
# type: (Union[str, unicode]) -> InetAddress
|
|
250
|
+
pass
|
|
251
|
+
|
|
247
252
|
|
|
248
253
|
class InetSocketAddress(SocketAddress):
|
|
249
254
|
def __init__(self, *args):
|
java/net/http/__init__.py
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
__all__ = ["HttpClient", "HttpRequest", "HttpResponse"]
|
|
2
2
|
|
|
3
|
+
from typing import TYPE_CHECKING, Optional
|
|
4
|
+
|
|
3
5
|
from java.lang import Object
|
|
4
6
|
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from java.time import Duration
|
|
9
|
+
|
|
5
10
|
|
|
6
11
|
class HttpResponse(object):
|
|
7
|
-
|
|
12
|
+
def connectionLabel(self):
|
|
13
|
+
# type: () -> Optional[str]
|
|
14
|
+
pass
|
|
8
15
|
|
|
9
16
|
|
|
10
17
|
class HttpClient(Object):
|
|
11
|
-
|
|
18
|
+
def awaitTermination(self, duration):
|
|
19
|
+
# type: (Duration) -> bool
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
def close(self):
|
|
23
|
+
# type: () -> None
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
def isTerminated(self):
|
|
27
|
+
# type: () -> bool
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
def shutdown(self):
|
|
31
|
+
# type: () -> None
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
def shutdownNow(self):
|
|
35
|
+
# type: () -> None
|
|
36
|
+
pass
|
|
12
37
|
|
|
13
38
|
|
|
14
39
|
class HttpRequest(Object):
|
java/nio/__init__.py
CHANGED
|
@@ -287,6 +287,10 @@ class CharBuffer(Buffer, Appendable, CharSequence):
|
|
|
287
287
|
# type: (Any) -> CharBuffer
|
|
288
288
|
pass
|
|
289
289
|
|
|
290
|
+
def getChars(self, srcBegin, srcEnd, dst, dstBegin):
|
|
291
|
+
# type: (int, int, object, int) -> None
|
|
292
|
+
pass
|
|
293
|
+
|
|
290
294
|
def hasArray(self):
|
|
291
295
|
# type: () -> bool
|
|
292
296
|
return True
|
java/nio/charset/__init__.py
CHANGED
|
@@ -47,8 +47,8 @@ class Charset(Object):
|
|
|
47
47
|
pass
|
|
48
48
|
|
|
49
49
|
@staticmethod
|
|
50
|
-
def forName(charsetName):
|
|
51
|
-
# type: (Union[str, unicode]) -> Charset
|
|
50
|
+
def forName(charsetName, fallback=None):
|
|
51
|
+
# type: (Union[str, unicode], Optional[Charset]) -> Charset
|
|
52
52
|
pass
|
|
53
53
|
|
|
54
54
|
def isRegistered(self):
|
java/nio/file/__init__.py
CHANGED
|
@@ -616,8 +616,8 @@ class Path(Watchable):
|
|
|
616
616
|
# type: (Path) -> Path
|
|
617
617
|
pass
|
|
618
618
|
|
|
619
|
-
def resolve(self, other):
|
|
620
|
-
# type: (Union[Path, str, unicode]) -> Path
|
|
619
|
+
def resolve(self, other, *more):
|
|
620
|
+
# type: (Union[Path, str, unicode], *Union[Path, str, unicode]) -> Path # noqa: W505
|
|
621
621
|
pass
|
|
622
622
|
|
|
623
623
|
def resolveSibling(self, other):
|
java/text/__init__.py
CHANGED
|
@@ -7,6 +7,7 @@ __all__ = [
|
|
|
7
7
|
"DateFormatSymbols",
|
|
8
8
|
"FieldPosition",
|
|
9
9
|
"Format",
|
|
10
|
+
"ListFormat",
|
|
10
11
|
"NumberFormat",
|
|
11
12
|
"ParsePosition",
|
|
12
13
|
"SimpleDateFormat",
|
|
@@ -14,7 +15,7 @@ __all__ = [
|
|
|
14
15
|
|
|
15
16
|
from typing import Any, Dict, List, Optional, Set, Union
|
|
16
17
|
|
|
17
|
-
from java.lang import Number, Object, StringBuffer
|
|
18
|
+
from java.lang import Enum, Number, Object, StringBuffer
|
|
18
19
|
from java.math import RoundingMode
|
|
19
20
|
from java.util import Calendar, Currency, Date, Locale, TimeZone
|
|
20
21
|
|
|
@@ -440,6 +441,10 @@ class NumberFormat(Format):
|
|
|
440
441
|
# type: () -> bool
|
|
441
442
|
return True
|
|
442
443
|
|
|
444
|
+
def isStrict(self):
|
|
445
|
+
# type: () -> bool
|
|
446
|
+
return True
|
|
447
|
+
|
|
443
448
|
def parse(self, source):
|
|
444
449
|
# type: (Union[str, unicode]) -> Number
|
|
445
450
|
pass
|
|
@@ -468,6 +473,10 @@ class NumberFormat(Format):
|
|
|
468
473
|
# type: (int) -> None
|
|
469
474
|
pass
|
|
470
475
|
|
|
476
|
+
def setStrict(self, strict):
|
|
477
|
+
# type: (bool) -> None
|
|
478
|
+
pass
|
|
479
|
+
|
|
471
480
|
def setParseIntegerOnly(self, value):
|
|
472
481
|
# type: (bool) -> None
|
|
473
482
|
pass
|
|
@@ -541,3 +550,53 @@ class SimpleDateFormat(DateFormat):
|
|
|
541
550
|
def toPattern(self):
|
|
542
551
|
# type: () -> Union[str, unicode]
|
|
543
552
|
pass
|
|
553
|
+
|
|
554
|
+
def toString(self):
|
|
555
|
+
# type: () -> Union[str, unicode]
|
|
556
|
+
pass
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
class ListFormat(Format):
|
|
560
|
+
class Type(Enum):
|
|
561
|
+
STANDARD = None # type: ListFormat.Type
|
|
562
|
+
OR = None # type: ListFormat.Type
|
|
563
|
+
UNIT = None # type: ListFormat.Type
|
|
564
|
+
|
|
565
|
+
class Style(Enum):
|
|
566
|
+
FULL = None # type: ListFormat.Style
|
|
567
|
+
SHORT = None # type: ListFormat.Style
|
|
568
|
+
NARROW = None # type: ListFormat.Style
|
|
569
|
+
|
|
570
|
+
@staticmethod
|
|
571
|
+
def getAvailableLocales():
|
|
572
|
+
# type: () -> List[Locale]
|
|
573
|
+
pass
|
|
574
|
+
|
|
575
|
+
@staticmethod
|
|
576
|
+
def getInstance(*args):
|
|
577
|
+
# type: (*Any) -> ListFormat
|
|
578
|
+
pass
|
|
579
|
+
|
|
580
|
+
def format(self, *args):
|
|
581
|
+
# type: (*Any) -> Union[str, unicode]
|
|
582
|
+
pass
|
|
583
|
+
|
|
584
|
+
def getLocale(self):
|
|
585
|
+
# type: () -> Locale
|
|
586
|
+
pass
|
|
587
|
+
|
|
588
|
+
def getPatterns(self):
|
|
589
|
+
# type: () -> List[Union[str, unicode]]
|
|
590
|
+
pass
|
|
591
|
+
|
|
592
|
+
def parse(self, source):
|
|
593
|
+
# type: (Union[str, unicode]) -> List[Union[str, unicode]]
|
|
594
|
+
pass
|
|
595
|
+
|
|
596
|
+
def parseObject(self, source, pos=None):
|
|
597
|
+
# type: (Union[str, unicode], Optional[ParsePosition]) -> Any
|
|
598
|
+
pass
|
|
599
|
+
|
|
600
|
+
def toString(self):
|
|
601
|
+
# type: () -> Union[str, unicode]
|
|
602
|
+
pass
|
java/time/__init__.py
CHANGED
|
@@ -101,6 +101,10 @@ class DayOfWeek(Enum, TemporalAccessor, TemporalAdjuster):
|
|
|
101
101
|
class Duration(Object):
|
|
102
102
|
ZERO = None # type: Duration
|
|
103
103
|
|
|
104
|
+
def isPositive(self):
|
|
105
|
+
# type: () -> bool
|
|
106
|
+
return True
|
|
107
|
+
|
|
104
108
|
def toDays(self):
|
|
105
109
|
# type: () -> long
|
|
106
110
|
pass
|
|
@@ -175,6 +179,10 @@ class Instant(Object):
|
|
|
175
179
|
# type: (CharSequence) -> Instant
|
|
176
180
|
pass
|
|
177
181
|
|
|
182
|
+
def until(self, endExclusive):
|
|
183
|
+
# type: (Instant) -> Duration
|
|
184
|
+
pass
|
|
185
|
+
|
|
178
186
|
|
|
179
187
|
class LocalDate(Object, Temporal, TemporalAdjuster, Comparable):
|
|
180
188
|
EPOCH = None # type: LocalDate
|
|
@@ -406,6 +414,10 @@ class ZoneOffset(Object):
|
|
|
406
414
|
MIN = None # type: ZoneOffset
|
|
407
415
|
UTC = None # type: ZoneOffset
|
|
408
416
|
|
|
417
|
+
def normalized(self):
|
|
418
|
+
# type: () -> ZoneId
|
|
419
|
+
pass
|
|
420
|
+
|
|
409
421
|
@staticmethod
|
|
410
422
|
def of(offsetId):
|
|
411
423
|
# type: (Union[str, unicode]) -> ZoneOffset
|
java/time/chrono/__init__.py
CHANGED
|
@@ -284,6 +284,10 @@ class Chronology(Comparable):
|
|
|
284
284
|
# type: (long) -> bool
|
|
285
285
|
raise NotImplementedError
|
|
286
286
|
|
|
287
|
+
def isIsoBased(self):
|
|
288
|
+
# type: () -> bool
|
|
289
|
+
return True
|
|
290
|
+
|
|
287
291
|
def prolepticYear(self, era, yearOfEra):
|
|
288
292
|
# type: (Era, int) -> int
|
|
289
293
|
raise NotImplementedError
|
java/time/format/__init__.py
CHANGED
|
@@ -38,6 +38,11 @@ class DateTimeFormatter(Object):
|
|
|
38
38
|
# type: () -> Chronology
|
|
39
39
|
pass
|
|
40
40
|
|
|
41
|
+
@staticmethod
|
|
42
|
+
def ofLocalizedPattern(requestedTemplate):
|
|
43
|
+
# type: (Union[str, unicode]) -> DateTimeFormatter
|
|
44
|
+
pass
|
|
45
|
+
|
|
41
46
|
|
|
42
47
|
class ResolverStyle(Enum):
|
|
43
48
|
LENIENT = None # type: ResolverStyle
|
java/util/__init__.py
CHANGED
|
@@ -30,6 +30,9 @@ __all__ = [
|
|
|
30
30
|
"Locale",
|
|
31
31
|
"Map",
|
|
32
32
|
"Properties",
|
|
33
|
+
"SequencedCollection",
|
|
34
|
+
"SequencedMap",
|
|
35
|
+
"SequencedSet",
|
|
33
36
|
"Spliterator",
|
|
34
37
|
"TimeZone",
|
|
35
38
|
"UUID",
|
|
@@ -422,6 +425,180 @@ class Map(object):
|
|
|
422
425
|
raise NotImplementedError
|
|
423
426
|
|
|
424
427
|
|
|
428
|
+
class SequencedCollection(Collection):
|
|
429
|
+
def add(self, e):
|
|
430
|
+
# type: (Any) -> bool
|
|
431
|
+
pass
|
|
432
|
+
|
|
433
|
+
def addAll(self, c):
|
|
434
|
+
# type: (Collection) -> bool
|
|
435
|
+
pass
|
|
436
|
+
|
|
437
|
+
def addFirst(self, e):
|
|
438
|
+
# type: (Any) -> None
|
|
439
|
+
pass
|
|
440
|
+
|
|
441
|
+
def addLast(self, e):
|
|
442
|
+
# type: (Any) -> None
|
|
443
|
+
pass
|
|
444
|
+
|
|
445
|
+
def clear(self):
|
|
446
|
+
# type: () -> None
|
|
447
|
+
pass
|
|
448
|
+
|
|
449
|
+
def contains(self, o):
|
|
450
|
+
# type: (Object) -> bool
|
|
451
|
+
pass
|
|
452
|
+
|
|
453
|
+
def containsAll(self, c):
|
|
454
|
+
# type: (Collection) -> bool
|
|
455
|
+
pass
|
|
456
|
+
|
|
457
|
+
def equals(self, o):
|
|
458
|
+
# type: (Object) -> bool
|
|
459
|
+
pass
|
|
460
|
+
|
|
461
|
+
def getFirst(self):
|
|
462
|
+
# type: () -> Any
|
|
463
|
+
pass
|
|
464
|
+
|
|
465
|
+
def getLast(self):
|
|
466
|
+
# type: () -> Any
|
|
467
|
+
pass
|
|
468
|
+
|
|
469
|
+
def hashCode(self):
|
|
470
|
+
# type: () -> int
|
|
471
|
+
pass
|
|
472
|
+
|
|
473
|
+
def isEmpty(self):
|
|
474
|
+
# type: () -> bool
|
|
475
|
+
pass
|
|
476
|
+
|
|
477
|
+
def iterator(self):
|
|
478
|
+
# type: () -> Iterator
|
|
479
|
+
pass
|
|
480
|
+
|
|
481
|
+
def remove(self, o):
|
|
482
|
+
# type: (Object) -> bool
|
|
483
|
+
pass
|
|
484
|
+
|
|
485
|
+
def removeAll(self, c):
|
|
486
|
+
# type: (Collection) -> bool
|
|
487
|
+
pass
|
|
488
|
+
|
|
489
|
+
def removeFirst(self):
|
|
490
|
+
# type: () -> Any
|
|
491
|
+
pass
|
|
492
|
+
|
|
493
|
+
def removeLast(self):
|
|
494
|
+
# type: () -> Any
|
|
495
|
+
pass
|
|
496
|
+
|
|
497
|
+
def retainAll(self, v):
|
|
498
|
+
# type: (Collection) -> bool
|
|
499
|
+
pass
|
|
500
|
+
|
|
501
|
+
def reversed(self):
|
|
502
|
+
# type: () -> SequencedCollection
|
|
503
|
+
pass
|
|
504
|
+
|
|
505
|
+
def size(self):
|
|
506
|
+
# type: () -> int
|
|
507
|
+
pass
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
class SequencedSet(SequencedCollection):
|
|
511
|
+
def reversed(self):
|
|
512
|
+
# type: () -> SequencedSet
|
|
513
|
+
pass
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
class SequencedMap(Map):
|
|
517
|
+
def clear(self):
|
|
518
|
+
# type: () -> None
|
|
519
|
+
pass
|
|
520
|
+
|
|
521
|
+
def containsKey(self, key):
|
|
522
|
+
# type: (Object) -> bool
|
|
523
|
+
pass
|
|
524
|
+
|
|
525
|
+
def containsValue(self, value):
|
|
526
|
+
# type: (Object) -> bool
|
|
527
|
+
pass
|
|
528
|
+
|
|
529
|
+
def entrySet(self):
|
|
530
|
+
# type: () -> Set[Map.Entry]
|
|
531
|
+
pass
|
|
532
|
+
|
|
533
|
+
def firstEntry(self):
|
|
534
|
+
# type: () -> Map.Entry
|
|
535
|
+
pass
|
|
536
|
+
|
|
537
|
+
def get(self, key):
|
|
538
|
+
# type: (Object) -> Any
|
|
539
|
+
pass
|
|
540
|
+
|
|
541
|
+
def isEmpty(self):
|
|
542
|
+
# type: () -> bool
|
|
543
|
+
pass
|
|
544
|
+
|
|
545
|
+
def keySet(self):
|
|
546
|
+
# type: () -> Set[Any]
|
|
547
|
+
pass
|
|
548
|
+
|
|
549
|
+
def lastEntry(self):
|
|
550
|
+
# type: () -> Map.Entry
|
|
551
|
+
pass
|
|
552
|
+
|
|
553
|
+
def pollFirstEntry(self):
|
|
554
|
+
# type: () -> Map.Entry
|
|
555
|
+
pass
|
|
556
|
+
|
|
557
|
+
def pollLastEntry(self):
|
|
558
|
+
# type: () -> Map.Entry
|
|
559
|
+
pass
|
|
560
|
+
|
|
561
|
+
def put(self, key, value):
|
|
562
|
+
# type: (Any, Any) -> Any
|
|
563
|
+
pass
|
|
564
|
+
|
|
565
|
+
def putAll(self, m):
|
|
566
|
+
# type: (Mapping[Any, Any]) -> None
|
|
567
|
+
pass
|
|
568
|
+
|
|
569
|
+
def putFirst(self, k, v):
|
|
570
|
+
# type: (Any, Any) -> Any
|
|
571
|
+
pass
|
|
572
|
+
|
|
573
|
+
def putLast(self, k, v):
|
|
574
|
+
# type: (Any, Any) -> Any
|
|
575
|
+
pass
|
|
576
|
+
|
|
577
|
+
def reversed(self):
|
|
578
|
+
# type: () -> SequencedMap
|
|
579
|
+
pass
|
|
580
|
+
|
|
581
|
+
def sequencedEntrySet(self):
|
|
582
|
+
# type: () -> SequencedSet
|
|
583
|
+
pass
|
|
584
|
+
|
|
585
|
+
def sequencedKeySet(self):
|
|
586
|
+
# type: () -> SequencedSet
|
|
587
|
+
pass
|
|
588
|
+
|
|
589
|
+
def sequencedValues(self):
|
|
590
|
+
# type: () -> SequencedCollection
|
|
591
|
+
pass
|
|
592
|
+
|
|
593
|
+
def size(self):
|
|
594
|
+
# type: () -> int
|
|
595
|
+
pass
|
|
596
|
+
|
|
597
|
+
def values(self):
|
|
598
|
+
# type: () -> Collection
|
|
599
|
+
pass
|
|
600
|
+
|
|
601
|
+
|
|
425
602
|
class Spliterator(object):
|
|
426
603
|
CONCURRENT = None # type: int
|
|
427
604
|
DISTINCT = None # type: int
|
|
@@ -685,6 +862,14 @@ class ArrayList(AbstractList):
|
|
|
685
862
|
super(ArrayList, self).__init__()
|
|
686
863
|
print(args)
|
|
687
864
|
|
|
865
|
+
def addFirst(self, e):
|
|
866
|
+
# type: (Any) -> None
|
|
867
|
+
pass
|
|
868
|
+
|
|
869
|
+
def addLast(self, e):
|
|
870
|
+
# type: (Any) -> None
|
|
871
|
+
pass
|
|
872
|
+
|
|
688
873
|
def ensureCapacity(self, minCapacity):
|
|
689
874
|
# type: (int) -> None
|
|
690
875
|
pass
|
|
@@ -693,6 +878,26 @@ class ArrayList(AbstractList):
|
|
|
693
878
|
# type: (int) -> Any
|
|
694
879
|
pass
|
|
695
880
|
|
|
881
|
+
def getFirst(self):
|
|
882
|
+
# type: () -> Any
|
|
883
|
+
pass
|
|
884
|
+
|
|
885
|
+
def getLast(self):
|
|
886
|
+
# type: () -> Any
|
|
887
|
+
pass
|
|
888
|
+
|
|
889
|
+
def removeFirst(self):
|
|
890
|
+
# type: () -> Any
|
|
891
|
+
pass
|
|
892
|
+
|
|
893
|
+
def removeLast(self):
|
|
894
|
+
# type: () -> Any
|
|
895
|
+
pass
|
|
896
|
+
|
|
897
|
+
def reversed(self):
|
|
898
|
+
# type: () -> SequencedCollection
|
|
899
|
+
pass
|
|
900
|
+
|
|
696
901
|
def trimToSize(self):
|
|
697
902
|
# type: () -> None
|
|
698
903
|
pass
|
|
@@ -983,6 +1188,11 @@ class ConcurrentModificationException(RuntimeException):
|
|
|
983
1188
|
|
|
984
1189
|
|
|
985
1190
|
class Currency(Object):
|
|
1191
|
+
@staticmethod
|
|
1192
|
+
def availableCurrencies():
|
|
1193
|
+
# type: () -> Stream
|
|
1194
|
+
pass
|
|
1195
|
+
|
|
986
1196
|
@staticmethod
|
|
987
1197
|
def getAvailableCurrencies():
|
|
988
1198
|
# type: () -> Set[Currency]
|
|
@@ -1132,6 +1342,11 @@ class HashMap(AbstractMap, Map):
|
|
|
1132
1342
|
super(HashMap, self).__init__()
|
|
1133
1343
|
print(args)
|
|
1134
1344
|
|
|
1345
|
+
@staticmethod
|
|
1346
|
+
def newHashMap(numMappings):
|
|
1347
|
+
# type: (int) -> HashMap
|
|
1348
|
+
pass
|
|
1349
|
+
|
|
1135
1350
|
def entrySet(self):
|
|
1136
1351
|
# type: () -> Set[Map.Entry]
|
|
1137
1352
|
pass
|
|
@@ -1253,6 +1468,21 @@ class Locale(Object):
|
|
|
1253
1468
|
self.country = country
|
|
1254
1469
|
self.variant = variant
|
|
1255
1470
|
|
|
1471
|
+
@staticmethod
|
|
1472
|
+
def availableLocales():
|
|
1473
|
+
# type: () -> Stream
|
|
1474
|
+
pass
|
|
1475
|
+
|
|
1476
|
+
@staticmethod
|
|
1477
|
+
def caseFoldLanguageTag(languageTag):
|
|
1478
|
+
# type: (Union[str, unicode]) -> Union[str, unicode]
|
|
1479
|
+
pass
|
|
1480
|
+
|
|
1481
|
+
@staticmethod
|
|
1482
|
+
def of(*args):
|
|
1483
|
+
# type: (*Any) -> Locale
|
|
1484
|
+
pass
|
|
1485
|
+
|
|
1256
1486
|
def __str__(self):
|
|
1257
1487
|
# type: () -> str
|
|
1258
1488
|
ret = self.language
|
|
@@ -1304,6 +1534,11 @@ class TimeZone(Object):
|
|
|
1304
1534
|
# type: () -> None
|
|
1305
1535
|
super(TimeZone, self).__init__()
|
|
1306
1536
|
|
|
1537
|
+
@staticmethod
|
|
1538
|
+
def availableIDs(rawOffset=None):
|
|
1539
|
+
# type: (Optional[int]) -> Stream
|
|
1540
|
+
pass
|
|
1541
|
+
|
|
1307
1542
|
def clone(self):
|
|
1308
1543
|
# type: () -> Object
|
|
1309
1544
|
pass
|
java/util/concurrent/__init__.py
CHANGED
|
@@ -4,12 +4,22 @@ __all__ = [
|
|
|
4
4
|
"Executor",
|
|
5
5
|
"Future",
|
|
6
6
|
"ScheduledFuture",
|
|
7
|
+
"StructureViolationException",
|
|
8
|
+
"ThreadFactory",
|
|
7
9
|
"TimeUnit",
|
|
8
10
|
]
|
|
9
11
|
|
|
10
12
|
from typing import Any, List, Optional
|
|
11
13
|
|
|
12
|
-
from java.lang import
|
|
14
|
+
from java.lang import (
|
|
15
|
+
Comparable,
|
|
16
|
+
Enum,
|
|
17
|
+
Object,
|
|
18
|
+
Runnable,
|
|
19
|
+
RuntimeException,
|
|
20
|
+
Thread,
|
|
21
|
+
Throwable,
|
|
22
|
+
)
|
|
13
23
|
from java.time.temporal import ChronoUnit
|
|
14
24
|
|
|
15
25
|
|
|
@@ -30,10 +40,20 @@ class Executor(object):
|
|
|
30
40
|
|
|
31
41
|
|
|
32
42
|
class Future(object):
|
|
43
|
+
class State(Enum):
|
|
44
|
+
RUNNING = None # type: Future.State
|
|
45
|
+
SUCCESS = None # type: Future.State
|
|
46
|
+
FAILED = None # type: Future.State
|
|
47
|
+
CANCELLED = None # type: Future.State
|
|
48
|
+
|
|
33
49
|
def cancel(self, mayInterruptIfRunning):
|
|
34
50
|
# type: (bool) -> bool
|
|
35
51
|
raise NotImplementedError
|
|
36
52
|
|
|
53
|
+
def exceptionNow(self):
|
|
54
|
+
# type: () -> Throwable
|
|
55
|
+
raise NotImplementedError
|
|
56
|
+
|
|
37
57
|
def get(self, timeout=None, unit=None):
|
|
38
58
|
# type: (Optional[long], Optional[TimeUnit]) -> Any
|
|
39
59
|
raise NotImplementedError
|
|
@@ -46,6 +66,14 @@ class Future(object):
|
|
|
46
66
|
# type: () -> bool
|
|
47
67
|
raise NotImplementedError
|
|
48
68
|
|
|
69
|
+
def resultNow(self):
|
|
70
|
+
# type: () -> Any
|
|
71
|
+
raise NotImplementedError
|
|
72
|
+
|
|
73
|
+
def state(self):
|
|
74
|
+
# type: () -> Future.State
|
|
75
|
+
raise NotImplementedError
|
|
76
|
+
|
|
49
77
|
|
|
50
78
|
class ScheduledFuture(Delayed, Future):
|
|
51
79
|
def cancel(self, mayInterruptIfRunning):
|
|
@@ -78,6 +106,30 @@ class CompletableFuture(Object):
|
|
|
78
106
|
# type: () -> None
|
|
79
107
|
super(CompletableFuture, self).__init__()
|
|
80
108
|
|
|
109
|
+
def exceptionNow(self):
|
|
110
|
+
# type: () -> Throwable
|
|
111
|
+
pass
|
|
112
|
+
|
|
113
|
+
def resultNow(self):
|
|
114
|
+
# type: () -> Any
|
|
115
|
+
pass
|
|
116
|
+
|
|
117
|
+
def state(self):
|
|
118
|
+
# type: () -> Future.State
|
|
119
|
+
pass
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class StructureViolationException(RuntimeException):
|
|
123
|
+
def __init__(self, message=None):
|
|
124
|
+
# type: (Optional[str]) -> None
|
|
125
|
+
super(StructureViolationException, self).__init__(message)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class ThreadFactory(object):
|
|
129
|
+
def newThread(self, r):
|
|
130
|
+
# type: (Runnable) -> Thread
|
|
131
|
+
raise NotImplementedError
|
|
132
|
+
|
|
81
133
|
|
|
82
134
|
class TimeUnit(Enum):
|
|
83
135
|
DAYS = None # type: TimeUnit
|