forked from SwiftJava/java_swift
-
Notifications
You must be signed in to change notification settings - Fork 2
/
JavaSet.swift
318 lines (196 loc) · 12.8 KB
/
JavaSet.swift
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
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// interface java.util.Set ///
public protocol JavaSet: /* interface java.util.Collection */ UnavailableProtocol {
/// public abstract boolean java.util.Set.add(java.lang.Object)
func add( e: JavaObject? ) -> Bool
/// public abstract boolean java.util.Set.addAll(java.util.Collection)
func addAll( c: /* interface java.util.Collection */ UnavailableProtocol? ) -> Bool
/// public abstract void java.util.Set.clear()
func clear()
/// public abstract boolean java.util.Set.contains(java.lang.Object)
func contains( o: JavaObject? ) -> Bool
/// public abstract boolean java.util.Set.containsAll(java.util.Collection)
func containsAll( c: /* interface java.util.Collection */ UnavailableProtocol? ) -> Bool
/// public abstract boolean java.util.Set.equals(java.lang.Object)
func equals( o: JavaObject? ) -> Bool
/// public abstract int java.util.Set.hashCode()
func hashCode() -> Int
/// public abstract boolean java.util.Set.isEmpty()
func isEmpty() -> Bool
/// public abstract java.util.Iterator java.util.Set.iterator()
// Skipping method: false false true false false
/// public abstract boolean java.util.Set.remove(java.lang.Object)
func remove( o: JavaObject? ) -> Bool
/// public abstract boolean java.util.Set.removeAll(java.util.Collection)
func removeAll( c: /* interface java.util.Collection */ UnavailableProtocol? ) -> Bool
/// public abstract boolean java.util.Set.retainAll(java.util.Collection)
func retainAll( c: /* interface java.util.Collection */ UnavailableProtocol? ) -> Bool
/// public abstract int java.util.Set.size()
func size() -> Int
/// public default java.util.Spliterator java.util.Set.spliterator()
// Skipping method: false false true false false
/// public abstract java.lang.Object[] java.util.Set.toArray(java.lang.Object[])
func toArray( a: [JavaObject]? ) -> [JavaObject]!
/// public abstract java.lang.Object[] java.util.Set.toArray()
func toArray() -> [JavaObject]!
}
open class JavaSetForward: /* interface java.util.Collection */ UnavailableProtocolForward, JavaSet {
private static var JavaSetJNIClass: jclass?
/// public abstract boolean java.util.Set.add(java.lang.Object)
private static var add_MethodID_15: jmethodID?
open func add( e: JavaObject? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: e, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "add", methodSig: "(Ljava/lang/Object;)Z", methodCache: &JavaSetForward.add_MethodID_15, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public abstract boolean java.util.Set.addAll(java.util.Collection)
private static var addAll_MethodID_16: jmethodID?
open func addAll( c: /* interface java.util.Collection */ UnavailableProtocol? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: c, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "addAll", methodSig: "(Ljava/util/Collection;)Z", methodCache: &JavaSetForward.addAll_MethodID_16, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public abstract void java.util.Set.clear()
private static var clear_MethodID_17: jmethodID?
open func clear() {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "clear", methodSig: "()V", methodCache: &JavaSetForward.clear_MethodID_17, args: &__args, locals: &__locals )
}
/// public abstract boolean java.util.Set.contains(java.lang.Object)
private static var contains_MethodID_18: jmethodID?
open func contains( o: JavaObject? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: o, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "contains", methodSig: "(Ljava/lang/Object;)Z", methodCache: &JavaSetForward.contains_MethodID_18, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public abstract boolean java.util.Set.containsAll(java.util.Collection)
private static var containsAll_MethodID_19: jmethodID?
open func containsAll( c: /* interface java.util.Collection */ UnavailableProtocol? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: c, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "containsAll", methodSig: "(Ljava/util/Collection;)Z", methodCache: &JavaSetForward.containsAll_MethodID_19, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public abstract boolean java.util.Set.equals(java.lang.Object)
private static var equals_MethodID_20: jmethodID?
open func equals( o: JavaObject? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: o, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "equals", methodSig: "(Ljava/lang/Object;)Z", methodCache: &JavaSetForward.equals_MethodID_20, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public default void java.lang.Iterable.forEach(java.util.function.Consumer)
private static var forEach_MethodID_21: jmethodID?
open func forEach( action: /* interface java.util.function.Consumer */ UnavailableProtocol? ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: action, locals: &__locals )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "forEach", methodSig: "(Ljava/util/function/Consumer;)V", methodCache: &JavaSetForward.forEach_MethodID_21, args: &__args, locals: &__locals )
}
/// public abstract int java.util.Set.hashCode()
private static var hashCode_MethodID_22: jmethodID?
open func hashCode() -> Int {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallIntMethod( object: javaObject, methodName: "hashCode", methodSig: "()I", methodCache: &JavaSetForward.hashCode_MethodID_22, args: &__args, locals: &__locals )
return Int(__return)
}
/// public abstract boolean java.util.Set.isEmpty()
private static var isEmpty_MethodID_23: jmethodID?
open func isEmpty() -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "isEmpty", methodSig: "()Z", methodCache: &JavaSetForward.isEmpty_MethodID_23, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public abstract java.util.Iterator java.util.Set.iterator()
// Skipping method: false false true false false
/// public default java.util.stream.Stream java.util.Collection.parallelStream()
// Skipping method: false false true false false
/// public abstract boolean java.util.Set.remove(java.lang.Object)
private static var remove_MethodID_24: jmethodID?
open func remove( o: JavaObject? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: o, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "remove", methodSig: "(Ljava/lang/Object;)Z", methodCache: &JavaSetForward.remove_MethodID_24, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public abstract boolean java.util.Set.removeAll(java.util.Collection)
private static var removeAll_MethodID_25: jmethodID?
open func removeAll( c: /* interface java.util.Collection */ UnavailableProtocol? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: c, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "removeAll", methodSig: "(Ljava/util/Collection;)Z", methodCache: &JavaSetForward.removeAll_MethodID_25, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public default boolean java.util.Collection.removeIf(java.util.function.Predicate)
private static var removeIf_MethodID_26: jmethodID?
open func removeIf( filter: /* interface java.util.function.Predicate */ UnavailableProtocol? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: filter, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "removeIf", methodSig: "(Ljava/util/function/Predicate;)Z", methodCache: &JavaSetForward.removeIf_MethodID_26, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public abstract boolean java.util.Set.retainAll(java.util.Collection)
private static var retainAll_MethodID_27: jmethodID?
open func retainAll( c: /* interface java.util.Collection */ UnavailableProtocol? ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: c, locals: &__locals )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "retainAll", methodSig: "(Ljava/util/Collection;)Z", methodCache: &JavaSetForward.retainAll_MethodID_27, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public abstract int java.util.Set.size()
private static var size_MethodID_28: jmethodID?
open func size() -> Int {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallIntMethod( object: javaObject, methodName: "size", methodSig: "()I", methodCache: &JavaSetForward.size_MethodID_28, args: &__args, locals: &__locals )
return Int(__return)
}
/// public default java.util.Spliterator java.util.Set.spliterator()
// Skipping method: false false true false false
/// public default java.util.stream.Stream java.util.Collection.stream()
// Skipping method: false false true false false
/// public abstract java.lang.Object[] java.util.Set.toArray(java.lang.Object[])
private static var toArray_MethodID_29: jmethodID?
open func toArray( a: [JavaObject]? ) -> [JavaObject]! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: a, locals: &__locals )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "toArray", methodSig: "([Ljava/lang/Object;)[Ljava/lang/Object;", methodCache: &JavaSetForward.toArray_MethodID_29, args: &__args, locals: &__locals )
return JNIType.toSwift( type: [JavaObject].self, from: __return )
}
open func toArray( _ _a: [JavaObject]? ) -> [JavaObject]! {
return toArray( a: _a )
}
/// public abstract java.lang.Object[] java.util.Set.toArray()
private static var toArray_MethodID_30: jmethodID?
open func toArray() -> [JavaObject]! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "toArray", methodSig: "()[Ljava/lang/Object;", methodCache: &JavaSetForward.toArray_MethodID_30, args: &__args, locals: &__locals )
return JNIType.toSwift( type: [JavaObject].self, from: __return )
}
/// In declared protocol but not defined.. ///
/// public abstract java.util.Iterator java.lang.Iterable.iterator()
// Skipping method: false false true false false
/// public default java.util.stream.Stream java.util.Collection.parallelStream()
// Skipping method: false false true false false
/// public default java.util.Spliterator java.lang.Iterable.spliterator()
// Skipping method: false false true false false
/// public default java.util.stream.Stream java.util.Collection.stream()
// Skipping method: false false true false false
}