
hm.binkley.util.function.ThrowingRunnable Maven / Gradle / Ivy
The newest version!
package hm.binkley.util.function;
/**
* {@code ThrowingRunnable} is a throwing look-a=like of {@link Runnable}. It cannot be a
* {@code Runnable} as it throws. Otherwise it is a faithful reproduction.
*
* @author B. K. Oxley (binkley)
*/
@SuppressWarnings("JavaDoc")
@FunctionalInterface
public interface ThrowingRunnable {
/** @see Runnable#run() */
void run()
throws E, InterruptedException;
/** Creates a facade {@code Runnable} wrapping this throwing one. */
default Runnable asRunnable(final Defer defer) {
return () -> defer.as(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy