As I was going through JDK 7, I found that java.util.concurrent.RunnableFuture<V>
has a run method. I wonder what the significance of duplicating the same run method signature in the interface is when it already extends 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();
}
It's defined in the interface so that they can attach RunnableFuture
-specific JavaDoc to it. There's no technical significance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With