当我浏览 JDK 7 时,我发现它java.util.concurrent.RunnableFuture<V>
有一个 run 方法。我想知道在接口中复制相同的运行方法签名的意义是什么,当它已经扩展时Runnable
。
package java.util.concurrent;
public interface RunnableFuture<V> extends Runnable, Future<V> {
/**
* Sets this Future to the result of its computation
* unless it has been cancelled.
*/
void run();
}