lm-sistemi-software-distrib.../src/main/kotlin/util/future/Math.kt

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 }
}
}