functional interface that takes nothing and returns nothing [duplicate]
Is there a standard functional interface in the JDK that takes nothing and returns nothing? I cannot find one. Something like the following:
@FunctionalInterface
interface Action {
void execute();
}
How about Runnable :
@FunctionalInterface
public interface Runnable {
/**
* When an object implementing interface <code>Runnable</code> is used
* to create a thread, starting the thread causes the object's
* <code>run</code> method to be called in that separately executing
* thread.
* <p>
* The general contract of the method <code>run</code> is that it may
* take any action whatsoever.
*
* @see java.lang.Thread#run()
*/
public abstract void run();
}