5

Future<T>C#の Java に最も近いものは何ですか?

たとえば、次の最も近い再構成は C# では次のようになります。

public class FutureMethodCall implements Future {
    private Future<APIResponse> methodCall;

    public boolean cancel(boolean mayInterruptIfRunning) {
        return this.methodCall.cancel(mayInterruptIfRunning);
    }

    public APIResponse get() throws ExecutionException, InterruptedException {
        return this.methodCall.get();
    }

    ...
}

前もって感謝します!

4

1 に答える 1