FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java_util/Sources/ArrayBlockingQueue.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
/
ArrayBlockingQueue.swift
Copy path
More file actions
More file actions
Latest commit
History
History
History
301 lines (203 loc) · 13.8 KB
Breadcrumbs
java_util
/
Sources
/
ArrayBlockingQueue.swift
Copy path
File metadata and controls
301 lines (203 loc) · 13.8 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
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:45 GMT 2016 ///
/// class java.util.concurrent.ArrayBlockingQueue ///
open
class
ArrayBlockingQueue
:
AbstractQueue
,
/* java.io.Serializable */
UnclassedProtocol
{
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.ArrayBlockingQueue
"
,
file
,
line
)
{
return
nil
}
object
.
withJavaObject
{
self
.
javaObject
=
$0
}
}
private
static
var
ArrayBlockingQueueJNIClass
:
jclass
?
/// private static final long java.util.concurrent.ArrayBlockingQueue.serialVersionUID
/// private final java.lang.Object[] java.util.concurrent.ArrayBlockingQueue.items
/// private int java.util.concurrent.ArrayBlockingQueue.takeIndex
/// private int java.util.concurrent.ArrayBlockingQueue.putIndex
/// private int java.util.concurrent.ArrayBlockingQueue.count
/// private final java.util.concurrent.locks.ReentrantLock java.util.concurrent.ArrayBlockingQueue.lock
/// private final java.util.concurrent.locks.Condition java.util.concurrent.ArrayBlockingQueue.notEmpty
/// private final java.util.concurrent.locks.Condition java.util.concurrent.ArrayBlockingQueue.notFull
/// public java.util.concurrent.ArrayBlockingQueue(int,boolean)
private
static
var
new_MethodID_1
:
jmethodID
?
public
convenience
init
(
arg0
:
Int
,
arg1
:
Bool
)
{
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
__object
=
JNIMethod
.
NewObject
(
className
:
"
java/util/concurrent/ArrayBlockingQueue
"
,
classCache
:
&
ArrayBlockingQueue
.
ArrayBlockingQueueJNIClass
,
methodSig
:
"
(IZ)V
"
,
methodCache
:
&
ArrayBlockingQueue
.
new_MethodID_1
,
args
:
&
__args
,
locals
:
&
__locals
)
self
.
init
(
javaObject
:
__object
)
JNI
.
DeleteLocalRef
(
__object
)
}
public
convenience
init
(
_ _arg0
:
Int
,
_ _arg1
:
Bool
)
{
self
.
init
(
arg0
:
_arg0
,
arg1
:
_arg1
)
}
/// public java.util.concurrent.ArrayBlockingQueue(int)
private
static
var
new_MethodID_2
:
jmethodID
?
public
convenience
init
(
arg0
:
Int
)
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
__args
[
0
]
=
JNIType
.
encode
(
value
:
arg0
,
locals
:
&
__locals
)
let
__object
=
JNIMethod
.
NewObject
(
className
:
"
java/util/concurrent/ArrayBlockingQueue
"
,
classCache
:
&
ArrayBlockingQueue
.
ArrayBlockingQueueJNIClass
,
methodSig
:
"
(I)V
"
,
methodCache
:
&
ArrayBlockingQueue
.
new_MethodID_2
,
args
:
&
__args
,
locals
:
&
__locals
)
self
.
init
(
javaObject
:
__object
)
JNI
.
DeleteLocalRef
(
__object
)
}
public
convenience
init
(
_ _arg0
:
Int
)
{
self
.
init
(
arg0
:
_arg0
)
}
/// public java.util.concurrent.ArrayBlockingQueue(int,boolean,java.util.Collection)
private
static
var
new_MethodID_3
:
jmethodID
?
public
convenience
init
(
arg0
:
Int
,
arg1
:
Bool
,
arg2
:
Collection
?
)
{
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
]
=
jvalue
(
l
:
arg2
?
.
localJavaObject
(
&
__locals
)
)
let
__object
=
JNIMethod
.
NewObject
(
className
:
"
java/util/concurrent/ArrayBlockingQueue
"
,
classCache
:
&
ArrayBlockingQueue
.
ArrayBlockingQueueJNIClass
,
methodSig
:
"
(IZLjava/util/Collection;)V
"
,
methodCache
:
&
ArrayBlockingQueue
.
new_MethodID_3
,
args
:
&
__args
,
locals
:
&
__locals
)
self
.
init
(
javaObject
:
__object
)
JNI
.
DeleteLocalRef
(
__object
)
}
public
convenience
init
(
_ _arg0
:
Int
,
_ _arg1
:
Bool
,
_ _arg2
:
Collection
?
)
{
self
.
init
(
arg0
:
_arg0
,
arg1
:
_arg1
,
arg2
:
_arg2
)
}
/// public boolean java.util.concurrent.ArrayBlockingQueue.add(java.lang.Object)
/// public void java.util.concurrent.ArrayBlockingQueue.put(java.lang.Object) throws java.lang.InterruptedException
private
static
var
put_MethodID_4
:
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
:
&
ArrayBlockingQueue
.
put_MethodID_4
,
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 java.lang.String java.util.concurrent.ArrayBlockingQueue.toString()
/// public void java.util.concurrent.ArrayBlockingQueue.clear()
/// public boolean java.util.concurrent.ArrayBlockingQueue.contains(java.lang.Object)
/// static java.lang.Object[] java.util.concurrent.ArrayBlockingQueue.access$100(java.util.concurrent.ArrayBlockingQueue)
/// public int java.util.concurrent.ArrayBlockingQueue.size()
/// public java.lang.Object[] java.util.concurrent.ArrayBlockingQueue.toArray()
/// public java.lang.Object[] java.util.concurrent.ArrayBlockingQueue.toArray(java.lang.Object[])
/// public java.util.Iterator java.util.concurrent.ArrayBlockingQueue.iterator()
/// static int java.util.concurrent.ArrayBlockingQueue.access$000(java.util.concurrent.ArrayBlockingQueue)
/// static int java.util.concurrent.ArrayBlockingQueue.access$200(java.util.concurrent.ArrayBlockingQueue)
/// public boolean java.util.concurrent.ArrayBlockingQueue.remove(java.lang.Object)
/// static java.util.concurrent.locks.ReentrantLock java.util.concurrent.ArrayBlockingQueue.access$300(java.util.concurrent.ArrayBlockingQueue)
/// private void java.util.concurrent.ArrayBlockingQueue.insert(java.lang.Object)
/// public java.lang.Object java.util.concurrent.ArrayBlockingQueue.poll()
/// public java.lang.Object java.util.concurrent.ArrayBlockingQueue.poll(long,java.util.concurrent.TimeUnit) throws java.lang.InterruptedException
private
static
var
poll_MethodID_5
:
jmethodID
?
open
func
poll
(
arg0
:
Int64
,
arg1
:
TimeUnit
?
)
throws
/* java.lang.InterruptedException */
->
java_lang
.
JavaObject
!
{
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/lang/Object;
"
,
methodCache
:
&
ArrayBlockingQueue
.
poll_MethodID_5
,
args
:
&
__args
,
locals
:
&
__locals
)
defer
{
JNI
.
DeleteLocalRef
(
__return
)
}
if
let
throwable
=
JNI
.
ExceptionCheck
(
)
{
throw
java_lang
.
InterruptedException
(
javaObject
:
throwable
)
}
return
__return
!=
nil
?
java_lang
.
JavaObject
(
javaObject
:
__return
)
:
nil
}
open
func
poll
(
_ _arg0
:
Int64
,
_ _arg1
:
TimeUnit
?
)
throws
/* java.lang.InterruptedException */
->
java_lang
.
JavaObject
!
{
return
try
poll
(
arg0
:
_arg0
,
arg1
:
_arg1
)
}
/// public java.lang.Object java.util.concurrent.ArrayBlockingQueue.peek()
/// public boolean java.util.concurrent.ArrayBlockingQueue.offer(java.lang.Object,long,java.util.concurrent.TimeUnit) throws java.lang.InterruptedException
private
static
var
offer_MethodID_6
:
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
:
&
ArrayBlockingQueue
.
offer_MethodID_6
,
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.ArrayBlockingQueue.offer(java.lang.Object)
/// public java.lang.Object java.util.concurrent.ArrayBlockingQueue.take() throws java.lang.InterruptedException
private
static
var
take_MethodID_7
:
jmethodID
?
open
func
take
(
)
throws
/* java.lang.InterruptedException */
->
java_lang
.
JavaObject
!
{
var
__args
=
[
jvalue
]
(
repeating
:
jvalue
(
)
,
count
:
1
)
var
__locals
=
[
jobject
]
(
)
let
__return
=
JNIMethod
.
CallObjectMethod
(
object
:
javaObject
,
methodName
:
"
take
"
,
methodSig
:
"
()Ljava/lang/Object;
"
,
methodCache
:
&
ArrayBlockingQueue
.
take_MethodID_7
,
args
:
&
__args
,
locals
:
&
__locals
)
defer
{
JNI
.
DeleteLocalRef
(
__return
)
}
if
let
throwable
=
JNI
.
ExceptionCheck
(
)
{
throw
java_lang
.
InterruptedException
(
javaObject
:
throwable
)
}
return
__return
!=
nil
?
java_lang
.
JavaObject
(
javaObject
:
__return
)
:
nil
}
/// public int java.util.concurrent.ArrayBlockingQueue.remainingCapacity()
private
static
var
remainingCapacity_MethodID_8
:
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
:
&
ArrayBlockingQueue
.
remainingCapacity_MethodID_8
,
args
:
&
__args
,
locals
:
&
__locals
)
return
JNIType
.
decode
(
type
:
Int
(
)
,
from
:
__return
)
}
/// public int java.util.concurrent.ArrayBlockingQueue.drainTo(java.util.Collection,int)
private
static
var
drainTo_MethodID_9
:
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
:
&
ArrayBlockingQueue
.
drainTo_MethodID_9
,
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
)
}
/// public int java.util.concurrent.ArrayBlockingQueue.drainTo(java.util.Collection)
private
static
var
drainTo_MethodID_10
:
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
:
&
ArrayBlockingQueue
.
drainTo_MethodID_10
,
args
:
&
__args
,
locals
:
&
__locals
)
return
JNIType
.
decode
(
type
:
Int
(
)
,
from
:
__return
)
}
open
func
drainTo
(
_ _arg0
:
Collection
?
)
->
Int
{
return
drainTo
(
arg0
:
_arg0
)
}
/// void java.util.concurrent.ArrayBlockingQueue.removeAt(int)
/// final int java.util.concurrent.ArrayBlockingQueue.inc(int)
/// final int java.util.concurrent.ArrayBlockingQueue.dec(int)
/// private java.lang.Object java.util.concurrent.ArrayBlockingQueue.extract()
/// 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