Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface ThrowingRunnable<E extends Exception> {
- static Runnable throwingRunnableWrapper(final ThrowingRunnable<Exception> throwingRunnable) {
- return () -> {
- try {
- throwingRunnable.run();
- } catch (final Exception ex) {
- throw new RuntimeException(ex);
- }
- };
- }
- void run() throws E;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement