14 lines
257 B
Kotlin
14 lines
257 B
Kotlin
package util.future
|
|
|
|
import java.util.concurrent.Future
|
|
|
|
interface FutureMath {
|
|
fun add(a: Int, b: Int): Future<Int>
|
|
}
|
|
|
|
class FutureMathImpl : FutureMath {
|
|
override fun add(a: Int, b: Int): Future<Int> {
|
|
return LatchFuture { a + b }
|
|
}
|
|
}
|