-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaClass.java
More file actions
29 lines (21 loc) · 721 Bytes
/
JavaClass.java
File metadata and controls
29 lines (21 loc) · 721 Bytes
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
package com.example.confuste.kotlinexamples;
import kotlin.jvm.functions.Function2;
/**
* Created by Alejandro Fuster on 29/11/17.
*/
public class JavaClass {
public JavaClass(){
}
/**
* This function is a wrapper of kotlin. It allow to pass like argument a couple of integers and
* an anonymous function writes on kotlin.
* @param a Integer
* @param b Integer
* @param c Anonymous function of Kotlin which require 2 Integers and return 1 Integer
* @return The int result
*/
public int sumHigherOrderSimulate(int a, int b, Function2<Integer, Integer, Integer> c) {
KotlinFunctions kotlinFunctions = new KotlinFunctions();
return kotlinFunctions.sumHigherOrder(a,b,c);
}
}