-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
147 lines (110 loc) · 3.22 KB
/
__init__.py
File metadata and controls
147 lines (110 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
__all__ = [
"CompletableFuture",
"Delayed",
"Executor",
"Future",
"ScheduledFuture",
"TimeUnit",
]
from typing import Any, List, Optional
from java.lang import Comparable, Enum, Object, Runnable, Thread
from java.time.temporal import ChronoUnit
class Delayed(Comparable):
def compareTo(self, o):
# type: (Any) -> int
raise NotImplementedError
def getDelay(self, unit):
# type: (TimeUnit) -> long
raise NotImplementedError
class Executor(object):
def execute(self, command):
# type: (Runnable) -> None
raise NotImplementedError
class Future(object):
def cancel(self, mayInterruptIfRunning):
# type: (bool) -> bool
raise NotImplementedError
def get(self, timeout=None, unit=None):
# type: (Optional[long], Optional[TimeUnit]) -> Any
raise NotImplementedError
def isCancelled(self):
# type: () -> bool
raise NotImplementedError
def isDone(self):
# type: () -> bool
raise NotImplementedError
class ScheduledFuture(Delayed, Future):
def cancel(self, mayInterruptIfRunning):
# type: (bool) -> bool
raise NotImplementedError
def compareTo(self, o):
# type: (Any) -> int
raise NotImplementedError
def get(self, timeout=None, unit=None):
# type: (Optional[long], Optional[TimeUnit]) -> Any
raise NotImplementedError
def getDelay(self, unit):
# type: (TimeUnit) -> long
raise NotImplementedError
def isCancelled(self):
# type: () -> bool
raise NotImplementedError
def isDone(self):
# type: () -> bool
raise NotImplementedError
class CompletableFuture(Object):
def __init__(self):
# type: () -> None
super(CompletableFuture, self).__init__()
class TimeUnit(Enum):
DAYS = None # type: TimeUnit
HOURS = None # type: TimeUnit
MICROSECONDS = None # type: TimeUnit
MILLISECONDS = None # type: TimeUnit
MINUTES = None # type: TimeUnit
NANOSECONDS = None # type: TimeUnit
SECONDS = None # type: TimeUnit
def convert(self, *args):
# type: (*Any) -> long
pass
@staticmethod
def of(chronoUnit):
# type: (ChronoUnit) -> TimeUnit
pass
def sleep(self, timeout):
# type: (long) -> None
pass
def timedJoin(self, thread, timeout):
# type: (Thread, long) -> None
pass
def timedWait(self, obj, timeout):
# type: (Object, long) -> None
pass
def toChronoUnit(self):
# type: () -> ChronoUnit
pass
def toDays(self, duration):
# type: (long) -> long
pass
def toHours(self, duration):
# type: (long) -> long
pass
def toMicros(self, duration):
# type: (long) -> long
pass
def toMillis(self, duration):
# type: (long) -> long
pass
def toMinutes(self, duration):
# type: (long) -> long
pass
def toNanos(self, duration):
# type: (long) -> long
pass
def toSeconds(self, duration):
# type: (long) -> long
pass
@staticmethod
def values():
# type: () -> List[TimeUnit]
pass