forked from swiftlang/swift-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaFunction.swift
More file actions
43 lines (40 loc) · 1.47 KB
/
JavaFunction.swift
File metadata and controls
43 lines (40 loc) · 1.47 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
// Auto-generated by Java-to-Swift wrapper generator.
import SwiftJava
import SwiftJavaJNICore
@JavaInterface("java.util.function.Function")
public struct JavaFunction<T: AnyJavaObject, R: AnyJavaObject> {
/// Java method `apply`.
///
/// ### Java method signature
/// ```java
/// public abstract R java.util.function.Function.apply(T)
/// ```
@JavaMethod(typeErasedResult: "R!")
public func apply(_ arg0: T?) -> R!
/// Java method `compose`.
///
/// ### Java method signature
/// ```java
/// public default <V> java.util.function.Function<V, R> java.util.function.Function.compose(java.util.function.Function<? super V, ? extends T>)
/// ```
@JavaMethod
public func compose<V: AnyJavaObject>(_ arg0: JavaFunction<JavaObject, T>?) -> JavaFunction<V, R>!
/// Java method `andThen`.
///
/// ### Java method signature
/// ```java
/// public default <V> java.util.function.Function<T, V> java.util.function.Function.andThen(java.util.function.Function<? super R, ? extends V>)
/// ```
@JavaMethod
public func andThen<V: AnyJavaObject>(_ arg0: JavaFunction<JavaObject, V>?) -> JavaFunction<T, V>!
}
extension JavaClass {
/// Java method `identity`.
///
/// ### Java method signature
/// ```java
/// public static <T> java.util.function.Function<T, T> java.util.function.Function.identity()
/// ```
@JavaStaticMethod
public func identity<T: AnyJavaObject, R: AnyJavaObject>() -> JavaFunction<T, T>! where ObjectType == JavaFunction<T, R>
}