FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java_util/Sources/DelayQueue.swift at 1.0.10 · SwiftJava/java_util · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
SwiftJava
/
java_util
Public
Notifications
You must be signed in to change notification settings
Fork
5
Star
7
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
java_util
/
Sources
/
DelayQueue.swift
Copy path
More file actions
More file actions
Latest commit
History
History
History
323 lines (223 loc) · 14.6 KB
Breadcrumbs
java_util
/
Sources
/
DelayQueue.swift
Copy path
File metadata and controls
323 lines (223 loc) · 14.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
import
java_swift
import
java_lang
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// JAVA_HOME: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home ///
/// Tue Dec 20 11:29:47 GMT 2016 ///
/// class java.util.concurrent.DelayQueue ///
open
class
DelayQueue
:
AbstractQueue
{
public
convenience
init
?
(
casting object
:
java_lang
.
JavaObject
,
_ file
:
StaticString
=
#file
,
_ line
:
Int
=
#line
)
{
self
.
init
(
javaObject
:
nil
)
if
!object
.
validDownCast
(
toJavaClass
:
"
java.util.concurrent.DelayQueue
"
,
file
,
line
)
{
return
nil
}
object
.
withJavaObject
{
self
.
javaObject
=
$0
}
}
private
static
var
DelayQueueJNIClass
:
jclass
?
/// private final transient java.util.concurrent.locks.ReentrantLock java.util.concurrent.DelayQueue.lock
/// private final transient java.util.concurrent.locks.Condition java.util.concurrent.DelayQueue.available
/// private final java.util.PriorityQueue java.util.concurrent.DelayQueue.q
/// static final boolean java.util.concurrent.DelayQueue.$assertionsDisabled
/// public java.util.concurrent.DelayQueue()
private
static
var
new_MethodID_1
:
jmethodID
?
public
convenience
init
(
)
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
let
__object
=
JNIMethod
.
NewObject
(
className
:
"
java/util/concurrent/DelayQueue
"
,
classCache
:
&
DelayQueue
.
DelayQueueJNIClass
,
methodSig
:
"
()V
"
,
methodCache
:
&
DelayQueue
.
new_MethodID_1
,
args
:
&
__args
,
locals
:
&
__locals
)
self
.
init
(
javaObject
:
__object
)
JNI
.
DeleteLocalRef
(
__object
)
}
/// public java.util.concurrent.DelayQueue(java.util.Collection)
private
static
var
new_MethodID_2
:
jmethodID
?
public
convenience
init
(
arg0
:
Collection
?
)
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
jvalue
(
l
:
arg0
?
.
localJavaObject
(
&
__locals
)
)
let
__object
=
JNIMethod
.
NewObject
(
className
:
"
java/util/concurrent/DelayQueue
"
,
classCache
:
&
DelayQueue
.
DelayQueueJNIClass
,
methodSig
:
"
(Ljava/util/Collection;)V
"
,
methodCache
:
&
DelayQueue
.
new_MethodID_2
,
args
:
&
__args
,
locals
:
&
__locals
)
self
.
init
(
javaObject
:
__object
)
JNI
.
DeleteLocalRef
(
__object
)
}
public
convenience
init
(
_ _arg0
:
Collection
?
)
{
self
.
init
(
arg0
:
_arg0
)
}
/// public boolean java.util.concurrent.DelayQueue.add(java.lang.Object)
/// public boolean java.util.concurrent.DelayQueue.add(java.util.concurrent.Delayed)
private
static
var
add_MethodID_3
:
jmethodID
?
open
func
add
(
arg0
:
Delayed
?
)
->
Bool
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
jvalue
(
l
:
arg0
?
.
localJavaObject
(
&
__locals
)
)
let
__return
=
JNIMethod
.
CallBooleanMethod
(
object
:
javaObject
,
methodName
:
"
add
"
,
methodSig
:
"
(Ljava/util/concurrent/Delayed;)Z
"
,
methodCache
:
&
DelayQueue
.
add_MethodID_3
,
args
:
&
__args
,
locals
:
&
__locals
)
return
JNIType
.
decode
(
type
:
Bool
(
)
,
from
:
__return
)
}
open
func
add
(
_ _arg0
:
Delayed
?
)
->
Bool
{
return
add
(
arg0
:
_arg0
)
}
/// public void java.util.concurrent.DelayQueue.put(java.util.concurrent.Delayed)
private
static
var
put_MethodID_4
:
jmethodID
?
open
func
put
(
arg0
:
Delayed
?
)
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
jvalue
(
l
:
arg0
?
.
localJavaObject
(
&
__locals
)
)
JNIMethod
.
CallVoidMethod
(
object
:
javaObject
,
methodName
:
"
put
"
,
methodSig
:
"
(Ljava/util/concurrent/Delayed;)V
"
,
methodCache
:
&
DelayQueue
.
put_MethodID_4
,
args
:
&
__args
,
locals
:
&
__locals
)
}
open
func
put
(
_ _arg0
:
Delayed
?
)
{
put
(
arg0
:
_arg0
)
}
/// public void java.util.concurrent.DelayQueue.put(java.lang.Object) throws java.lang.InterruptedException
private
static
var
put_MethodID_5
:
jmethodID
?
open
func
put
(
arg0
:
java_lang
.
JavaObject
?
)
throws
/* java.lang.InterruptedException */
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
JNIType
.
encode
(
value
:
arg0
,
locals
:
&
__locals
)
JNIMethod
.
CallVoidMethod
(
object
:
javaObject
,
methodName
:
"
put
"
,
methodSig
:
"
(Ljava/lang/Object;)V
"
,
methodCache
:
&
DelayQueue
.
put_MethodID_5
,
args
:
&
__args
,
locals
:
&
__locals
)
if
let
throwable
=
JNI
.
ExceptionCheck
(
)
{
throw
java_lang
.
InterruptedException
(
javaObject
:
throwable
)
}
}
open
func
put
(
_ _arg0
:
java_lang
.
JavaObject
?
)
throws
/* java.lang.InterruptedException */
{
try
put
(
arg0
:
_arg0
)
}
/// public void java.util.concurrent.DelayQueue.clear()
/// static java.util.PriorityQueue java.util.concurrent.DelayQueue.access$100(java.util.concurrent.DelayQueue)
/// public int java.util.concurrent.DelayQueue.size()
/// public java.lang.Object[] java.util.concurrent.DelayQueue.toArray(java.lang.Object[])
/// public java.lang.Object[] java.util.concurrent.DelayQueue.toArray()
/// public java.util.Iterator java.util.concurrent.DelayQueue.iterator()
/// static java.util.concurrent.locks.ReentrantLock java.util.concurrent.DelayQueue.access$000(java.util.concurrent.DelayQueue)
/// public boolean java.util.concurrent.DelayQueue.remove(java.lang.Object)
/// public java.util.concurrent.Delayed java.util.concurrent.DelayQueue.poll()
/// public java.util.concurrent.Delayed java.util.concurrent.DelayQueue.poll(long,java.util.concurrent.TimeUnit) throws java.lang.InterruptedException
private
static
var
poll_MethodID_6
:
jmethodID
?
open
func
poll
(
arg0
:
Int64
,
arg1
:
TimeUnit
?
)
throws
/* java.lang.InterruptedException */
->
Delayed
!
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
2
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
JNIType
.
encode
(
value
:
arg0
,
locals
:
&
__locals
)
__args
[
1
]
=
JNIType
.
encode
(
value
:
arg1
,
locals
:
&
__locals
)
let
__return
=
JNIMethod
.
CallObjectMethod
(
object
:
javaObject
,
methodName
:
"
poll
"
,
methodSig
:
"
(JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/Delayed;
"
,
methodCache
:
&
DelayQueue
.
poll_MethodID_6
,
args
:
&
__args
,
locals
:
&
__locals
)
defer
{
JNI
.
DeleteLocalRef
(
__return
)
}
if
let
throwable
=
JNI
.
ExceptionCheck
(
)
{
throw
java_lang
.
InterruptedException
(
javaObject
:
throwable
)
}
return
__return
!=
nil
?
DelayedForward
(
javaObject
:
__return
)
:
nil
}
open
func
poll
(
_ _arg0
:
Int64
,
_ _arg1
:
TimeUnit
?
)
throws
/* java.lang.InterruptedException */
->
Delayed
!
{
return
try
poll
(
arg0
:
_arg0
,
arg1
:
_arg1
)
}
/// public java.lang.Object java.util.concurrent.DelayQueue.poll()
/// public java.lang.Object java.util.concurrent.DelayQueue.poll(long,java.util.concurrent.TimeUnit) throws java.lang.InterruptedException
/// public java.util.concurrent.Delayed java.util.concurrent.DelayQueue.peek()
/// public java.lang.Object java.util.concurrent.DelayQueue.peek()
/// public boolean java.util.concurrent.DelayQueue.offer(java.lang.Object,long,java.util.concurrent.TimeUnit) throws java.lang.InterruptedException
private
static
var
offer_MethodID_7
:
jmethodID
?
open
func
offer
(
arg0
:
java_lang
.
JavaObject
?
,
arg1
:
Int64
,
arg2
:
TimeUnit
?
)
throws
/* java.lang.InterruptedException */
->
Bool
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
3
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
JNIType
.
encode
(
value
:
arg0
,
locals
:
&
__locals
)
__args
[
1
]
=
JNIType
.
encode
(
value
:
arg1
,
locals
:
&
__locals
)
__args
[
2
]
=
JNIType
.
encode
(
value
:
arg2
,
locals
:
&
__locals
)
let
__return
=
JNIMethod
.
CallBooleanMethod
(
object
:
javaObject
,
methodName
:
"
offer
"
,
methodSig
:
"
(Ljava/lang/Object;JLjava/util/concurrent/TimeUnit;)Z
"
,
methodCache
:
&
DelayQueue
.
offer_MethodID_7
,
args
:
&
__args
,
locals
:
&
__locals
)
if
let
throwable
=
JNI
.
ExceptionCheck
(
)
{
throw
java_lang
.
InterruptedException
(
javaObject
:
throwable
)
}
return
JNIType
.
decode
(
type
:
Bool
(
)
,
from
:
__return
)
}
open
func
offer
(
_ _arg0
:
java_lang
.
JavaObject
?
,
_ _arg1
:
Int64
,
_ _arg2
:
TimeUnit
?
)
throws
/* java.lang.InterruptedException */
->
Bool
{
return
try
offer
(
arg0
:
_arg0
,
arg1
:
_arg1
,
arg2
:
_arg2
)
}
/// public boolean java.util.concurrent.DelayQueue.offer(java.lang.Object)
/// public boolean java.util.concurrent.DelayQueue.offer(java.util.concurrent.Delayed)
private
static
var
offer_MethodID_8
:
jmethodID
?
open
func
offer
(
arg0
:
Delayed
?
)
->
Bool
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
jvalue
(
l
:
arg0
?
.
localJavaObject
(
&
__locals
)
)
let
__return
=
JNIMethod
.
CallBooleanMethod
(
object
:
javaObject
,
methodName
:
"
offer
"
,
methodSig
:
"
(Ljava/util/concurrent/Delayed;)Z
"
,
methodCache
:
&
DelayQueue
.
offer_MethodID_8
,
args
:
&
__args
,
locals
:
&
__locals
)
return
JNIType
.
decode
(
type
:
Bool
(
)
,
from
:
__return
)
}
open
func
offer
(
_ _arg0
:
Delayed
?
)
->
Bool
{
return
offer
(
arg0
:
_arg0
)
}
/// public boolean java.util.concurrent.DelayQueue.offer(java.util.concurrent.Delayed,long,java.util.concurrent.TimeUnit)
private
static
var
offer_MethodID_9
:
jmethodID
?
open
func
offer
(
arg0
:
Delayed
?
,
arg1
:
Int64
,
arg2
:
TimeUnit
?
)
->
Bool
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
3
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
jvalue
(
l
:
arg0
?
.
localJavaObject
(
&
__locals
)
)
__args
[
1
]
=
JNIType
.
encode
(
value
:
arg1
,
locals
:
&
__locals
)
__args
[
2
]
=
JNIType
.
encode
(
value
:
arg2
,
locals
:
&
__locals
)
let
__return
=
JNIMethod
.
CallBooleanMethod
(
object
:
javaObject
,
methodName
:
"
offer
"
,
methodSig
:
"
(Ljava/util/concurrent/Delayed;JLjava/util/concurrent/TimeUnit;)Z
"
,
methodCache
:
&
DelayQueue
.
offer_MethodID_9
,
args
:
&
__args
,
locals
:
&
__locals
)
return
JNIType
.
decode
(
type
:
Bool
(
)
,
from
:
__return
)
}
open
func
offer
(
_ _arg0
:
Delayed
?
,
_ _arg1
:
Int64
,
_ _arg2
:
TimeUnit
?
)
->
Bool
{
return
offer
(
arg0
:
_arg0
,
arg1
:
_arg1
,
arg2
:
_arg2
)
}
/// public java.util.concurrent.Delayed java.util.concurrent.DelayQueue.take() throws java.lang.InterruptedException
private
static
var
take_MethodID_10
:
jmethodID
?
open
func
take
(
)
throws
/* java.lang.InterruptedException */
->
Delayed
!
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
let
__return
=
JNIMethod
.
CallObjectMethod
(
object
:
javaObject
,
methodName
:
"
take
"
,
methodSig
:
"
()Ljava/util/concurrent/Delayed;
"
,
methodCache
:
&
DelayQueue
.
take_MethodID_10
,
args
:
&
__args
,
locals
:
&
__locals
)
defer
{
JNI
.
DeleteLocalRef
(
__return
)
}
if
let
throwable
=
JNI
.
ExceptionCheck
(
)
{
throw
java_lang
.
InterruptedException
(
javaObject
:
throwable
)
}
return
__return
!=
nil
?
DelayedForward
(
javaObject
:
__return
)
:
nil
}
/// public java.lang.Object java.util.concurrent.DelayQueue.take() throws java.lang.InterruptedException
/// public int java.util.concurrent.DelayQueue.remainingCapacity()
private
static
var
remainingCapacity_MethodID_11
:
jmethodID
?
open
func
remainingCapacity
(
)
->
Int
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
let
__return
=
JNIMethod
.
CallIntMethod
(
object
:
javaObject
,
methodName
:
"
remainingCapacity
"
,
methodSig
:
"
()I
"
,
methodCache
:
&
DelayQueue
.
remainingCapacity_MethodID_11
,
args
:
&
__args
,
locals
:
&
__locals
)
return
JNIType
.
decode
(
type
:
Int
(
)
,
from
:
__return
)
}
/// public int java.util.concurrent.DelayQueue.drainTo(java.util.Collection)
private
static
var
drainTo_MethodID_12
:
jmethodID
?
open
func
drainTo
(
arg0
:
Collection
?
)
->
Int
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
jvalue
(
l
:
arg0
?
.
localJavaObject
(
&
__locals
)
)
let
__return
=
JNIMethod
.
CallIntMethod
(
object
:
javaObject
,
methodName
:
"
drainTo
"
,
methodSig
:
"
(Ljava/util/Collection;)I
"
,
methodCache
:
&
DelayQueue
.
drainTo_MethodID_12
,
args
:
&
__args
,
locals
:
&
__locals
)
return
JNIType
.
decode
(
type
:
Int
(
)
,
from
:
__return
)
}
open
func
drainTo
(
_ _arg0
:
Collection
?
)
->
Int
{
return
drainTo
(
arg0
:
_arg0
)
}
/// public int java.util.concurrent.DelayQueue.drainTo(java.util.Collection,int)
private
static
var
drainTo_MethodID_13
:
jmethodID
?
open
func
drainTo
(
arg0
:
Collection
?
,
arg1
:
Int
)
->
Int
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
2
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
jvalue
(
l
:
arg0
?
.
localJavaObject
(
&
__locals
)
)
__args
[
1
]
=
JNIType
.
encode
(
value
:
arg1
,
locals
:
&
__locals
)
let
__return
=
JNIMethod
.
CallIntMethod
(
object
:
javaObject
,
methodName
:
"
drainTo
"
,
methodSig
:
"
(Ljava/util/Collection;I)I
"
,
methodCache
:
&
DelayQueue
.
drainTo_MethodID_13
,
args
:
&
__args
,
locals
:
&
__locals
)
return
JNIType
.
decode
(
type
:
Int
(
)
,
from
:
__return
)
}
open
func
drainTo
(
_ _arg0
:
Collection
?
,
_ _arg1
:
Int
)
->
Int
{
return
drainTo
(
arg0
:
_arg0
,
arg1
:
_arg1
)
}
/// In declared protocol but not defined.. ///
/// public abstract int java.util.Collection.size()
/// public abstract java.lang.Object java.util.Queue.element()
/// public abstract java.util.Iterator java.lang.Iterable.iterator()
/// public abstract boolean java.util.Queue.offer(java.lang.Object)
/// public abstract boolean java.util.Collection.retainAll(java.util.Collection)
/// public abstract java.lang.Object java.util.Queue.remove()
/// public abstract java.lang.Object java.util.Queue.poll()
/// public abstract void java.util.Collection.clear()
/// public abstract boolean java.util.Collection.remove(java.lang.Object)
/// public abstract java.lang.Object[] java.util.Collection.toArray(java.lang.Object[])
/// public abstract boolean java.util.Collection.add(java.lang.Object)
/// public abstract boolean java.util.Collection.addAll(java.util.Collection)
/// public abstract boolean java.util.Collection.removeAll(java.util.Collection)
/// public abstract boolean java.util.Collection.contains(java.lang.Object)
/// public abstract boolean java.util.Collection.containsAll(java.util.Collection)
/// public abstract boolean java.util.Collection.equals(java.lang.Object)
/// public abstract java.lang.Object[] java.util.Collection.toArray()
/// public abstract boolean java.util.Collection.isEmpty()
/// public abstract int java.util.Collection.hashCode()
/// public abstract java.lang.Object java.util.Queue.peek()
}
Back
|
FazBrowse Home
|
New Git URL